@emulates/flex 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/DISCOVERY.md +55 -0
- package/README.md +234 -0
- package/SUPPORT.md +24 -0
- package/dist/chunk-O6YIBDG6.js +6137 -0
- package/dist/chunk-O6YIBDG6.js.map +7 -0
- package/dist/chunk-TYLVTAND.js +871 -0
- package/dist/chunk-TYLVTAND.js.map +7 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +1267 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +1659 -0
- package/dist/server.js +12 -0
- package/dist/server.js.map +7 -0
- package/openapi.yaml +1180 -0
- package/package.json +129 -0
package/openapi.yaml
ADDED
|
@@ -0,0 +1,1180 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Flex HSA/FSA payments API (Emulates subset)
|
|
4
|
+
description: |
|
|
5
|
+
Stateful mock subset of the Flex (withflex.com) payments API: products, checkout sessions
|
|
6
|
+
(payment, subscription, off-session and setup modes), subscriptions, customers, setup
|
|
7
|
+
intents, refunds, and the hosted checkout page. Request and response bodies are wrapped in an envelope named after the
|
|
8
|
+
object (`{product: {...}}`, `{checkout_session: {...}}`, `{products: [...]}`).
|
|
9
|
+
Hand-authored from the consumer's wire shapes and the Flex API reference
|
|
10
|
+
(https://docs.withflex.com/api-reference); Flex publishes no machine-readable spec.
|
|
11
|
+
version: "1"
|
|
12
|
+
x-emulates-upstream:
|
|
13
|
+
note: >-
|
|
14
|
+
Hand-authored from the wire shapes our consumer reads and writes (flex-api.client.ts,
|
|
15
|
+
flex-payment.types.ts, flex-product.types.ts, flex-webhook.service.ts,
|
|
16
|
+
do-flex-hosted-checkout.ts). Subscription mode, recurring price_data and the Subscription
|
|
17
|
+
object follow https://docs.withflex.com/api-reference/checkout-sessions/create-checkout-session,
|
|
18
|
+
https://docs.withflex.com/api-reference/subscriptions/get-subscription and
|
|
19
|
+
https://docs.withflex.com/api-reference/prices/create-price.
|
|
20
|
+
servers:
|
|
21
|
+
- url: https://api.withflex.com
|
|
22
|
+
security:
|
|
23
|
+
- bearerAuth: []
|
|
24
|
+
paths:
|
|
25
|
+
/v1/products:
|
|
26
|
+
get:
|
|
27
|
+
operationId: ListProducts
|
|
28
|
+
x-emulates:
|
|
29
|
+
supported: true
|
|
30
|
+
parity:
|
|
31
|
+
enabled: true
|
|
32
|
+
safe: true
|
|
33
|
+
parameters:
|
|
34
|
+
- name: limit
|
|
35
|
+
in: query
|
|
36
|
+
required: false
|
|
37
|
+
schema:
|
|
38
|
+
type: integer
|
|
39
|
+
minimum: 1
|
|
40
|
+
maximum: 100
|
|
41
|
+
- name: starting_after
|
|
42
|
+
in: query
|
|
43
|
+
required: false
|
|
44
|
+
description: The last product_id of the previous page.
|
|
45
|
+
schema:
|
|
46
|
+
type: string
|
|
47
|
+
x-emulates-resource-ref:
|
|
48
|
+
type: product
|
|
49
|
+
missing: fprod_00000000000000000000000000
|
|
50
|
+
responses:
|
|
51
|
+
"200":
|
|
52
|
+
description: A page of products, oldest first
|
|
53
|
+
content:
|
|
54
|
+
application/json:
|
|
55
|
+
schema:
|
|
56
|
+
$ref: "#/components/schemas/ProductList"
|
|
57
|
+
"400":
|
|
58
|
+
$ref: "#/components/responses/Error"
|
|
59
|
+
"401":
|
|
60
|
+
$ref: "#/components/responses/Error"
|
|
61
|
+
post:
|
|
62
|
+
operationId: CreateProduct
|
|
63
|
+
x-emulates:
|
|
64
|
+
supported: true
|
|
65
|
+
parity:
|
|
66
|
+
enabled: true
|
|
67
|
+
safe: false
|
|
68
|
+
requestBody:
|
|
69
|
+
required: true
|
|
70
|
+
content:
|
|
71
|
+
application/json:
|
|
72
|
+
schema:
|
|
73
|
+
$ref: "#/components/schemas/CreateProductBody"
|
|
74
|
+
responses:
|
|
75
|
+
"200":
|
|
76
|
+
description: The created product
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
$ref: "#/components/schemas/ProductEnvelope"
|
|
81
|
+
"400":
|
|
82
|
+
$ref: "#/components/responses/Error"
|
|
83
|
+
"401":
|
|
84
|
+
$ref: "#/components/responses/Error"
|
|
85
|
+
/v1/products/{productId}:
|
|
86
|
+
parameters:
|
|
87
|
+
- name: productId
|
|
88
|
+
in: path
|
|
89
|
+
required: true
|
|
90
|
+
schema:
|
|
91
|
+
type: string
|
|
92
|
+
x-emulates-resource-ref:
|
|
93
|
+
type: product
|
|
94
|
+
missing: fprod_00000000000000000000000000
|
|
95
|
+
get:
|
|
96
|
+
operationId: GetProduct
|
|
97
|
+
x-emulates:
|
|
98
|
+
supported: true
|
|
99
|
+
parity:
|
|
100
|
+
enabled: true
|
|
101
|
+
safe: true
|
|
102
|
+
responses:
|
|
103
|
+
"200":
|
|
104
|
+
description: The product
|
|
105
|
+
content:
|
|
106
|
+
application/json:
|
|
107
|
+
schema:
|
|
108
|
+
$ref: "#/components/schemas/ProductEnvelope"
|
|
109
|
+
"401":
|
|
110
|
+
$ref: "#/components/responses/Error"
|
|
111
|
+
"404":
|
|
112
|
+
$ref: "#/components/responses/Error"
|
|
113
|
+
patch:
|
|
114
|
+
operationId: UpdateProduct
|
|
115
|
+
x-emulates:
|
|
116
|
+
supported: true
|
|
117
|
+
parity:
|
|
118
|
+
enabled: true
|
|
119
|
+
safe: false
|
|
120
|
+
requestBody:
|
|
121
|
+
required: true
|
|
122
|
+
content:
|
|
123
|
+
application/json:
|
|
124
|
+
schema:
|
|
125
|
+
$ref: "#/components/schemas/UpdateProductBody"
|
|
126
|
+
responses:
|
|
127
|
+
"200":
|
|
128
|
+
description: The updated product (emits product.updated)
|
|
129
|
+
content:
|
|
130
|
+
application/json:
|
|
131
|
+
schema:
|
|
132
|
+
$ref: "#/components/schemas/ProductEnvelope"
|
|
133
|
+
"400":
|
|
134
|
+
$ref: "#/components/responses/Error"
|
|
135
|
+
"401":
|
|
136
|
+
$ref: "#/components/responses/Error"
|
|
137
|
+
"404":
|
|
138
|
+
$ref: "#/components/responses/Error"
|
|
139
|
+
/v1/checkout/sessions:
|
|
140
|
+
get:
|
|
141
|
+
operationId: ListCheckoutSessions
|
|
142
|
+
x-emulates:
|
|
143
|
+
supported: true
|
|
144
|
+
parity:
|
|
145
|
+
enabled: true
|
|
146
|
+
safe: true
|
|
147
|
+
parameters:
|
|
148
|
+
- name: client_reference_id
|
|
149
|
+
in: query
|
|
150
|
+
required: false
|
|
151
|
+
schema:
|
|
152
|
+
type: string
|
|
153
|
+
maxLength: 255
|
|
154
|
+
- name: expand_customer
|
|
155
|
+
in: query
|
|
156
|
+
required: false
|
|
157
|
+
schema:
|
|
158
|
+
type: string
|
|
159
|
+
enum: ["true", "false"]
|
|
160
|
+
- name: expand_payment_intent
|
|
161
|
+
in: query
|
|
162
|
+
required: false
|
|
163
|
+
schema:
|
|
164
|
+
type: string
|
|
165
|
+
enum: ["true", "false"]
|
|
166
|
+
- name: limit
|
|
167
|
+
in: query
|
|
168
|
+
required: false
|
|
169
|
+
schema:
|
|
170
|
+
type: integer
|
|
171
|
+
minimum: 1
|
|
172
|
+
maximum: 100
|
|
173
|
+
- name: starting_after
|
|
174
|
+
in: query
|
|
175
|
+
required: false
|
|
176
|
+
schema:
|
|
177
|
+
type: string
|
|
178
|
+
x-emulates-resource-ref:
|
|
179
|
+
type: checkout_session
|
|
180
|
+
missing: fcs_00000000000000000000000000
|
|
181
|
+
responses:
|
|
182
|
+
"200":
|
|
183
|
+
description: Sessions, newest first
|
|
184
|
+
content:
|
|
185
|
+
application/json:
|
|
186
|
+
schema:
|
|
187
|
+
$ref: "#/components/schemas/CheckoutSessionList"
|
|
188
|
+
"400":
|
|
189
|
+
$ref: "#/components/responses/Error"
|
|
190
|
+
"401":
|
|
191
|
+
$ref: "#/components/responses/Error"
|
|
192
|
+
post:
|
|
193
|
+
operationId: CreateCheckoutSession
|
|
194
|
+
x-emulates:
|
|
195
|
+
supported: true
|
|
196
|
+
parity:
|
|
197
|
+
enabled: true
|
|
198
|
+
safe: false
|
|
199
|
+
parameters:
|
|
200
|
+
- name: Idempotency-Key
|
|
201
|
+
in: header
|
|
202
|
+
required: false
|
|
203
|
+
schema:
|
|
204
|
+
type: string
|
|
205
|
+
minLength: 1
|
|
206
|
+
maxLength: 255
|
|
207
|
+
pattern: "^[A-Za-z0-9:_.-]+$"
|
|
208
|
+
requestBody:
|
|
209
|
+
required: true
|
|
210
|
+
content:
|
|
211
|
+
application/json:
|
|
212
|
+
schema:
|
|
213
|
+
$ref: "#/components/schemas/CreateCheckoutSessionBody"
|
|
214
|
+
responses:
|
|
215
|
+
"200":
|
|
216
|
+
description: >-
|
|
217
|
+
The created session. Off-session mode charges the saved payment method before
|
|
218
|
+
answering, so the session is already complete (or its payment intent failed).
|
|
219
|
+
content:
|
|
220
|
+
application/json:
|
|
221
|
+
schema:
|
|
222
|
+
$ref: "#/components/schemas/CheckoutSessionEnvelope"
|
|
223
|
+
"400":
|
|
224
|
+
$ref: "#/components/responses/Error"
|
|
225
|
+
"401":
|
|
226
|
+
$ref: "#/components/responses/Error"
|
|
227
|
+
"409":
|
|
228
|
+
$ref: "#/components/responses/Error"
|
|
229
|
+
"500":
|
|
230
|
+
$ref: "#/components/responses/Error"
|
|
231
|
+
/v1/checkout/sessions/{sessionId}:
|
|
232
|
+
parameters:
|
|
233
|
+
- name: sessionId
|
|
234
|
+
in: path
|
|
235
|
+
required: true
|
|
236
|
+
schema:
|
|
237
|
+
type: string
|
|
238
|
+
x-emulates-resource-ref:
|
|
239
|
+
type: checkout_session
|
|
240
|
+
missing: fcs_00000000000000000000000000
|
|
241
|
+
get:
|
|
242
|
+
operationId: GetCheckoutSession
|
|
243
|
+
x-emulates:
|
|
244
|
+
supported: true
|
|
245
|
+
parity:
|
|
246
|
+
enabled: true
|
|
247
|
+
safe: true
|
|
248
|
+
parameters:
|
|
249
|
+
- name: expand_customer
|
|
250
|
+
in: query
|
|
251
|
+
required: false
|
|
252
|
+
schema:
|
|
253
|
+
type: string
|
|
254
|
+
enum: ["true", "false"]
|
|
255
|
+
- name: expand_payment_intent
|
|
256
|
+
in: query
|
|
257
|
+
required: false
|
|
258
|
+
schema:
|
|
259
|
+
type: string
|
|
260
|
+
enum: ["true", "false"]
|
|
261
|
+
responses:
|
|
262
|
+
"200":
|
|
263
|
+
description: The session
|
|
264
|
+
content:
|
|
265
|
+
application/json:
|
|
266
|
+
schema:
|
|
267
|
+
$ref: "#/components/schemas/CheckoutSessionEnvelope"
|
|
268
|
+
"401":
|
|
269
|
+
$ref: "#/components/responses/Error"
|
|
270
|
+
"404":
|
|
271
|
+
$ref: "#/components/responses/Error"
|
|
272
|
+
/v1/checkout/sessions/{sessionId}/refund:
|
|
273
|
+
parameters:
|
|
274
|
+
- name: sessionId
|
|
275
|
+
in: path
|
|
276
|
+
required: true
|
|
277
|
+
schema:
|
|
278
|
+
type: string
|
|
279
|
+
x-emulates-resource-ref:
|
|
280
|
+
type: checkout_session
|
|
281
|
+
missing: fcs_00000000000000000000000000
|
|
282
|
+
post:
|
|
283
|
+
operationId: RefundCheckoutSession
|
|
284
|
+
x-emulates:
|
|
285
|
+
supported: true
|
|
286
|
+
parity:
|
|
287
|
+
enabled: true
|
|
288
|
+
safe: false
|
|
289
|
+
parameters:
|
|
290
|
+
- name: Idempotency-Key
|
|
291
|
+
in: header
|
|
292
|
+
required: false
|
|
293
|
+
schema:
|
|
294
|
+
type: string
|
|
295
|
+
minLength: 1
|
|
296
|
+
maxLength: 255
|
|
297
|
+
pattern: "^[A-Za-z0-9:_.-]+$"
|
|
298
|
+
requestBody:
|
|
299
|
+
required: true
|
|
300
|
+
content:
|
|
301
|
+
application/json:
|
|
302
|
+
schema:
|
|
303
|
+
$ref: "#/components/schemas/RefundCheckoutSessionBody"
|
|
304
|
+
responses:
|
|
305
|
+
"200":
|
|
306
|
+
description: The session with amount_refunded updated
|
|
307
|
+
content:
|
|
308
|
+
application/json:
|
|
309
|
+
schema:
|
|
310
|
+
$ref: "#/components/schemas/CheckoutSessionEnvelope"
|
|
311
|
+
"400":
|
|
312
|
+
$ref: "#/components/responses/Error"
|
|
313
|
+
"401":
|
|
314
|
+
$ref: "#/components/responses/Error"
|
|
315
|
+
"404":
|
|
316
|
+
$ref: "#/components/responses/Error"
|
|
317
|
+
"409":
|
|
318
|
+
$ref: "#/components/responses/Error"
|
|
319
|
+
/v1/customers:
|
|
320
|
+
post:
|
|
321
|
+
operationId: CreateCustomer
|
|
322
|
+
x-emulates:
|
|
323
|
+
supported: true
|
|
324
|
+
parity:
|
|
325
|
+
enabled: true
|
|
326
|
+
safe: false
|
|
327
|
+
parameters:
|
|
328
|
+
- name: Idempotency-Key
|
|
329
|
+
in: header
|
|
330
|
+
required: false
|
|
331
|
+
schema:
|
|
332
|
+
type: string
|
|
333
|
+
minLength: 1
|
|
334
|
+
maxLength: 255
|
|
335
|
+
pattern: "^[A-Za-z0-9:_.-]+$"
|
|
336
|
+
requestBody:
|
|
337
|
+
required: true
|
|
338
|
+
content:
|
|
339
|
+
application/json:
|
|
340
|
+
schema:
|
|
341
|
+
$ref: "#/components/schemas/CreateCustomerBody"
|
|
342
|
+
responses:
|
|
343
|
+
"200":
|
|
344
|
+
description: The created customer
|
|
345
|
+
content:
|
|
346
|
+
application/json:
|
|
347
|
+
schema:
|
|
348
|
+
$ref: "#/components/schemas/CustomerEnvelope"
|
|
349
|
+
"400":
|
|
350
|
+
$ref: "#/components/responses/Error"
|
|
351
|
+
"401":
|
|
352
|
+
$ref: "#/components/responses/Error"
|
|
353
|
+
"409":
|
|
354
|
+
$ref: "#/components/responses/Error"
|
|
355
|
+
/v1/setup_intents/{setupIntentId}:
|
|
356
|
+
parameters:
|
|
357
|
+
- name: setupIntentId
|
|
358
|
+
in: path
|
|
359
|
+
required: true
|
|
360
|
+
schema:
|
|
361
|
+
type: string
|
|
362
|
+
x-emulates-resource-ref:
|
|
363
|
+
type: setup_intent
|
|
364
|
+
missing: fseti_00000000000000000000000000
|
|
365
|
+
get:
|
|
366
|
+
operationId: GetSetupIntent
|
|
367
|
+
x-emulates:
|
|
368
|
+
supported: true
|
|
369
|
+
parity:
|
|
370
|
+
enabled: true
|
|
371
|
+
safe: true
|
|
372
|
+
parameters:
|
|
373
|
+
- name: expand
|
|
374
|
+
in: query
|
|
375
|
+
required: false
|
|
376
|
+
description: Comma-separated fields to expand (customer, payment_method).
|
|
377
|
+
schema:
|
|
378
|
+
type: string
|
|
379
|
+
enum: ["customer", "payment_method", "customer,payment_method"]
|
|
380
|
+
responses:
|
|
381
|
+
"200":
|
|
382
|
+
description: The setup intent
|
|
383
|
+
content:
|
|
384
|
+
application/json:
|
|
385
|
+
schema:
|
|
386
|
+
$ref: "#/components/schemas/SetupIntentEnvelope"
|
|
387
|
+
"401":
|
|
388
|
+
$ref: "#/components/responses/Error"
|
|
389
|
+
"404":
|
|
390
|
+
$ref: "#/components/responses/Error"
|
|
391
|
+
/v1/subscriptions/{subscriptionId}:
|
|
392
|
+
parameters:
|
|
393
|
+
- name: subscriptionId
|
|
394
|
+
in: path
|
|
395
|
+
required: true
|
|
396
|
+
schema:
|
|
397
|
+
type: string
|
|
398
|
+
x-emulates-resource-ref:
|
|
399
|
+
type: subscription
|
|
400
|
+
missing: fsub_00000000000000000000000000
|
|
401
|
+
get:
|
|
402
|
+
operationId: GetSubscription
|
|
403
|
+
x-emulates:
|
|
404
|
+
supported: true
|
|
405
|
+
parity:
|
|
406
|
+
enabled: true
|
|
407
|
+
safe: true
|
|
408
|
+
responses:
|
|
409
|
+
"200":
|
|
410
|
+
description: >-
|
|
411
|
+
The subscription a completed subscription-mode checkout session created.
|
|
412
|
+
content:
|
|
413
|
+
application/json:
|
|
414
|
+
schema:
|
|
415
|
+
$ref: "#/components/schemas/SubscriptionEnvelope"
|
|
416
|
+
"401":
|
|
417
|
+
$ref: "#/components/responses/Error"
|
|
418
|
+
"404":
|
|
419
|
+
$ref: "#/components/responses/Error"
|
|
420
|
+
/pay/{sessionId}:
|
|
421
|
+
parameters:
|
|
422
|
+
- name: sessionId
|
|
423
|
+
in: path
|
|
424
|
+
required: true
|
|
425
|
+
schema:
|
|
426
|
+
type: string
|
|
427
|
+
get:
|
|
428
|
+
operationId: HostedCheckoutPage
|
|
429
|
+
security: []
|
|
430
|
+
x-emulates:
|
|
431
|
+
supported: true
|
|
432
|
+
parity:
|
|
433
|
+
enabled: false
|
|
434
|
+
safe: true
|
|
435
|
+
reason: A browser-facing HTML page; covered by the acceptance suite, not by JSON walks.
|
|
436
|
+
responses:
|
|
437
|
+
"200":
|
|
438
|
+
description: The card form (or the letter-of-medical-necessity step)
|
|
439
|
+
content:
|
|
440
|
+
text/html:
|
|
441
|
+
schema:
|
|
442
|
+
type: string
|
|
443
|
+
"404":
|
|
444
|
+
description: Unknown session
|
|
445
|
+
content:
|
|
446
|
+
text/html:
|
|
447
|
+
schema:
|
|
448
|
+
type: string
|
|
449
|
+
"409":
|
|
450
|
+
description: The session is no longer payable
|
|
451
|
+
content:
|
|
452
|
+
text/html:
|
|
453
|
+
schema:
|
|
454
|
+
type: string
|
|
455
|
+
post:
|
|
456
|
+
operationId: SubmitHostedCheckout
|
|
457
|
+
security: []
|
|
458
|
+
x-emulates:
|
|
459
|
+
supported: true
|
|
460
|
+
parity:
|
|
461
|
+
enabled: false
|
|
462
|
+
safe: false
|
|
463
|
+
reason: A browser form post; covered by the acceptance suite.
|
|
464
|
+
requestBody:
|
|
465
|
+
required: true
|
|
466
|
+
content:
|
|
467
|
+
application/x-www-form-urlencoded:
|
|
468
|
+
schema:
|
|
469
|
+
type: object
|
|
470
|
+
properties:
|
|
471
|
+
step:
|
|
472
|
+
type: string
|
|
473
|
+
enum: [card, lmn]
|
|
474
|
+
cardNumber:
|
|
475
|
+
type: string
|
|
476
|
+
expiry:
|
|
477
|
+
type: string
|
|
478
|
+
cvc:
|
|
479
|
+
type: string
|
|
480
|
+
postalCode:
|
|
481
|
+
type: string
|
|
482
|
+
email:
|
|
483
|
+
type: string
|
|
484
|
+
firstName:
|
|
485
|
+
type: string
|
|
486
|
+
lastName:
|
|
487
|
+
type: string
|
|
488
|
+
phone:
|
|
489
|
+
type: string
|
|
490
|
+
responses:
|
|
491
|
+
"302":
|
|
492
|
+
description: Paid; redirects to success_url (or to the next action's page)
|
|
493
|
+
"400":
|
|
494
|
+
description: The card form is incomplete or the card number is invalid
|
|
495
|
+
content:
|
|
496
|
+
text/html:
|
|
497
|
+
schema:
|
|
498
|
+
type: string
|
|
499
|
+
"402":
|
|
500
|
+
description: The card was declined
|
|
501
|
+
content:
|
|
502
|
+
text/html:
|
|
503
|
+
schema:
|
|
504
|
+
type: string
|
|
505
|
+
"404":
|
|
506
|
+
description: Unknown session
|
|
507
|
+
content:
|
|
508
|
+
text/html:
|
|
509
|
+
schema:
|
|
510
|
+
type: string
|
|
511
|
+
"409":
|
|
512
|
+
description: The session is no longer payable
|
|
513
|
+
content:
|
|
514
|
+
text/html:
|
|
515
|
+
schema:
|
|
516
|
+
type: string
|
|
517
|
+
/pay/{sessionId}/cancel:
|
|
518
|
+
parameters:
|
|
519
|
+
- name: sessionId
|
|
520
|
+
in: path
|
|
521
|
+
required: true
|
|
522
|
+
schema:
|
|
523
|
+
type: string
|
|
524
|
+
get:
|
|
525
|
+
operationId: CancelHostedCheckout
|
|
526
|
+
security: []
|
|
527
|
+
x-emulates:
|
|
528
|
+
supported: true
|
|
529
|
+
parity:
|
|
530
|
+
enabled: false
|
|
531
|
+
safe: true
|
|
532
|
+
reason: A browser navigation to cancel_url; covered by the acceptance suite.
|
|
533
|
+
responses:
|
|
534
|
+
"302":
|
|
535
|
+
description: Redirects to cancel_url; the session stays open
|
|
536
|
+
"404":
|
|
537
|
+
description: Unknown session
|
|
538
|
+
content:
|
|
539
|
+
text/html:
|
|
540
|
+
schema:
|
|
541
|
+
type: string
|
|
542
|
+
components:
|
|
543
|
+
securitySchemes:
|
|
544
|
+
bearerAuth:
|
|
545
|
+
type: http
|
|
546
|
+
scheme: bearer
|
|
547
|
+
description: A secret key, `fsk_test_…` (test mode) or `fsk_…` (live mode).
|
|
548
|
+
responses:
|
|
549
|
+
Error:
|
|
550
|
+
description: An error
|
|
551
|
+
content:
|
|
552
|
+
application/json:
|
|
553
|
+
schema:
|
|
554
|
+
$ref: "#/components/schemas/ErrorBody"
|
|
555
|
+
schemas:
|
|
556
|
+
ErrorBody:
|
|
557
|
+
type: object
|
|
558
|
+
required: [error]
|
|
559
|
+
properties:
|
|
560
|
+
error:
|
|
561
|
+
type: object
|
|
562
|
+
required: [type, message]
|
|
563
|
+
properties:
|
|
564
|
+
type:
|
|
565
|
+
type: string
|
|
566
|
+
enum:
|
|
567
|
+
- invalid_request_error
|
|
568
|
+
- authentication_error
|
|
569
|
+
- idempotency_error
|
|
570
|
+
- api_error
|
|
571
|
+
- card_error
|
|
572
|
+
code:
|
|
573
|
+
type: string
|
|
574
|
+
message:
|
|
575
|
+
type: string
|
|
576
|
+
param:
|
|
577
|
+
type: string
|
|
578
|
+
StringMap:
|
|
579
|
+
type: object
|
|
580
|
+
maxProperties: 50
|
|
581
|
+
additionalProperties:
|
|
582
|
+
type: string
|
|
583
|
+
maxLength: 500
|
|
584
|
+
Product:
|
|
585
|
+
type: object
|
|
586
|
+
required: [product_id, name, active, test_mode, created_at]
|
|
587
|
+
properties:
|
|
588
|
+
product_id:
|
|
589
|
+
type: string
|
|
590
|
+
x-emulates-resource:
|
|
591
|
+
type: product
|
|
592
|
+
identity: true
|
|
593
|
+
x-emulates-volatile:
|
|
594
|
+
kind: id
|
|
595
|
+
name:
|
|
596
|
+
type: string
|
|
597
|
+
description:
|
|
598
|
+
type: ["string", "null"]
|
|
599
|
+
url:
|
|
600
|
+
type: ["string", "null"]
|
|
601
|
+
client_reference_id:
|
|
602
|
+
type: ["string", "null"]
|
|
603
|
+
hsa_fsa_eligibility:
|
|
604
|
+
description: >-
|
|
605
|
+
not_eligible, auto_substantiation, private_label, letter_of_medical_necessity,
|
|
606
|
+
prescription, vision or service; null until Flex classifies a new product.
|
|
607
|
+
type: ["string", "null"]
|
|
608
|
+
visit_type:
|
|
609
|
+
type: ["string", "null"]
|
|
610
|
+
active:
|
|
611
|
+
type: boolean
|
|
612
|
+
test_mode:
|
|
613
|
+
type: boolean
|
|
614
|
+
metadata:
|
|
615
|
+
type: ["object", "null"]
|
|
616
|
+
additionalProperties:
|
|
617
|
+
type: string
|
|
618
|
+
created_at:
|
|
619
|
+
type: string
|
|
620
|
+
x-emulates-volatile:
|
|
621
|
+
kind: timestamp
|
|
622
|
+
ProductEnvelope:
|
|
623
|
+
type: object
|
|
624
|
+
required: [product]
|
|
625
|
+
properties:
|
|
626
|
+
product:
|
|
627
|
+
$ref: "#/components/schemas/Product"
|
|
628
|
+
ProductList:
|
|
629
|
+
type: object
|
|
630
|
+
required: [products, has_more]
|
|
631
|
+
properties:
|
|
632
|
+
products:
|
|
633
|
+
type: array
|
|
634
|
+
items:
|
|
635
|
+
$ref: "#/components/schemas/Product"
|
|
636
|
+
has_more:
|
|
637
|
+
type: boolean
|
|
638
|
+
CreateProductBody:
|
|
639
|
+
type: object
|
|
640
|
+
required: [product]
|
|
641
|
+
properties:
|
|
642
|
+
product:
|
|
643
|
+
type: object
|
|
644
|
+
required: [name]
|
|
645
|
+
properties:
|
|
646
|
+
name:
|
|
647
|
+
type: string
|
|
648
|
+
minLength: 1
|
|
649
|
+
maxLength: 250
|
|
650
|
+
description:
|
|
651
|
+
type: string
|
|
652
|
+
maxLength: 1000
|
|
653
|
+
url:
|
|
654
|
+
type: string
|
|
655
|
+
maxLength: 2048
|
|
656
|
+
client_reference_id:
|
|
657
|
+
type: string
|
|
658
|
+
minLength: 1
|
|
659
|
+
maxLength: 255
|
|
660
|
+
metadata:
|
|
661
|
+
$ref: "#/components/schemas/StringMap"
|
|
662
|
+
UpdateProductBody:
|
|
663
|
+
type: object
|
|
664
|
+
required: [product]
|
|
665
|
+
properties:
|
|
666
|
+
product:
|
|
667
|
+
type: object
|
|
668
|
+
properties:
|
|
669
|
+
active:
|
|
670
|
+
type: boolean
|
|
671
|
+
name:
|
|
672
|
+
type: string
|
|
673
|
+
minLength: 1
|
|
674
|
+
maxLength: 250
|
|
675
|
+
description:
|
|
676
|
+
type: string
|
|
677
|
+
maxLength: 1000
|
|
678
|
+
url:
|
|
679
|
+
type: string
|
|
680
|
+
maxLength: 2048
|
|
681
|
+
metadata:
|
|
682
|
+
$ref: "#/components/schemas/StringMap"
|
|
683
|
+
LineItem:
|
|
684
|
+
type: object
|
|
685
|
+
required: [price_data, quantity]
|
|
686
|
+
properties:
|
|
687
|
+
price_data:
|
|
688
|
+
type: object
|
|
689
|
+
required: [product, unit_amount]
|
|
690
|
+
properties:
|
|
691
|
+
product:
|
|
692
|
+
type: string
|
|
693
|
+
x-emulates-resource-ref:
|
|
694
|
+
type: product
|
|
695
|
+
missing: fprod_00000000000000000000000000
|
|
696
|
+
unit_amount:
|
|
697
|
+
type: integer
|
|
698
|
+
minimum: 0
|
|
699
|
+
maximum: 10000000
|
|
700
|
+
recurring:
|
|
701
|
+
$ref: "#/components/schemas/Recurring"
|
|
702
|
+
quantity:
|
|
703
|
+
type: integer
|
|
704
|
+
minimum: 1
|
|
705
|
+
maximum: 100
|
|
706
|
+
Recurring:
|
|
707
|
+
type: object
|
|
708
|
+
description: >-
|
|
709
|
+
Makes the line item's price recurring; a subscription-mode session needs at least one.
|
|
710
|
+
required: [interval]
|
|
711
|
+
properties:
|
|
712
|
+
interval:
|
|
713
|
+
type: string
|
|
714
|
+
enum: [day, week, month, year]
|
|
715
|
+
interval_count:
|
|
716
|
+
type: integer
|
|
717
|
+
minimum: 1
|
|
718
|
+
maximum: 12
|
|
719
|
+
SubscriptionData:
|
|
720
|
+
type: object
|
|
721
|
+
properties:
|
|
722
|
+
cancel_at_period_end:
|
|
723
|
+
type: boolean
|
|
724
|
+
metadata:
|
|
725
|
+
$ref: "#/components/schemas/StringMap"
|
|
726
|
+
CreateCheckoutSessionBody:
|
|
727
|
+
type: object
|
|
728
|
+
required: [checkout_session]
|
|
729
|
+
properties:
|
|
730
|
+
checkout_session:
|
|
731
|
+
type: object
|
|
732
|
+
required: [success_url, line_items]
|
|
733
|
+
properties:
|
|
734
|
+
allow_promotion_codes:
|
|
735
|
+
type: boolean
|
|
736
|
+
capture_method:
|
|
737
|
+
type: string
|
|
738
|
+
enum: [automatic]
|
|
739
|
+
cancel_url:
|
|
740
|
+
type: string
|
|
741
|
+
minLength: 1
|
|
742
|
+
maxLength: 2048
|
|
743
|
+
success_url:
|
|
744
|
+
type: string
|
|
745
|
+
minLength: 1
|
|
746
|
+
maxLength: 2048
|
|
747
|
+
client_reference_id:
|
|
748
|
+
type: string
|
|
749
|
+
minLength: 1
|
|
750
|
+
maxLength: 255
|
|
751
|
+
line_items:
|
|
752
|
+
type: array
|
|
753
|
+
maxItems: 20
|
|
754
|
+
items:
|
|
755
|
+
$ref: "#/components/schemas/LineItem"
|
|
756
|
+
metadata:
|
|
757
|
+
$ref: "#/components/schemas/StringMap"
|
|
758
|
+
mode:
|
|
759
|
+
type: string
|
|
760
|
+
enum: [payment, subscription, off_session, setup]
|
|
761
|
+
subscription_data:
|
|
762
|
+
$ref: "#/components/schemas/SubscriptionData"
|
|
763
|
+
payment_method:
|
|
764
|
+
type: string
|
|
765
|
+
maxLength: 255
|
|
766
|
+
customer:
|
|
767
|
+
type: string
|
|
768
|
+
x-emulates-resource-ref:
|
|
769
|
+
type: customer
|
|
770
|
+
missing: fcus_00000000000000000000000000
|
|
771
|
+
setup_future_use:
|
|
772
|
+
type: string
|
|
773
|
+
enum: [off_session]
|
|
774
|
+
RefundCheckoutSessionBody:
|
|
775
|
+
type: object
|
|
776
|
+
required: [checkout_session]
|
|
777
|
+
properties:
|
|
778
|
+
checkout_session:
|
|
779
|
+
type: object
|
|
780
|
+
properties:
|
|
781
|
+
amount:
|
|
782
|
+
type: integer
|
|
783
|
+
minimum: 1
|
|
784
|
+
maximum: 10000000
|
|
785
|
+
CreateCustomerBody:
|
|
786
|
+
type: object
|
|
787
|
+
required: [customer]
|
|
788
|
+
properties:
|
|
789
|
+
customer:
|
|
790
|
+
type: object
|
|
791
|
+
required: [first_name, last_name, email, phone]
|
|
792
|
+
properties:
|
|
793
|
+
first_name:
|
|
794
|
+
type: string
|
|
795
|
+
minLength: 1
|
|
796
|
+
maxLength: 100
|
|
797
|
+
last_name:
|
|
798
|
+
type: string
|
|
799
|
+
minLength: 1
|
|
800
|
+
maxLength: 100
|
|
801
|
+
email:
|
|
802
|
+
type: string
|
|
803
|
+
format: email
|
|
804
|
+
maxLength: 254
|
|
805
|
+
phone:
|
|
806
|
+
type: string
|
|
807
|
+
minLength: 1
|
|
808
|
+
maxLength: 32
|
|
809
|
+
Customer:
|
|
810
|
+
type: object
|
|
811
|
+
required: [customer_id, test_mode, created_at]
|
|
812
|
+
properties:
|
|
813
|
+
customer_id:
|
|
814
|
+
type: string
|
|
815
|
+
x-emulates-resource:
|
|
816
|
+
type: customer
|
|
817
|
+
identity: true
|
|
818
|
+
x-emulates-volatile:
|
|
819
|
+
kind: id
|
|
820
|
+
first_name:
|
|
821
|
+
type: ["string", "null"]
|
|
822
|
+
last_name:
|
|
823
|
+
type: ["string", "null"]
|
|
824
|
+
email:
|
|
825
|
+
type: ["string", "null"]
|
|
826
|
+
phone:
|
|
827
|
+
type: ["string", "null"]
|
|
828
|
+
test_mode:
|
|
829
|
+
type: boolean
|
|
830
|
+
created_at:
|
|
831
|
+
type: string
|
|
832
|
+
x-emulates-volatile:
|
|
833
|
+
kind: timestamp
|
|
834
|
+
CustomerEnvelope:
|
|
835
|
+
type: object
|
|
836
|
+
required: [customer]
|
|
837
|
+
properties:
|
|
838
|
+
customer:
|
|
839
|
+
$ref: "#/components/schemas/Customer"
|
|
840
|
+
PaymentMethod:
|
|
841
|
+
type: object
|
|
842
|
+
required: [payment_method_id, type]
|
|
843
|
+
properties:
|
|
844
|
+
payment_method_id:
|
|
845
|
+
type: string
|
|
846
|
+
x-emulates-volatile:
|
|
847
|
+
kind: id
|
|
848
|
+
type:
|
|
849
|
+
type: string
|
|
850
|
+
enum: [card]
|
|
851
|
+
hsa_fsa:
|
|
852
|
+
type: boolean
|
|
853
|
+
customer:
|
|
854
|
+
type: ["string", "null"]
|
|
855
|
+
x-emulates-volatile:
|
|
856
|
+
kind: id
|
|
857
|
+
PaymentIntent:
|
|
858
|
+
type: object
|
|
859
|
+
required: [payment_intent_id, amount, status]
|
|
860
|
+
properties:
|
|
861
|
+
payment_intent_id:
|
|
862
|
+
type: string
|
|
863
|
+
x-emulates-volatile:
|
|
864
|
+
kind: id
|
|
865
|
+
amount:
|
|
866
|
+
type: integer
|
|
867
|
+
amount_received:
|
|
868
|
+
type: ["integer", "null"]
|
|
869
|
+
customer:
|
|
870
|
+
type: ["string", "null"]
|
|
871
|
+
x-emulates-volatile:
|
|
872
|
+
kind: id
|
|
873
|
+
payment_method:
|
|
874
|
+
type: ["string", "null"]
|
|
875
|
+
x-emulates-volatile:
|
|
876
|
+
kind: id
|
|
877
|
+
status:
|
|
878
|
+
type: string
|
|
879
|
+
enum:
|
|
880
|
+
- requires_payment_method
|
|
881
|
+
- requires_action
|
|
882
|
+
- processing
|
|
883
|
+
- succeeded
|
|
884
|
+
- canceled
|
|
885
|
+
created_at:
|
|
886
|
+
type: string
|
|
887
|
+
x-emulates-volatile:
|
|
888
|
+
kind: timestamp
|
|
889
|
+
SetupIntent:
|
|
890
|
+
type: object
|
|
891
|
+
required: [setup_intent_id, status]
|
|
892
|
+
properties:
|
|
893
|
+
setup_intent_id:
|
|
894
|
+
type: string
|
|
895
|
+
x-emulates-volatile:
|
|
896
|
+
kind: id
|
|
897
|
+
status:
|
|
898
|
+
type: string
|
|
899
|
+
enum: [requires_payment_method, requires_action, processing, succeeded, canceled]
|
|
900
|
+
customer:
|
|
901
|
+
anyOf:
|
|
902
|
+
- type: string
|
|
903
|
+
- $ref: "#/components/schemas/Customer"
|
|
904
|
+
- type: "null"
|
|
905
|
+
payment_method:
|
|
906
|
+
anyOf:
|
|
907
|
+
- type: string
|
|
908
|
+
- $ref: "#/components/schemas/PaymentMethod"
|
|
909
|
+
- type: "null"
|
|
910
|
+
created_at:
|
|
911
|
+
type: string
|
|
912
|
+
x-emulates-volatile:
|
|
913
|
+
kind: timestamp
|
|
914
|
+
SetupIntentEnvelope:
|
|
915
|
+
type: object
|
|
916
|
+
required: [setup_intent]
|
|
917
|
+
properties:
|
|
918
|
+
setup_intent:
|
|
919
|
+
$ref: "#/components/schemas/SetupIntent"
|
|
920
|
+
NextAction:
|
|
921
|
+
type: object
|
|
922
|
+
required: [type]
|
|
923
|
+
properties:
|
|
924
|
+
type:
|
|
925
|
+
type: string
|
|
926
|
+
enum:
|
|
927
|
+
- collect_letter_of_medical_necessity
|
|
928
|
+
- provide_second_payment_method
|
|
929
|
+
- provide_alternative_payment_method
|
|
930
|
+
- payment_failed
|
|
931
|
+
collect_letter_of_medical_necessity:
|
|
932
|
+
type: object
|
|
933
|
+
required: [url]
|
|
934
|
+
properties:
|
|
935
|
+
url:
|
|
936
|
+
type: string
|
|
937
|
+
x-emulates-volatile:
|
|
938
|
+
kind: url
|
|
939
|
+
provide_second_payment_method:
|
|
940
|
+
type: object
|
|
941
|
+
required: [url]
|
|
942
|
+
properties:
|
|
943
|
+
url:
|
|
944
|
+
type: string
|
|
945
|
+
x-emulates-volatile:
|
|
946
|
+
kind: url
|
|
947
|
+
provide_alternative_payment_method:
|
|
948
|
+
type: object
|
|
949
|
+
required: [url]
|
|
950
|
+
properties:
|
|
951
|
+
url:
|
|
952
|
+
type: string
|
|
953
|
+
x-emulates-volatile:
|
|
954
|
+
kind: url
|
|
955
|
+
payment_failed:
|
|
956
|
+
type: object
|
|
957
|
+
ResponseLineItem:
|
|
958
|
+
type: object
|
|
959
|
+
required: [price_data, quantity, amount_total]
|
|
960
|
+
properties:
|
|
961
|
+
price_data:
|
|
962
|
+
type: object
|
|
963
|
+
required: [product, unit_amount]
|
|
964
|
+
properties:
|
|
965
|
+
product:
|
|
966
|
+
type: string
|
|
967
|
+
x-emulates-volatile:
|
|
968
|
+
kind: id
|
|
969
|
+
unit_amount:
|
|
970
|
+
type: integer
|
|
971
|
+
recurring:
|
|
972
|
+
anyOf:
|
|
973
|
+
- $ref: "#/components/schemas/Recurring"
|
|
974
|
+
- type: "null"
|
|
975
|
+
quantity:
|
|
976
|
+
type: integer
|
|
977
|
+
amount_total:
|
|
978
|
+
type: integer
|
|
979
|
+
CheckoutSession:
|
|
980
|
+
type: object
|
|
981
|
+
required:
|
|
982
|
+
- checkout_session_id
|
|
983
|
+
- amount_total
|
|
984
|
+
- status
|
|
985
|
+
- mode
|
|
986
|
+
- redirect_url
|
|
987
|
+
- url
|
|
988
|
+
- test_mode
|
|
989
|
+
- created_at
|
|
990
|
+
properties:
|
|
991
|
+
checkout_session_id:
|
|
992
|
+
type: string
|
|
993
|
+
x-emulates-resource:
|
|
994
|
+
type: checkout_session
|
|
995
|
+
identity: true
|
|
996
|
+
x-emulates-volatile:
|
|
997
|
+
kind: id
|
|
998
|
+
client_reference_id:
|
|
999
|
+
type: ["string", "null"]
|
|
1000
|
+
amount_total:
|
|
1001
|
+
type: integer
|
|
1002
|
+
minimum: 0
|
|
1003
|
+
amount_received:
|
|
1004
|
+
type: ["integer", "null"]
|
|
1005
|
+
amount_refunded:
|
|
1006
|
+
type: integer
|
|
1007
|
+
minimum: 0
|
|
1008
|
+
customer:
|
|
1009
|
+
anyOf:
|
|
1010
|
+
- type: string
|
|
1011
|
+
x-emulates-volatile:
|
|
1012
|
+
kind: id
|
|
1013
|
+
- $ref: "#/components/schemas/Customer"
|
|
1014
|
+
- type: "null"
|
|
1015
|
+
payment_intent:
|
|
1016
|
+
anyOf:
|
|
1017
|
+
- type: string
|
|
1018
|
+
x-emulates-volatile:
|
|
1019
|
+
kind: id
|
|
1020
|
+
- $ref: "#/components/schemas/PaymentIntent"
|
|
1021
|
+
- type: "null"
|
|
1022
|
+
setup_intent:
|
|
1023
|
+
type: ["string", "null"]
|
|
1024
|
+
x-emulates-resource:
|
|
1025
|
+
type: setup_intent
|
|
1026
|
+
identity: true
|
|
1027
|
+
x-emulates-volatile:
|
|
1028
|
+
kind: id
|
|
1029
|
+
mode:
|
|
1030
|
+
type: string
|
|
1031
|
+
enum: [payment, subscription, off_session, setup]
|
|
1032
|
+
subscription:
|
|
1033
|
+
type: ["string", "null"]
|
|
1034
|
+
x-emulates-volatile:
|
|
1035
|
+
kind: id
|
|
1036
|
+
subscription_data:
|
|
1037
|
+
anyOf:
|
|
1038
|
+
- $ref: "#/components/schemas/SubscriptionData"
|
|
1039
|
+
- type: "null"
|
|
1040
|
+
status:
|
|
1041
|
+
type: string
|
|
1042
|
+
enum: [open, paid, complete, canceled, expired]
|
|
1043
|
+
redirect_url:
|
|
1044
|
+
type: string
|
|
1045
|
+
x-emulates-volatile:
|
|
1046
|
+
kind: url
|
|
1047
|
+
url:
|
|
1048
|
+
type: string
|
|
1049
|
+
x-emulates-volatile:
|
|
1050
|
+
kind: url
|
|
1051
|
+
success_url:
|
|
1052
|
+
type: string
|
|
1053
|
+
cancel_url:
|
|
1054
|
+
type: ["string", "null"]
|
|
1055
|
+
next_action:
|
|
1056
|
+
anyOf:
|
|
1057
|
+
- $ref: "#/components/schemas/NextAction"
|
|
1058
|
+
- type: "null"
|
|
1059
|
+
visit_type:
|
|
1060
|
+
type: ["string", "null"]
|
|
1061
|
+
metadata:
|
|
1062
|
+
type: ["object", "null"]
|
|
1063
|
+
additionalProperties:
|
|
1064
|
+
type: string
|
|
1065
|
+
line_items:
|
|
1066
|
+
type: array
|
|
1067
|
+
items:
|
|
1068
|
+
$ref: "#/components/schemas/ResponseLineItem"
|
|
1069
|
+
allow_promotion_codes:
|
|
1070
|
+
type: boolean
|
|
1071
|
+
capture_method:
|
|
1072
|
+
type: string
|
|
1073
|
+
setup_future_use:
|
|
1074
|
+
type: ["string", "null"]
|
|
1075
|
+
test_mode:
|
|
1076
|
+
type: boolean
|
|
1077
|
+
created_at:
|
|
1078
|
+
type: string
|
|
1079
|
+
x-emulates-volatile:
|
|
1080
|
+
kind: timestamp
|
|
1081
|
+
expires_at:
|
|
1082
|
+
type: string
|
|
1083
|
+
x-emulates-volatile:
|
|
1084
|
+
kind: timestamp
|
|
1085
|
+
CheckoutSessionEnvelope:
|
|
1086
|
+
type: object
|
|
1087
|
+
required: [checkout_session]
|
|
1088
|
+
properties:
|
|
1089
|
+
checkout_session:
|
|
1090
|
+
$ref: "#/components/schemas/CheckoutSession"
|
|
1091
|
+
CheckoutSessionList:
|
|
1092
|
+
type: object
|
|
1093
|
+
required: [checkout_sessions, has_more]
|
|
1094
|
+
properties:
|
|
1095
|
+
checkout_sessions:
|
|
1096
|
+
type: array
|
|
1097
|
+
items:
|
|
1098
|
+
$ref: "#/components/schemas/CheckoutSession"
|
|
1099
|
+
has_more:
|
|
1100
|
+
type: boolean
|
|
1101
|
+
SubscriptionItem:
|
|
1102
|
+
type: object
|
|
1103
|
+
required: [price_data, quantity]
|
|
1104
|
+
properties:
|
|
1105
|
+
price_data:
|
|
1106
|
+
type: object
|
|
1107
|
+
required: [product, unit_amount, recurring]
|
|
1108
|
+
properties:
|
|
1109
|
+
product:
|
|
1110
|
+
type: string
|
|
1111
|
+
x-emulates-volatile:
|
|
1112
|
+
kind: id
|
|
1113
|
+
unit_amount:
|
|
1114
|
+
type: integer
|
|
1115
|
+
recurring:
|
|
1116
|
+
$ref: "#/components/schemas/Recurring"
|
|
1117
|
+
quantity:
|
|
1118
|
+
type: integer
|
|
1119
|
+
Subscription:
|
|
1120
|
+
type: object
|
|
1121
|
+
required: [subscription_id, created_at, items, status, cancel_at_period_end, test_mode]
|
|
1122
|
+
properties:
|
|
1123
|
+
subscription_id:
|
|
1124
|
+
type: string
|
|
1125
|
+
x-emulates-resource:
|
|
1126
|
+
type: subscription
|
|
1127
|
+
identity: true
|
|
1128
|
+
x-emulates-volatile:
|
|
1129
|
+
kind: id
|
|
1130
|
+
status:
|
|
1131
|
+
type: string
|
|
1132
|
+
enum:
|
|
1133
|
+
- incomplete
|
|
1134
|
+
- incomplete_expired
|
|
1135
|
+
- trialing
|
|
1136
|
+
- active
|
|
1137
|
+
- past_due
|
|
1138
|
+
- canceled
|
|
1139
|
+
- unpaid
|
|
1140
|
+
- paused
|
|
1141
|
+
items:
|
|
1142
|
+
type: array
|
|
1143
|
+
items:
|
|
1144
|
+
$ref: "#/components/schemas/SubscriptionItem"
|
|
1145
|
+
customer:
|
|
1146
|
+
type: ["string", "null"]
|
|
1147
|
+
x-emulates-volatile:
|
|
1148
|
+
kind: id
|
|
1149
|
+
default_payment_method:
|
|
1150
|
+
type: ["string", "null"]
|
|
1151
|
+
x-emulates-volatile:
|
|
1152
|
+
kind: id
|
|
1153
|
+
cancel_at_period_end:
|
|
1154
|
+
type: boolean
|
|
1155
|
+
current_period_start:
|
|
1156
|
+
type: string
|
|
1157
|
+
x-emulates-volatile:
|
|
1158
|
+
kind: timestamp
|
|
1159
|
+
current_period_end:
|
|
1160
|
+
type: string
|
|
1161
|
+
x-emulates-volatile:
|
|
1162
|
+
kind: timestamp
|
|
1163
|
+
canceled_at:
|
|
1164
|
+
type: ["string", "null"]
|
|
1165
|
+
metadata:
|
|
1166
|
+
type: ["object", "null"]
|
|
1167
|
+
additionalProperties:
|
|
1168
|
+
type: string
|
|
1169
|
+
test_mode:
|
|
1170
|
+
type: boolean
|
|
1171
|
+
created_at:
|
|
1172
|
+
type: string
|
|
1173
|
+
x-emulates-volatile:
|
|
1174
|
+
kind: timestamp
|
|
1175
|
+
SubscriptionEnvelope:
|
|
1176
|
+
type: object
|
|
1177
|
+
required: [subscription]
|
|
1178
|
+
properties:
|
|
1179
|
+
subscription:
|
|
1180
|
+
$ref: "#/components/schemas/Subscription"
|