askell-mcp 0.1.0

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.
@@ -0,0 +1,4951 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "Áskell API V2",
5
+ "description": "# Authentication\nAuthentication is via `Authorization` header. When using this documentation to test the API you should prepend your given api key with `\"Api-Key \"`. \n\nYou are given two types of API keys, one public and one secret. Your public key is safe to use in javascript so that it is public to the world. It can only \nbe used to generate a temporary payment method, which in turn has to be confirmed using your secret api key.\n\nSee [the documentation](https://docs.askell.is/) for more information.\n",
6
+ "termsOfService": "https://www.askell.is/terms-conditions",
7
+ "contact": {
8
+ "name": "Documentation",
9
+ "url": "https://docs.askell.is"
10
+ },
11
+ "version": "2.0.0"
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://askell.is/api/"
16
+ }
17
+ ],
18
+ "security": [
19
+ {
20
+ "Secret-Api-Key": []
21
+ },
22
+ {
23
+ "Public-Api-Key": []
24
+ }
25
+ ],
26
+ "tags": [
27
+ {
28
+ "name": "V2 Catalog",
29
+ "description": "Subscription V2 catalog product and price read APIs, requires secret api key."
30
+ },
31
+ {
32
+ "name": "V2 Bundles",
33
+ "description": "Subscription V2 bundle template and add-on discovery APIs, requires secret api key."
34
+ },
35
+ {
36
+ "name": "V2 Subscription Contracts",
37
+ "description": "Subscription V2 quote, contract creation, contract reads, restricted updates, and lifecycle APIs, requires secret api key."
38
+ },
39
+ {
40
+ "name": "V2 Customer Payment Methods",
41
+ "description": "Subscription V2 customer payment-method management APIs for card, claim, and invoice collection, requires secret api key."
42
+ },
43
+ {
44
+ "name": "V2 Entitlements",
45
+ "description": "Subscription V2 customer/product service entitlement access checks, requires secret api key."
46
+ },
47
+ {
48
+ "name": "V2 Checkouts",
49
+ "description": "Subscription V2 hosted checkout APIs, requires secret api key."
50
+ },
51
+ {
52
+ "name": "V2 Embedded Checkout Sessions",
53
+ "description": "Subscription V2 embedded checkout session APIs for seller backend integrations."
54
+ },
55
+ {
56
+ "name": "V2 Billing Runs",
57
+ "description": "Subscription V2 billing-run read and retry APIs, requires secret api key."
58
+ }
59
+ ],
60
+ "paths": {
61
+ "/v2/catalog/products/": {
62
+ "get": {
63
+ "tags": [
64
+ "V2 Catalog"
65
+ ],
66
+ "summary": "List V2 catalog products",
67
+ "description": "Lists catalog products for the authenticated account. Requires a secret key.",
68
+ "parameters": [
69
+ {
70
+ "$ref": "#/components/parameters/V2ActiveFilter"
71
+ },
72
+ {
73
+ "$ref": "#/components/parameters/V2ReferenceFilter"
74
+ },
75
+ {
76
+ "$ref": "#/components/parameters/PageSizeFilter"
77
+ }
78
+ ],
79
+ "responses": {
80
+ "200": {
81
+ "$ref": "#/components/responses/V2CatalogProductList"
82
+ },
83
+ "400": {
84
+ "$ref": "#/components/responses/V2ValidationError"
85
+ }
86
+ },
87
+ "security": [
88
+ {
89
+ "Secret-Api-Key": []
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ "/v2/catalog/products/{productId}/": {
95
+ "get": {
96
+ "tags": [
97
+ "V2 Catalog"
98
+ ],
99
+ "summary": "Get a V2 catalog product",
100
+ "description": "Returns a catalog product and its prices for the authenticated account. Requires a secret key.",
101
+ "parameters": [
102
+ {
103
+ "$ref": "#/components/parameters/V2ProductId"
104
+ },
105
+ {
106
+ "$ref": "#/components/parameters/V2ActiveFilter"
107
+ }
108
+ ],
109
+ "responses": {
110
+ "200": {
111
+ "$ref": "#/components/responses/V2CatalogProductDetail"
112
+ },
113
+ "404": {
114
+ "$ref": "#/components/responses/V2NotFound"
115
+ }
116
+ },
117
+ "security": [
118
+ {
119
+ "Secret-Api-Key": []
120
+ }
121
+ ]
122
+ }
123
+ },
124
+ "/v2/catalog/prices/": {
125
+ "get": {
126
+ "tags": [
127
+ "V2 Catalog"
128
+ ],
129
+ "summary": "List V2 catalog prices",
130
+ "description": "Lists catalog prices for the authenticated account. Requires a secret key.",
131
+ "parameters": [
132
+ {
133
+ "$ref": "#/components/parameters/V2ActiveFilter"
134
+ },
135
+ {
136
+ "in": "query",
137
+ "name": "product",
138
+ "schema": {
139
+ "oneOf": [
140
+ {
141
+ "type": "integer"
142
+ },
143
+ {
144
+ "type": "string"
145
+ }
146
+ ]
147
+ },
148
+ "description": "Product id or product reference."
149
+ },
150
+ {
151
+ "$ref": "#/components/parameters/V2ReferenceFilter"
152
+ },
153
+ {
154
+ "in": "query",
155
+ "name": "currency",
156
+ "schema": {
157
+ "type": "string"
158
+ },
159
+ "description": "Filter by currency."
160
+ },
161
+ {
162
+ "in": "query",
163
+ "name": "billing_type",
164
+ "schema": {
165
+ "type": "string",
166
+ "enum": [
167
+ "recurring",
168
+ "one_time"
169
+ ]
170
+ },
171
+ "description": "Filter by price billing type."
172
+ },
173
+ {
174
+ "in": "query",
175
+ "name": "recurrence_type",
176
+ "schema": {
177
+ "type": "string"
178
+ },
179
+ "description": "Filter by recurrence type."
180
+ },
181
+ {
182
+ "$ref": "#/components/parameters/PageSizeFilter"
183
+ }
184
+ ],
185
+ "responses": {
186
+ "200": {
187
+ "$ref": "#/components/responses/V2CatalogPriceList"
188
+ },
189
+ "400": {
190
+ "$ref": "#/components/responses/V2ValidationError"
191
+ }
192
+ },
193
+ "security": [
194
+ {
195
+ "Secret-Api-Key": []
196
+ }
197
+ ]
198
+ }
199
+ },
200
+ "/v2/catalog/prices/{priceId}/": {
201
+ "get": {
202
+ "tags": [
203
+ "V2 Catalog"
204
+ ],
205
+ "summary": "Get a V2 catalog price",
206
+ "description": "Returns a catalog price for the authenticated account. Requires a secret key.",
207
+ "parameters": [
208
+ {
209
+ "$ref": "#/components/parameters/V2PriceId"
210
+ },
211
+ {
212
+ "$ref": "#/components/parameters/V2ActiveFilter"
213
+ }
214
+ ],
215
+ "responses": {
216
+ "200": {
217
+ "$ref": "#/components/responses/V2CatalogPrice"
218
+ },
219
+ "404": {
220
+ "$ref": "#/components/responses/V2NotFound"
221
+ }
222
+ },
223
+ "security": [
224
+ {
225
+ "Secret-Api-Key": []
226
+ }
227
+ ]
228
+ }
229
+ },
230
+ "/v2/bundle-templates/": {
231
+ "get": {
232
+ "tags": [
233
+ "V2 Bundles"
234
+ ],
235
+ "summary": "List V2 bundle templates",
236
+ "description": "Lists bundle templates for the authenticated account. Requires a secret key.",
237
+ "parameters": [
238
+ {
239
+ "$ref": "#/components/parameters/V2ActiveFilter"
240
+ },
241
+ {
242
+ "$ref": "#/components/parameters/V2ReferenceFilter"
243
+ },
244
+ {
245
+ "$ref": "#/components/parameters/PageSizeFilter"
246
+ }
247
+ ],
248
+ "responses": {
249
+ "200": {
250
+ "$ref": "#/components/responses/V2BundleTemplateList"
251
+ },
252
+ "400": {
253
+ "$ref": "#/components/responses/V2ValidationError"
254
+ }
255
+ },
256
+ "security": [
257
+ {
258
+ "Secret-Api-Key": []
259
+ }
260
+ ]
261
+ }
262
+ },
263
+ "/v2/bundle-templates/{bundleTemplateId}/": {
264
+ "get": {
265
+ "tags": [
266
+ "V2 Bundles"
267
+ ],
268
+ "summary": "Get a V2 bundle template",
269
+ "description": "Returns a bundle template and its selectable item prices for the authenticated account. Requires a secret key.",
270
+ "parameters": [
271
+ {
272
+ "$ref": "#/components/parameters/V2BundleTemplateId"
273
+ },
274
+ {
275
+ "$ref": "#/components/parameters/V2ActiveFilter"
276
+ }
277
+ ],
278
+ "responses": {
279
+ "200": {
280
+ "$ref": "#/components/responses/V2BundleTemplateDetail"
281
+ },
282
+ "404": {
283
+ "$ref": "#/components/responses/V2NotFound"
284
+ }
285
+ },
286
+ "security": [
287
+ {
288
+ "Secret-Api-Key": []
289
+ }
290
+ ]
291
+ }
292
+ },
293
+ "/v2/bundle-templates/{bundleTemplateId}/addons/": {
294
+ "post": {
295
+ "tags": [
296
+ "V2 Bundles"
297
+ ],
298
+ "summary": "Discover V2 bundle add-ons",
299
+ "description": "Returns product and bundle add-ons available for a selected bundle configuration. Requires a secret key.",
300
+ "parameters": [
301
+ {
302
+ "$ref": "#/components/parameters/V2BundleTemplateId"
303
+ }
304
+ ],
305
+ "requestBody": {
306
+ "content": {
307
+ "application/json": {
308
+ "schema": {
309
+ "$ref": "#/components/schemas/V2BundleAddonDiscoveryRequest"
310
+ }
311
+ }
312
+ },
313
+ "required": true
314
+ },
315
+ "responses": {
316
+ "200": {
317
+ "$ref": "#/components/responses/V2BundleAddonDiscovery"
318
+ },
319
+ "400": {
320
+ "$ref": "#/components/responses/V2ValidationError"
321
+ },
322
+ "404": {
323
+ "$ref": "#/components/responses/V2NotFound"
324
+ }
325
+ },
326
+ "security": [
327
+ {
328
+ "Secret-Api-Key": []
329
+ }
330
+ ]
331
+ }
332
+ },
333
+ "/v2/subscription-offer-quotes/": {
334
+ "post": {
335
+ "tags": [
336
+ "V2 Subscription Contracts"
337
+ ],
338
+ "summary": "Quote a V2 subscription offer",
339
+ "description": "Compiles a bundle or direct catalog item offer without creating a contract. Recurring quote lines reflect first-period start proration when the offer begins between anchor dates. Requires a secret key.",
340
+ "requestBody": {
341
+ "content": {
342
+ "application/json": {
343
+ "schema": {
344
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteCreate"
345
+ }
346
+ }
347
+ },
348
+ "required": true
349
+ },
350
+ "responses": {
351
+ "200": {
352
+ "$ref": "#/components/responses/V2SubscriptionOfferQuote"
353
+ },
354
+ "400": {
355
+ "$ref": "#/components/responses/V2ValidationError"
356
+ }
357
+ },
358
+ "security": [
359
+ {
360
+ "Secret-Api-Key": []
361
+ }
362
+ ]
363
+ }
364
+ },
365
+ "/v2/customers/{customerReference}/payment-methods/": {
366
+ "get": {
367
+ "tags": [
368
+ "V2 Customer Payment Methods"
369
+ ],
370
+ "summary": "List V2 customer payment methods",
371
+ "description": "Lists active verified payment methods for a customer identified by customer reference. Canceled methods are omitted from the list. Requires a secret key.",
372
+ "parameters": [
373
+ {
374
+ "$ref": "#/components/parameters/V2CustomerReference"
375
+ }
376
+ ],
377
+ "responses": {
378
+ "200": {
379
+ "$ref": "#/components/responses/V2CustomerPaymentMethodList"
380
+ },
381
+ "404": {
382
+ "$ref": "#/components/responses/V2NotFound"
383
+ }
384
+ },
385
+ "security": [
386
+ {
387
+ "Secret-Api-Key": []
388
+ }
389
+ ]
390
+ },
391
+ "post": {
392
+ "tags": [
393
+ "V2 Customer Payment Methods"
394
+ ],
395
+ "summary": "Create or replace a V2 customer payment method",
396
+ "description": "Creates a card payment method or creates/replaces the active claim or invoice setup for the selected account payment processor. The account payment processor is always explicit. Card imports create a new row and cancel conflicting active card methods; claim and invoice creation replaces only the matching active setup. Requires a secret key.",
397
+ "parameters": [
398
+ {
399
+ "$ref": "#/components/parameters/V2CustomerReference"
400
+ }
401
+ ],
402
+ "requestBody": {
403
+ "content": {
404
+ "application/json": {
405
+ "schema": {
406
+ "$ref": "#/components/schemas/V2CustomerPaymentMethodCreate"
407
+ }
408
+ }
409
+ },
410
+ "required": true
411
+ },
412
+ "responses": {
413
+ "201": {
414
+ "$ref": "#/components/responses/V2CustomerPaymentMethod"
415
+ },
416
+ "400": {
417
+ "$ref": "#/components/responses/V2ValidationError"
418
+ },
419
+ "404": {
420
+ "$ref": "#/components/responses/V2NotFound"
421
+ }
422
+ },
423
+ "security": [
424
+ {
425
+ "Secret-Api-Key": []
426
+ }
427
+ ]
428
+ }
429
+ },
430
+ "/v2/customers/{customerReference}/payment-methods/{paymentMethodId}/": {
431
+ "get": {
432
+ "tags": [
433
+ "V2 Customer Payment Methods"
434
+ ],
435
+ "summary": "Get a V2 customer payment method",
436
+ "description": "Returns a sanitized payment method by id for the customer, including canceled methods. Token data is never returned. Requires a secret key.",
437
+ "parameters": [
438
+ {
439
+ "$ref": "#/components/parameters/V2CustomerReference"
440
+ },
441
+ {
442
+ "$ref": "#/components/parameters/V2PaymentMethodId"
443
+ }
444
+ ],
445
+ "responses": {
446
+ "200": {
447
+ "$ref": "#/components/responses/V2CustomerPaymentMethod"
448
+ },
449
+ "404": {
450
+ "$ref": "#/components/responses/V2NotFound"
451
+ }
452
+ },
453
+ "security": [
454
+ {
455
+ "Secret-Api-Key": []
456
+ }
457
+ ]
458
+ },
459
+ "patch": {
460
+ "tags": [
461
+ "V2 Customer Payment Methods"
462
+ ],
463
+ "summary": "Update a V2 customer payment method",
464
+ "description": "Partially updates mutable setup fields for an active payment method. Metadata is shallow-merged and null values remove metadata keys. The collection method and account payment processor are immutable; create a new payment method to change them. Requires a secret key.",
465
+ "parameters": [
466
+ {
467
+ "$ref": "#/components/parameters/V2CustomerReference"
468
+ },
469
+ {
470
+ "$ref": "#/components/parameters/V2PaymentMethodId"
471
+ }
472
+ ],
473
+ "requestBody": {
474
+ "content": {
475
+ "application/json": {
476
+ "schema": {
477
+ "$ref": "#/components/schemas/V2CustomerPaymentMethodPatch"
478
+ }
479
+ }
480
+ },
481
+ "required": true
482
+ },
483
+ "responses": {
484
+ "200": {
485
+ "$ref": "#/components/responses/V2CustomerPaymentMethod"
486
+ },
487
+ "400": {
488
+ "$ref": "#/components/responses/V2ValidationError"
489
+ },
490
+ "404": {
491
+ "$ref": "#/components/responses/V2NotFound"
492
+ }
493
+ },
494
+ "security": [
495
+ {
496
+ "Secret-Api-Key": []
497
+ }
498
+ ]
499
+ },
500
+ "delete": {
501
+ "tags": [
502
+ "V2 Customer Payment Methods"
503
+ ],
504
+ "summary": "Cancel a V2 customer payment method",
505
+ "description": "Soft-cancels the payment method, clears stored setup data, and returns 204. Repeating the delete for an already canceled method is idempotent. Requires a secret key.",
506
+ "parameters": [
507
+ {
508
+ "$ref": "#/components/parameters/V2CustomerReference"
509
+ },
510
+ {
511
+ "$ref": "#/components/parameters/V2PaymentMethodId"
512
+ }
513
+ ],
514
+ "responses": {
515
+ "204": {
516
+ "description": "Payment method canceled"
517
+ },
518
+ "404": {
519
+ "$ref": "#/components/responses/V2NotFound"
520
+ }
521
+ },
522
+ "security": [
523
+ {
524
+ "Secret-Api-Key": []
525
+ }
526
+ ]
527
+ }
528
+ },
529
+ "/v2/customer-entitlements/": {
530
+ "get": {
531
+ "tags": [
532
+ "V2 Entitlements"
533
+ ],
534
+ "summary": "Evaluate V2 customer service entitlements",
535
+ "description": "Returns current or time-specific service entitlement state for a customer, optionally filtered by catalog product reference. Requires a secret key. Use `service_active` as the integration-facing access flag; do not infer access from payment state.",
536
+ "parameters": [
537
+ {
538
+ "in": "query",
539
+ "name": "customer_reference",
540
+ "required": true,
541
+ "schema": {
542
+ "type": "string"
543
+ },
544
+ "description": "Customer reference to evaluate."
545
+ },
546
+ {
547
+ "in": "query",
548
+ "name": "product_reference",
549
+ "schema": {
550
+ "type": "string"
551
+ },
552
+ "description": "Optional catalog product reference. When omitted, all current entitlements for the customer are returned."
553
+ },
554
+ {
555
+ "in": "query",
556
+ "name": "at",
557
+ "schema": {
558
+ "type": "string",
559
+ "format": "date-time"
560
+ },
561
+ "description": "Optional evaluation timestamp. Defaults to the current server time."
562
+ }
563
+ ],
564
+ "responses": {
565
+ "200": {
566
+ "$ref": "#/components/responses/V2CustomerEntitlements"
567
+ },
568
+ "400": {
569
+ "$ref": "#/components/responses/V2ValidationError"
570
+ },
571
+ "404": {
572
+ "$ref": "#/components/responses/V2NotFound"
573
+ }
574
+ },
575
+ "security": [
576
+ {
577
+ "Secret-Api-Key": []
578
+ }
579
+ ]
580
+ }
581
+ },
582
+ "/v2/subscription-contracts/": {
583
+ "get": {
584
+ "tags": [
585
+ "V2 Subscription Contracts"
586
+ ],
587
+ "summary": "List V2 subscription contracts",
588
+ "description": "Lists subscription contracts for the authenticated account. Requires a secret key.",
589
+ "parameters": [
590
+ {
591
+ "in": "query",
592
+ "name": "state",
593
+ "schema": {
594
+ "type": "string"
595
+ },
596
+ "description": "Filter by contract state."
597
+ },
598
+ {
599
+ "in": "query",
600
+ "name": "customer",
601
+ "schema": {
602
+ "type": "integer"
603
+ },
604
+ "description": "Filter by customer id."
605
+ },
606
+ {
607
+ "in": "query",
608
+ "name": "customer_reference",
609
+ "schema": {
610
+ "type": "string"
611
+ },
612
+ "description": "Filter by customer reference."
613
+ },
614
+ {
615
+ "$ref": "#/components/parameters/PageSizeFilter"
616
+ }
617
+ ],
618
+ "responses": {
619
+ "200": {
620
+ "$ref": "#/components/responses/V2SubscriptionContractList"
621
+ },
622
+ "400": {
623
+ "$ref": "#/components/responses/V2ValidationError"
624
+ }
625
+ },
626
+ "security": [
627
+ {
628
+ "Secret-Api-Key": []
629
+ }
630
+ ]
631
+ },
632
+ "post": {
633
+ "tags": [
634
+ "V2 Subscription Contracts"
635
+ ],
636
+ "summary": "Create a V2 subscription contract",
637
+ "description": "Creates a subscription contract from either a bundle template or direct recurring catalog prices. Use `initial_billing_mode` to choose first-period billing behavior: `none` creates only the recurring schedules, `create_initial_run` creates a scheduled initial BillingRun, and `next_invoice` defers first-period recurring proration lines to the first scheduled invoice. Initial one-time items require `initial_billing_mode=create_initial_run`. Requires a secret key.",
638
+ "requestBody": {
639
+ "content": {
640
+ "application/json": {
641
+ "schema": {
642
+ "$ref": "#/components/schemas/V2SubscriptionContractCreate"
643
+ }
644
+ }
645
+ },
646
+ "required": true
647
+ },
648
+ "responses": {
649
+ "201": {
650
+ "$ref": "#/components/responses/V2SubscriptionContract"
651
+ },
652
+ "400": {
653
+ "$ref": "#/components/responses/V2ValidationError"
654
+ }
655
+ },
656
+ "security": [
657
+ {
658
+ "Secret-Api-Key": []
659
+ }
660
+ ]
661
+ }
662
+ },
663
+ "/v2/subscription-contracts/{contractId}/": {
664
+ "get": {
665
+ "tags": [
666
+ "V2 Subscription Contracts"
667
+ ],
668
+ "summary": "Get a V2 subscription contract",
669
+ "description": "Returns a subscription contract for the authenticated account. Requires a secret key.",
670
+ "parameters": [
671
+ {
672
+ "$ref": "#/components/parameters/V2ContractId"
673
+ }
674
+ ],
675
+ "responses": {
676
+ "200": {
677
+ "$ref": "#/components/responses/V2SubscriptionContract"
678
+ },
679
+ "404": {
680
+ "$ref": "#/components/responses/V2NotFound"
681
+ }
682
+ },
683
+ "security": [
684
+ {
685
+ "Secret-Api-Key": []
686
+ }
687
+ ]
688
+ },
689
+ "patch": {
690
+ "tags": [
691
+ "V2 Subscription Contracts"
692
+ ],
693
+ "summary": "Partially update a V2 subscription contract",
694
+ "description": "Restricted patch endpoint. Only `metadata` and `payment_processor_override` may be updated. Requires a secret key.",
695
+ "parameters": [
696
+ {
697
+ "$ref": "#/components/parameters/V2ContractId"
698
+ }
699
+ ],
700
+ "requestBody": {
701
+ "content": {
702
+ "application/json": {
703
+ "schema": {
704
+ "$ref": "#/components/schemas/V2SubscriptionContractPatch"
705
+ }
706
+ }
707
+ },
708
+ "required": true
709
+ },
710
+ "responses": {
711
+ "200": {
712
+ "$ref": "#/components/responses/V2SubscriptionContract"
713
+ },
714
+ "400": {
715
+ "$ref": "#/components/responses/V2ValidationError"
716
+ },
717
+ "404": {
718
+ "$ref": "#/components/responses/V2NotFound"
719
+ }
720
+ },
721
+ "security": [
722
+ {
723
+ "Secret-Api-Key": []
724
+ }
725
+ ]
726
+ }
727
+ },
728
+ "/v2/subscription-contracts/{contractId}/proration-preview/": {
729
+ "post": {
730
+ "tags": [
731
+ "V2 Subscription Contracts"
732
+ ],
733
+ "summary": "Preview a V2 subscription contract proration",
734
+ "description": "Previews the proration impact of updating an existing V2 subscription contract item. Requires a secret key.",
735
+ "parameters": [
736
+ {
737
+ "$ref": "#/components/parameters/V2ContractId"
738
+ }
739
+ ],
740
+ "requestBody": {
741
+ "content": {
742
+ "application/json": {
743
+ "schema": {
744
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationPreview"
745
+ }
746
+ }
747
+ },
748
+ "required": true
749
+ },
750
+ "responses": {
751
+ "200": {
752
+ "description": "Successful operation",
753
+ "content": {
754
+ "application/json": {
755
+ "schema": {
756
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationPreviewResponse"
757
+ }
758
+ }
759
+ }
760
+ },
761
+ "400": {
762
+ "$ref": "#/components/responses/V2ValidationError"
763
+ },
764
+ "404": {
765
+ "$ref": "#/components/responses/V2NotFound"
766
+ }
767
+ },
768
+ "security": [
769
+ {
770
+ "Secret-Api-Key": []
771
+ }
772
+ ]
773
+ }
774
+ },
775
+ "/v2/subscription-contracts/{contractId}/items/update/": {
776
+ "post": {
777
+ "tags": [
778
+ "V2 Subscription Contracts"
779
+ ],
780
+ "summary": "Update a V2 subscription contract item with proration",
781
+ "description": "Executes a prorated update for an existing V2 subscription contract item. Requires a secret key.",
782
+ "parameters": [
783
+ {
784
+ "$ref": "#/components/parameters/V2ContractId"
785
+ }
786
+ ],
787
+ "requestBody": {
788
+ "content": {
789
+ "application/json": {
790
+ "schema": {
791
+ "$ref": "#/components/schemas/V2SubscriptionContractItemUpdate"
792
+ }
793
+ }
794
+ },
795
+ "required": true
796
+ },
797
+ "responses": {
798
+ "200": {
799
+ "description": "Successful operation",
800
+ "content": {
801
+ "application/json": {
802
+ "schema": {
803
+ "$ref": "#/components/schemas/V2SubscriptionContractItemUpdateResponse"
804
+ }
805
+ }
806
+ }
807
+ },
808
+ "400": {
809
+ "$ref": "#/components/responses/V2ValidationError"
810
+ },
811
+ "404": {
812
+ "$ref": "#/components/responses/V2NotFound"
813
+ }
814
+ },
815
+ "security": [
816
+ {
817
+ "Secret-Api-Key": []
818
+ }
819
+ ]
820
+ }
821
+ },
822
+ "/v2/subscription-contracts/{contractId}/items/add/": {
823
+ "post": {
824
+ "tags": [
825
+ "V2 Subscription Contracts"
826
+ ],
827
+ "summary": "Add a V2 subscription contract item with proration",
828
+ "description": "Executes a prorated add-item change for an existing V2 subscription contract. Requires a secret key.",
829
+ "parameters": [
830
+ {
831
+ "$ref": "#/components/parameters/V2ContractId"
832
+ }
833
+ ],
834
+ "requestBody": {
835
+ "content": {
836
+ "application/json": {
837
+ "schema": {
838
+ "$ref": "#/components/schemas/V2SubscriptionContractItemAdd"
839
+ }
840
+ }
841
+ },
842
+ "required": true
843
+ },
844
+ "responses": {
845
+ "200": {
846
+ "description": "Successful operation",
847
+ "content": {
848
+ "application/json": {
849
+ "schema": {
850
+ "$ref": "#/components/schemas/V2SubscriptionContractItemUpdateResponse"
851
+ }
852
+ }
853
+ }
854
+ },
855
+ "400": {
856
+ "$ref": "#/components/responses/V2ValidationError"
857
+ },
858
+ "404": {
859
+ "$ref": "#/components/responses/V2NotFound"
860
+ }
861
+ },
862
+ "security": [
863
+ {
864
+ "Secret-Api-Key": []
865
+ }
866
+ ]
867
+ }
868
+ },
869
+ "/v2/subscription-contracts/{contractId}/items/remove/": {
870
+ "post": {
871
+ "tags": [
872
+ "V2 Subscription Contracts"
873
+ ],
874
+ "summary": "Remove a V2 subscription contract item with proration",
875
+ "description": "Executes a prorated remove-item change for an existing V2 subscription contract. Requires a secret key.",
876
+ "parameters": [
877
+ {
878
+ "$ref": "#/components/parameters/V2ContractId"
879
+ }
880
+ ],
881
+ "requestBody": {
882
+ "content": {
883
+ "application/json": {
884
+ "schema": {
885
+ "$ref": "#/components/schemas/V2SubscriptionContractItemRemove"
886
+ }
887
+ }
888
+ },
889
+ "required": true
890
+ },
891
+ "responses": {
892
+ "200": {
893
+ "description": "Successful operation",
894
+ "content": {
895
+ "application/json": {
896
+ "schema": {
897
+ "$ref": "#/components/schemas/V2SubscriptionContractItemUpdateResponse"
898
+ }
899
+ }
900
+ }
901
+ },
902
+ "400": {
903
+ "$ref": "#/components/responses/V2ValidationError"
904
+ },
905
+ "404": {
906
+ "$ref": "#/components/responses/V2NotFound"
907
+ }
908
+ },
909
+ "security": [
910
+ {
911
+ "Secret-Api-Key": []
912
+ }
913
+ ]
914
+ }
915
+ },
916
+ "/v2/subscription-contracts/{contractId}/cancel/": {
917
+ "post": {
918
+ "tags": [
919
+ "V2 Subscription Contracts"
920
+ ],
921
+ "summary": "Cancel a V2 subscription contract",
922
+ "description": "Cancels a V2 subscription contract immediately or schedules cancellation at the end of the current billing cycle. Requires a secret key.",
923
+ "parameters": [
924
+ {
925
+ "$ref": "#/components/parameters/V2ContractId"
926
+ }
927
+ ],
928
+ "requestBody": {
929
+ "content": {
930
+ "application/json": {
931
+ "schema": {
932
+ "$ref": "#/components/schemas/V2SubscriptionContractCancel"
933
+ }
934
+ }
935
+ }
936
+ },
937
+ "responses": {
938
+ "200": {
939
+ "$ref": "#/components/responses/V2SubscriptionContract"
940
+ },
941
+ "400": {
942
+ "$ref": "#/components/responses/V2ValidationError"
943
+ },
944
+ "404": {
945
+ "$ref": "#/components/responses/V2NotFound"
946
+ }
947
+ },
948
+ "security": [
949
+ {
950
+ "Secret-Api-Key": []
951
+ }
952
+ ]
953
+ }
954
+ },
955
+ "/v2/subscription-contracts/{contractId}/restart/": {
956
+ "post": {
957
+ "tags": [
958
+ "V2 Subscription Contracts"
959
+ ],
960
+ "summary": "Restart renewals for a V2 subscription contract",
961
+ "description": "Clears a pending period-end cancellation or reactivates a canceled V2 subscription contract. Requires a secret key.",
962
+ "parameters": [
963
+ {
964
+ "$ref": "#/components/parameters/V2ContractId"
965
+ }
966
+ ],
967
+ "requestBody": {
968
+ "content": {
969
+ "application/json": {
970
+ "schema": {
971
+ "$ref": "#/components/schemas/V2SubscriptionContractRestart"
972
+ }
973
+ }
974
+ }
975
+ },
976
+ "responses": {
977
+ "200": {
978
+ "$ref": "#/components/responses/V2SubscriptionContract"
979
+ },
980
+ "400": {
981
+ "$ref": "#/components/responses/V2ValidationError"
982
+ },
983
+ "404": {
984
+ "$ref": "#/components/responses/V2NotFound"
985
+ }
986
+ },
987
+ "security": [
988
+ {
989
+ "Secret-Api-Key": []
990
+ }
991
+ ]
992
+ }
993
+ },
994
+ "/v2/subscription-contracts/{contractId}/pause/": {
995
+ "post": {
996
+ "tags": [
997
+ "V2 Subscription Contracts"
998
+ ],
999
+ "summary": "Pause renewals for a V2 subscription contract",
1000
+ "description": "Creates a finite pause window for a V2 subscription contract. Current pauses move the contract to paused and future pauses are scheduled. Requires a secret key.",
1001
+ "parameters": [
1002
+ {
1003
+ "$ref": "#/components/parameters/V2ContractId"
1004
+ }
1005
+ ],
1006
+ "requestBody": {
1007
+ "content": {
1008
+ "application/json": {
1009
+ "schema": {
1010
+ "$ref": "#/components/schemas/V2SubscriptionContractPause"
1011
+ }
1012
+ }
1013
+ }
1014
+ },
1015
+ "responses": {
1016
+ "200": {
1017
+ "$ref": "#/components/responses/V2SubscriptionContract"
1018
+ },
1019
+ "400": {
1020
+ "$ref": "#/components/responses/V2ValidationError"
1021
+ },
1022
+ "404": {
1023
+ "$ref": "#/components/responses/V2NotFound"
1024
+ }
1025
+ },
1026
+ "security": [
1027
+ {
1028
+ "Secret-Api-Key": []
1029
+ }
1030
+ ]
1031
+ }
1032
+ },
1033
+ "/v2/subscription-contracts/{contractId}/resume/": {
1034
+ "post": {
1035
+ "tags": [
1036
+ "V2 Subscription Contracts"
1037
+ ],
1038
+ "summary": "Resume renewals for a paused V2 subscription contract",
1039
+ "description": "Cancels the current pause and resumes renewals for a paused V2 subscription contract. Requires a secret key.",
1040
+ "parameters": [
1041
+ {
1042
+ "$ref": "#/components/parameters/V2ContractId"
1043
+ }
1044
+ ],
1045
+ "requestBody": {
1046
+ "content": {
1047
+ "application/json": {
1048
+ "schema": {
1049
+ "$ref": "#/components/schemas/V2SubscriptionContractResume"
1050
+ }
1051
+ }
1052
+ }
1053
+ },
1054
+ "responses": {
1055
+ "200": {
1056
+ "$ref": "#/components/responses/V2SubscriptionContract"
1057
+ },
1058
+ "400": {
1059
+ "$ref": "#/components/responses/V2ValidationError"
1060
+ },
1061
+ "404": {
1062
+ "$ref": "#/components/responses/V2NotFound"
1063
+ }
1064
+ },
1065
+ "security": [
1066
+ {
1067
+ "Secret-Api-Key": []
1068
+ }
1069
+ ]
1070
+ }
1071
+ },
1072
+ "/v2/subscription-contracts/{contractId}/pause/{pauseId}/": {
1073
+ "delete": {
1074
+ "tags": [
1075
+ "V2 Subscription Contracts"
1076
+ ],
1077
+ "summary": "Delete a future V2 subscription contract pause",
1078
+ "description": "Soft-cancels a future scheduled pause for a V2 subscription contract. Requires a secret key.",
1079
+ "parameters": [
1080
+ {
1081
+ "$ref": "#/components/parameters/V2ContractId"
1082
+ },
1083
+ {
1084
+ "name": "pauseId",
1085
+ "in": "path",
1086
+ "required": true,
1087
+ "schema": {
1088
+ "type": "integer"
1089
+ }
1090
+ }
1091
+ ],
1092
+ "responses": {
1093
+ "200": {
1094
+ "$ref": "#/components/responses/V2SubscriptionContract"
1095
+ },
1096
+ "400": {
1097
+ "$ref": "#/components/responses/V2ValidationError"
1098
+ },
1099
+ "404": {
1100
+ "$ref": "#/components/responses/V2NotFound"
1101
+ }
1102
+ },
1103
+ "security": [
1104
+ {
1105
+ "Secret-Api-Key": []
1106
+ }
1107
+ ]
1108
+ }
1109
+ },
1110
+ "/v2/subscription-contracts/{contractId}/activate/": {
1111
+ "post": {
1112
+ "tags": [
1113
+ "V2 Subscription Contracts"
1114
+ ],
1115
+ "summary": "Activate a V2 subscription contract",
1116
+ "description": "Transitions an inactive V2 subscription contract to active. Use the resume endpoint for paused contracts. Requires a secret key.",
1117
+ "parameters": [
1118
+ {
1119
+ "$ref": "#/components/parameters/V2ContractId"
1120
+ }
1121
+ ],
1122
+ "responses": {
1123
+ "200": {
1124
+ "$ref": "#/components/responses/V2SubscriptionContract"
1125
+ },
1126
+ "400": {
1127
+ "$ref": "#/components/responses/V2ValidationError"
1128
+ },
1129
+ "404": {
1130
+ "$ref": "#/components/responses/V2NotFound"
1131
+ }
1132
+ },
1133
+ "security": [
1134
+ {
1135
+ "Secret-Api-Key": []
1136
+ }
1137
+ ]
1138
+ }
1139
+ },
1140
+ "/v2/checkouts/": {
1141
+ "post": {
1142
+ "tags": [
1143
+ "V2 Checkouts"
1144
+ ],
1145
+ "summary": "Create a V2 hosted checkout",
1146
+ "description": "Creates a pending hosted checkout from either a bundle template or direct catalog prices, returning a token, checkout URL, and quote snapshot. An explicit account payment processor can be supplied when more than one compatible processor is configured. Requires a secret key.",
1147
+ "requestBody": {
1148
+ "content": {
1149
+ "application/json": {
1150
+ "schema": {
1151
+ "$ref": "#/components/schemas/V2CheckoutCreate"
1152
+ }
1153
+ }
1154
+ },
1155
+ "required": true
1156
+ },
1157
+ "responses": {
1158
+ "201": {
1159
+ "$ref": "#/components/responses/V2Checkout"
1160
+ },
1161
+ "400": {
1162
+ "$ref": "#/components/responses/V2ValidationError"
1163
+ }
1164
+ },
1165
+ "security": [
1166
+ {
1167
+ "Secret-Api-Key": []
1168
+ }
1169
+ ]
1170
+ }
1171
+ },
1172
+ "/v2/payment-processor-options/": {
1173
+ "post": {
1174
+ "tags": [
1175
+ "V2 Checkouts"
1176
+ ],
1177
+ "summary": "Discover eligible V2 payment processors",
1178
+ "description": "Compiles the requested V2 offer and returns the eligible account payment processors for the resolved currency and collection method. Use this before checkout creation when the client must choose between multiple compatible processors. Requires a secret key.",
1179
+ "requestBody": {
1180
+ "content": {
1181
+ "application/json": {
1182
+ "schema": {
1183
+ "$ref": "#/components/schemas/V2PaymentProcessorOptionsRequest"
1184
+ }
1185
+ }
1186
+ },
1187
+ "required": true
1188
+ },
1189
+ "responses": {
1190
+ "200": {
1191
+ "$ref": "#/components/responses/V2PaymentProcessorOptions"
1192
+ },
1193
+ "400": {
1194
+ "$ref": "#/components/responses/V2ValidationError"
1195
+ }
1196
+ },
1197
+ "security": [
1198
+ {
1199
+ "Secret-Api-Key": []
1200
+ }
1201
+ ]
1202
+ }
1203
+ },
1204
+ "/v2/checkouts/{token}/": {
1205
+ "get": {
1206
+ "tags": [
1207
+ "V2 Checkouts"
1208
+ ],
1209
+ "summary": "Get a V2 checkout",
1210
+ "description": "Returns a pending or finalized V2 checkout for the authenticated account. Requires a secret key.",
1211
+ "parameters": [
1212
+ {
1213
+ "$ref": "#/components/parameters/V2CheckoutToken"
1214
+ }
1215
+ ],
1216
+ "responses": {
1217
+ "200": {
1218
+ "$ref": "#/components/responses/V2Checkout"
1219
+ },
1220
+ "404": {
1221
+ "$ref": "#/components/responses/V2NotFound"
1222
+ }
1223
+ },
1224
+ "security": [
1225
+ {
1226
+ "Secret-Api-Key": []
1227
+ }
1228
+ ]
1229
+ }
1230
+ },
1231
+ "/v2/checkouts/{token}/payment-method-registrations/": {
1232
+ "post": {
1233
+ "tags": [
1234
+ "V2 Checkouts"
1235
+ ],
1236
+ "summary": "Create a hosted V2 payment method registration",
1237
+ "description": "Creates a checkout-bound hosted payment method registration session for the checkout's selected account payment processor. The response contains a public hosted card-form URL and private status URL. Requires a secret key.",
1238
+ "parameters": [
1239
+ {
1240
+ "$ref": "#/components/parameters/V2CheckoutToken"
1241
+ }
1242
+ ],
1243
+ "requestBody": {
1244
+ "content": {
1245
+ "application/json": {
1246
+ "schema": {
1247
+ "$ref": "#/components/schemas/V2PaymentMethodRegistrationCreate"
1248
+ }
1249
+ }
1250
+ }
1251
+ },
1252
+ "responses": {
1253
+ "201": {
1254
+ "$ref": "#/components/responses/V2PaymentMethodRegistration"
1255
+ },
1256
+ "400": {
1257
+ "$ref": "#/components/responses/V2ValidationError"
1258
+ },
1259
+ "404": {
1260
+ "$ref": "#/components/responses/V2NotFound"
1261
+ }
1262
+ },
1263
+ "security": [
1264
+ {
1265
+ "Secret-Api-Key": []
1266
+ }
1267
+ ]
1268
+ }
1269
+ },
1270
+ "/v2/payment-method-registrations/{token}/": {
1271
+ "get": {
1272
+ "tags": [
1273
+ "V2 Checkouts"
1274
+ ],
1275
+ "summary": "Get a V2 payment method registration",
1276
+ "description": "Returns the status of a checkout-bound payment method registration and confirms a verified payment method when the processor has completed tokenization. Requires a secret key.",
1277
+ "parameters": [
1278
+ {
1279
+ "$ref": "#/components/parameters/V2PaymentMethodRegistrationToken"
1280
+ }
1281
+ ],
1282
+ "responses": {
1283
+ "200": {
1284
+ "$ref": "#/components/responses/V2PaymentMethodRegistration"
1285
+ },
1286
+ "404": {
1287
+ "$ref": "#/components/responses/V2NotFound"
1288
+ }
1289
+ },
1290
+ "security": [
1291
+ {
1292
+ "Secret-Api-Key": []
1293
+ }
1294
+ ]
1295
+ }
1296
+ },
1297
+ "/v2/checkouts/{token}/finalize/": {
1298
+ "post": {
1299
+ "tags": [
1300
+ "V2 Checkouts"
1301
+ ],
1302
+ "summary": "Finalize a V2 checkout",
1303
+ "description": "Creates the subscription contract and initial billing run, then executes payment. The contract is activated only after successful payment. Requires a secret key.",
1304
+ "parameters": [
1305
+ {
1306
+ "$ref": "#/components/parameters/V2CheckoutToken"
1307
+ }
1308
+ ],
1309
+ "requestBody": {
1310
+ "content": {
1311
+ "application/json": {
1312
+ "schema": {
1313
+ "$ref": "#/components/schemas/V2CheckoutFinalize"
1314
+ }
1315
+ }
1316
+ }
1317
+ },
1318
+ "responses": {
1319
+ "200": {
1320
+ "$ref": "#/components/responses/V2Checkout"
1321
+ },
1322
+ "400": {
1323
+ "$ref": "#/components/responses/V2ValidationError"
1324
+ },
1325
+ "404": {
1326
+ "$ref": "#/components/responses/V2NotFound"
1327
+ }
1328
+ },
1329
+ "security": [
1330
+ {
1331
+ "Secret-Api-Key": []
1332
+ }
1333
+ ]
1334
+ }
1335
+ },
1336
+ "/v2/checkout-sessions/": {
1337
+ "post": {
1338
+ "tags": [
1339
+ "V2 Embedded Checkout Sessions"
1340
+ ],
1341
+ "summary": "Create an embedded checkout session",
1342
+ "description": "Creates a short-lived checkout session from a sales channel. The seller backend calls this endpoint with a secret API key and sends only the returned session token to the browser widget. Sales-channel offer, origin, payment-processor, metadata, theme, and terms policies are snapshotted onto the session.",
1343
+ "requestBody": {
1344
+ "content": {
1345
+ "application/json": {
1346
+ "schema": {
1347
+ "$ref": "#/components/schemas/V2CheckoutSessionCreate"
1348
+ }
1349
+ }
1350
+ },
1351
+ "required": true
1352
+ },
1353
+ "responses": {
1354
+ "201": {
1355
+ "$ref": "#/components/responses/V2CheckoutSession"
1356
+ },
1357
+ "400": {
1358
+ "$ref": "#/components/responses/V2ValidationError"
1359
+ }
1360
+ },
1361
+ "security": [
1362
+ {
1363
+ "Secret-Api-Key": []
1364
+ }
1365
+ ]
1366
+ }
1367
+ },
1368
+ "/v2/checkout-sessions/{token}/": {
1369
+ "get": {
1370
+ "tags": [
1371
+ "V2 Embedded Checkout Sessions"
1372
+ ],
1373
+ "summary": "Get an embedded checkout session",
1374
+ "description": "Returns private checkout-session state for the authenticated account. Requires a secret key.",
1375
+ "parameters": [
1376
+ {
1377
+ "$ref": "#/components/parameters/V2CheckoutSessionToken"
1378
+ }
1379
+ ],
1380
+ "responses": {
1381
+ "200": {
1382
+ "$ref": "#/components/responses/V2CheckoutSession"
1383
+ },
1384
+ "404": {
1385
+ "$ref": "#/components/responses/V2NotFound"
1386
+ }
1387
+ },
1388
+ "security": [
1389
+ {
1390
+ "Secret-Api-Key": []
1391
+ }
1392
+ ]
1393
+ }
1394
+ },
1395
+ "/v2/billing-runs/": {
1396
+ "get": {
1397
+ "tags": [
1398
+ "V2 Billing Runs"
1399
+ ],
1400
+ "summary": "List V2 billing runs",
1401
+ "description": "Returns V2 billing runs for the authenticated account, including lines and attempts. Requires a secret key.",
1402
+ "parameters": [
1403
+ {
1404
+ "in": "query",
1405
+ "name": "contract",
1406
+ "schema": {
1407
+ "type": "integer"
1408
+ },
1409
+ "description": "Filter by subscription contract id."
1410
+ },
1411
+ {
1412
+ "in": "query",
1413
+ "name": "state",
1414
+ "schema": {
1415
+ "type": "string"
1416
+ },
1417
+ "description": "Filter by billing-run state."
1418
+ },
1419
+ {
1420
+ "in": "query",
1421
+ "name": "customer",
1422
+ "schema": {
1423
+ "type": "integer"
1424
+ },
1425
+ "description": "Filter by customer id."
1426
+ },
1427
+ {
1428
+ "in": "query",
1429
+ "name": "customer_reference",
1430
+ "schema": {
1431
+ "type": "string"
1432
+ },
1433
+ "description": "Filter by customer reference."
1434
+ },
1435
+ {
1436
+ "$ref": "#/components/parameters/PageSizeFilter"
1437
+ }
1438
+ ],
1439
+ "responses": {
1440
+ "200": {
1441
+ "$ref": "#/components/responses/V2BillingRunList"
1442
+ },
1443
+ "400": {
1444
+ "$ref": "#/components/responses/V2ValidationError"
1445
+ }
1446
+ },
1447
+ "security": [
1448
+ {
1449
+ "Secret-Api-Key": []
1450
+ }
1451
+ ]
1452
+ }
1453
+ },
1454
+ "/v2/billing-runs/{billingRunId}/": {
1455
+ "get": {
1456
+ "tags": [
1457
+ "V2 Billing Runs"
1458
+ ],
1459
+ "summary": "Get a V2 billing run",
1460
+ "description": "Returns a V2 billing run with lines and attempts for the authenticated account. Requires a secret key.",
1461
+ "parameters": [
1462
+ {
1463
+ "$ref": "#/components/parameters/V2BillingRunId"
1464
+ }
1465
+ ],
1466
+ "responses": {
1467
+ "200": {
1468
+ "$ref": "#/components/responses/V2BillingRun"
1469
+ },
1470
+ "404": {
1471
+ "$ref": "#/components/responses/V2NotFound"
1472
+ }
1473
+ },
1474
+ "security": [
1475
+ {
1476
+ "Secret-Api-Key": []
1477
+ }
1478
+ ]
1479
+ }
1480
+ },
1481
+ "/v2/billing-runs/{billingRunId}/retry/": {
1482
+ "post": {
1483
+ "tags": [
1484
+ "V2 Billing Runs"
1485
+ ],
1486
+ "summary": "Retry a V2 billing run",
1487
+ "description": "Schedules a manual retry for a retryable V2 billing run. A reason is required and is recorded in billing-run metadata. Requires a secret key.",
1488
+ "parameters": [
1489
+ {
1490
+ "$ref": "#/components/parameters/V2BillingRunId"
1491
+ }
1492
+ ],
1493
+ "requestBody": {
1494
+ "content": {
1495
+ "application/json": {
1496
+ "schema": {
1497
+ "$ref": "#/components/schemas/V2BillingRunRetry"
1498
+ }
1499
+ }
1500
+ },
1501
+ "required": true
1502
+ },
1503
+ "responses": {
1504
+ "200": {
1505
+ "$ref": "#/components/responses/V2BillingRun"
1506
+ },
1507
+ "400": {
1508
+ "$ref": "#/components/responses/V2ValidationError"
1509
+ },
1510
+ "404": {
1511
+ "$ref": "#/components/responses/V2NotFound"
1512
+ }
1513
+ },
1514
+ "security": [
1515
+ {
1516
+ "Secret-Api-Key": []
1517
+ }
1518
+ ]
1519
+ }
1520
+ }
1521
+ },
1522
+ "components": {
1523
+ "schemas": {
1524
+ "V2ValidationError": {
1525
+ "type": "object",
1526
+ "additionalProperties": true,
1527
+ "example": {
1528
+ "non_field_errors": "Provide exactly one input mode: `bundle_template` or `items`."
1529
+ }
1530
+ },
1531
+ "V2Metadata": {
1532
+ "type": "object",
1533
+ "additionalProperties": true
1534
+ },
1535
+ "V2BillingScheduleRule": {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "month": {
1539
+ "type": "integer",
1540
+ "nullable": true
1541
+ },
1542
+ "day": {
1543
+ "type": "integer",
1544
+ "nullable": true
1545
+ },
1546
+ "label": {
1547
+ "type": "string",
1548
+ "nullable": true
1549
+ },
1550
+ "display_order": {
1551
+ "type": "integer"
1552
+ }
1553
+ }
1554
+ },
1555
+ "V2CatalogPrice": {
1556
+ "type": "object",
1557
+ "properties": {
1558
+ "id": {
1559
+ "type": "integer"
1560
+ },
1561
+ "product_id": {
1562
+ "type": "integer"
1563
+ },
1564
+ "product_name": {
1565
+ "type": "string"
1566
+ },
1567
+ "product_reference": {
1568
+ "type": "string",
1569
+ "nullable": true
1570
+ },
1571
+ "currency": {
1572
+ "type": "string",
1573
+ "example": "ISK"
1574
+ },
1575
+ "unit_amount": {
1576
+ "type": "string",
1577
+ "format": "decimal",
1578
+ "example": "1990.0000"
1579
+ },
1580
+ "billing_type": {
1581
+ "type": "string",
1582
+ "enum": [
1583
+ "recurring",
1584
+ "one_time"
1585
+ ]
1586
+ },
1587
+ "recurrence_type": {
1588
+ "type": "string",
1589
+ "nullable": true
1590
+ },
1591
+ "interval": {
1592
+ "type": "string",
1593
+ "nullable": true
1594
+ },
1595
+ "interval_count": {
1596
+ "type": "integer",
1597
+ "nullable": true
1598
+ },
1599
+ "billing_day_of_month": {
1600
+ "type": "integer",
1601
+ "nullable": true
1602
+ },
1603
+ "billing_schedule_id": {
1604
+ "type": "integer",
1605
+ "nullable": true
1606
+ },
1607
+ "billing_schedule_name": {
1608
+ "type": "string",
1609
+ "nullable": true
1610
+ },
1611
+ "billing_schedule_timezone": {
1612
+ "type": "string",
1613
+ "nullable": true
1614
+ },
1615
+ "billing_schedule_rules": {
1616
+ "type": "array",
1617
+ "items": {
1618
+ "$ref": "#/components/schemas/V2BillingScheduleRule"
1619
+ }
1620
+ },
1621
+ "next_occurrences": {
1622
+ "type": "array",
1623
+ "items": {
1624
+ "type": "string",
1625
+ "format": "date-time"
1626
+ }
1627
+ },
1628
+ "active": {
1629
+ "type": "boolean"
1630
+ },
1631
+ "currently_effective": {
1632
+ "type": "boolean"
1633
+ },
1634
+ "effective_from": {
1635
+ "type": "string",
1636
+ "format": "date-time",
1637
+ "nullable": true
1638
+ },
1639
+ "effective_to": {
1640
+ "type": "string",
1641
+ "format": "date-time",
1642
+ "nullable": true
1643
+ },
1644
+ "metadata": {
1645
+ "$ref": "#/components/schemas/V2Metadata"
1646
+ },
1647
+ "created_at": {
1648
+ "type": "string",
1649
+ "format": "date-time"
1650
+ },
1651
+ "updated_at": {
1652
+ "type": "string",
1653
+ "format": "date-time"
1654
+ }
1655
+ }
1656
+ },
1657
+ "V2CatalogProduct": {
1658
+ "type": "object",
1659
+ "properties": {
1660
+ "id": {
1661
+ "type": "integer"
1662
+ },
1663
+ "name": {
1664
+ "type": "string"
1665
+ },
1666
+ "description": {
1667
+ "type": "string",
1668
+ "nullable": true
1669
+ },
1670
+ "reference": {
1671
+ "type": "string",
1672
+ "nullable": true
1673
+ },
1674
+ "image_url": {
1675
+ "type": "string",
1676
+ "nullable": true
1677
+ },
1678
+ "active": {
1679
+ "type": "boolean"
1680
+ },
1681
+ "tax_policy": {
1682
+ "type": "string",
1683
+ "nullable": true
1684
+ },
1685
+ "tax_rate_id": {
1686
+ "type": "integer",
1687
+ "nullable": true
1688
+ },
1689
+ "active_price_count": {
1690
+ "type": "integer"
1691
+ },
1692
+ "metadata": {
1693
+ "$ref": "#/components/schemas/V2Metadata"
1694
+ },
1695
+ "created_at": {
1696
+ "type": "string",
1697
+ "format": "date-time"
1698
+ },
1699
+ "updated_at": {
1700
+ "type": "string",
1701
+ "format": "date-time"
1702
+ }
1703
+ }
1704
+ },
1705
+ "V2CatalogProductDetail": {
1706
+ "allOf": [
1707
+ {
1708
+ "$ref": "#/components/schemas/V2CatalogProduct"
1709
+ },
1710
+ {
1711
+ "type": "object",
1712
+ "properties": {
1713
+ "prices": {
1714
+ "type": "array",
1715
+ "items": {
1716
+ "$ref": "#/components/schemas/V2CatalogPrice"
1717
+ }
1718
+ }
1719
+ }
1720
+ }
1721
+ ]
1722
+ },
1723
+ "V2BundleProduct": {
1724
+ "type": "object",
1725
+ "properties": {
1726
+ "id": {
1727
+ "type": "integer"
1728
+ },
1729
+ "name": {
1730
+ "type": "string"
1731
+ },
1732
+ "reference": {
1733
+ "type": "string",
1734
+ "nullable": true
1735
+ },
1736
+ "image_url": {
1737
+ "type": "string",
1738
+ "nullable": true
1739
+ }
1740
+ }
1741
+ },
1742
+ "V2BundleSelectablePrice": {
1743
+ "type": "object",
1744
+ "properties": {
1745
+ "price_id": {
1746
+ "type": "integer"
1747
+ },
1748
+ "display_label": {
1749
+ "type": "string",
1750
+ "nullable": true
1751
+ },
1752
+ "is_default": {
1753
+ "type": "boolean"
1754
+ },
1755
+ "price": {
1756
+ "$ref": "#/components/schemas/V2CatalogPrice"
1757
+ }
1758
+ }
1759
+ },
1760
+ "V2BundleTemplateItem": {
1761
+ "type": "object",
1762
+ "properties": {
1763
+ "id": {
1764
+ "type": "integer"
1765
+ },
1766
+ "product": {
1767
+ "$ref": "#/components/schemas/V2BundleProduct"
1768
+ },
1769
+ "quantity": {
1770
+ "type": "integer"
1771
+ },
1772
+ "required": {
1773
+ "type": "boolean"
1774
+ },
1775
+ "price_option_scope": {
1776
+ "type": "string"
1777
+ },
1778
+ "default_price_id": {
1779
+ "type": "integer",
1780
+ "nullable": true
1781
+ },
1782
+ "default_price": {
1783
+ "nullable": true,
1784
+ "$ref": "#/components/schemas/V2CatalogPrice"
1785
+ },
1786
+ "selectable_prices": {
1787
+ "type": "array",
1788
+ "items": {
1789
+ "$ref": "#/components/schemas/V2BundleSelectablePrice"
1790
+ }
1791
+ },
1792
+ "display_order": {
1793
+ "type": "integer"
1794
+ },
1795
+ "metadata": {
1796
+ "$ref": "#/components/schemas/V2Metadata"
1797
+ }
1798
+ }
1799
+ },
1800
+ "V2BundleTemplate": {
1801
+ "type": "object",
1802
+ "properties": {
1803
+ "id": {
1804
+ "type": "integer"
1805
+ },
1806
+ "name": {
1807
+ "type": "string"
1808
+ },
1809
+ "description": {
1810
+ "type": "string",
1811
+ "nullable": true
1812
+ },
1813
+ "reference": {
1814
+ "type": "string",
1815
+ "nullable": true
1816
+ },
1817
+ "default_currency": {
1818
+ "type": "string",
1819
+ "nullable": true
1820
+ },
1821
+ "active": {
1822
+ "type": "boolean"
1823
+ },
1824
+ "item_count": {
1825
+ "type": "integer"
1826
+ },
1827
+ "metadata": {
1828
+ "$ref": "#/components/schemas/V2Metadata"
1829
+ },
1830
+ "created_at": {
1831
+ "type": "string",
1832
+ "format": "date-time"
1833
+ },
1834
+ "updated_at": {
1835
+ "type": "string",
1836
+ "format": "date-time"
1837
+ }
1838
+ }
1839
+ },
1840
+ "V2BundleTemplateDetail": {
1841
+ "allOf": [
1842
+ {
1843
+ "$ref": "#/components/schemas/V2BundleTemplate"
1844
+ },
1845
+ {
1846
+ "type": "object",
1847
+ "properties": {
1848
+ "items": {
1849
+ "type": "array",
1850
+ "items": {
1851
+ "$ref": "#/components/schemas/V2BundleTemplateItem"
1852
+ }
1853
+ }
1854
+ }
1855
+ }
1856
+ ]
1857
+ },
1858
+ "V2ContractItemInput": {
1859
+ "type": "object",
1860
+ "required": [
1861
+ "price"
1862
+ ],
1863
+ "properties": {
1864
+ "price": {
1865
+ "type": "integer"
1866
+ },
1867
+ "rule_id": {
1868
+ "type": "integer",
1869
+ "nullable": true
1870
+ },
1871
+ "quantity": {
1872
+ "type": "integer",
1873
+ "minimum": 1,
1874
+ "default": 1
1875
+ },
1876
+ "unit_amount_override": {
1877
+ "type": "string",
1878
+ "format": "decimal",
1879
+ "nullable": true
1880
+ },
1881
+ "discount_percent": {
1882
+ "type": "string",
1883
+ "format": "decimal",
1884
+ "nullable": true
1885
+ },
1886
+ "start_at": {
1887
+ "type": "string",
1888
+ "format": "date-time",
1889
+ "nullable": true
1890
+ },
1891
+ "end_at": {
1892
+ "type": "string",
1893
+ "format": "date-time",
1894
+ "nullable": true
1895
+ },
1896
+ "metadata": {
1897
+ "$ref": "#/components/schemas/V2Metadata"
1898
+ }
1899
+ }
1900
+ },
1901
+ "V2BundleItemSelection": {
1902
+ "type": "object",
1903
+ "required": [
1904
+ "bundle_item"
1905
+ ],
1906
+ "properties": {
1907
+ "bundle_item": {
1908
+ "type": "integer"
1909
+ },
1910
+ "include": {
1911
+ "type": "boolean",
1912
+ "default": true
1913
+ },
1914
+ "selected_price": {
1915
+ "type": "integer",
1916
+ "nullable": true
1917
+ },
1918
+ "quantity": {
1919
+ "type": "integer",
1920
+ "minimum": 1
1921
+ },
1922
+ "unit_amount_override": {
1923
+ "type": "string",
1924
+ "format": "decimal",
1925
+ "nullable": true
1926
+ },
1927
+ "discount_percent": {
1928
+ "type": "string",
1929
+ "format": "decimal",
1930
+ "nullable": true
1931
+ },
1932
+ "start_at": {
1933
+ "type": "string",
1934
+ "format": "date-time",
1935
+ "nullable": true
1936
+ },
1937
+ "end_at": {
1938
+ "type": "string",
1939
+ "format": "date-time",
1940
+ "nullable": true
1941
+ },
1942
+ "metadata": {
1943
+ "$ref": "#/components/schemas/V2Metadata"
1944
+ }
1945
+ }
1946
+ },
1947
+ "V2AdditionalBundle": {
1948
+ "type": "object",
1949
+ "required": [
1950
+ "rule_id"
1951
+ ],
1952
+ "properties": {
1953
+ "rule_id": {
1954
+ "type": "integer"
1955
+ },
1956
+ "bundle_template": {
1957
+ "type": "integer"
1958
+ },
1959
+ "bundle_template_id": {
1960
+ "type": "integer"
1961
+ },
1962
+ "bundle_selections": {
1963
+ "type": "array",
1964
+ "items": {
1965
+ "$ref": "#/components/schemas/V2BundleItemSelection"
1966
+ }
1967
+ },
1968
+ "quantity": {
1969
+ "type": "integer",
1970
+ "minimum": 1,
1971
+ "default": 1
1972
+ },
1973
+ "metadata": {
1974
+ "$ref": "#/components/schemas/V2Metadata"
1975
+ }
1976
+ }
1977
+ },
1978
+ "V2BundleAddonDiscoveryRequest": {
1979
+ "type": "object",
1980
+ "properties": {
1981
+ "bundle_item_selections": {
1982
+ "type": "array",
1983
+ "items": {
1984
+ "$ref": "#/components/schemas/V2BundleItemSelection"
1985
+ }
1986
+ }
1987
+ }
1988
+ },
1989
+ "V2BundleAddonProductOffer": {
1990
+ "type": "object",
1991
+ "properties": {
1992
+ "rule_id": {
1993
+ "type": "integer"
1994
+ },
1995
+ "relationship_type": {
1996
+ "type": "string"
1997
+ },
1998
+ "min_quantity": {
1999
+ "type": "integer"
2000
+ },
2001
+ "max_quantity": {
2002
+ "type": "integer",
2003
+ "nullable": true
2004
+ },
2005
+ "same_interval_required": {
2006
+ "type": "boolean"
2007
+ },
2008
+ "same_currency_required": {
2009
+ "type": "boolean"
2010
+ },
2011
+ "product": {
2012
+ "$ref": "#/components/schemas/V2BundleProduct"
2013
+ },
2014
+ "default_price_id": {
2015
+ "type": "integer"
2016
+ },
2017
+ "selectable_prices": {
2018
+ "type": "array",
2019
+ "items": {
2020
+ "$ref": "#/components/schemas/V2CatalogPrice"
2021
+ }
2022
+ }
2023
+ }
2024
+ },
2025
+ "V2BundleAddonBundleOffer": {
2026
+ "type": "object",
2027
+ "properties": {
2028
+ "rule_id": {
2029
+ "type": "integer"
2030
+ },
2031
+ "relationship_type": {
2032
+ "type": "string"
2033
+ },
2034
+ "min_quantity": {
2035
+ "type": "integer"
2036
+ },
2037
+ "max_quantity": {
2038
+ "type": "integer",
2039
+ "nullable": true
2040
+ },
2041
+ "same_interval_required": {
2042
+ "type": "boolean"
2043
+ },
2044
+ "same_currency_required": {
2045
+ "type": "boolean"
2046
+ },
2047
+ "bundle_template": {
2048
+ "$ref": "#/components/schemas/V2BundleTemplateDetail"
2049
+ }
2050
+ }
2051
+ },
2052
+ "V2BundleAddonDiscoveryResponse": {
2053
+ "type": "object",
2054
+ "properties": {
2055
+ "bundle_template_id": {
2056
+ "type": "integer"
2057
+ },
2058
+ "currency": {
2059
+ "type": "string"
2060
+ },
2061
+ "recurrence_type": {
2062
+ "type": "string"
2063
+ },
2064
+ "interval": {
2065
+ "type": "string",
2066
+ "nullable": true
2067
+ },
2068
+ "interval_count": {
2069
+ "type": "integer",
2070
+ "nullable": true
2071
+ },
2072
+ "billing_day_of_month": {
2073
+ "type": "integer",
2074
+ "nullable": true
2075
+ },
2076
+ "billing_schedule_id": {
2077
+ "type": "integer",
2078
+ "nullable": true
2079
+ },
2080
+ "product_addons": {
2081
+ "type": "array",
2082
+ "items": {
2083
+ "$ref": "#/components/schemas/V2BundleAddonProductOffer"
2084
+ }
2085
+ },
2086
+ "bundle_addons": {
2087
+ "type": "array",
2088
+ "items": {
2089
+ "$ref": "#/components/schemas/V2BundleAddonBundleOffer"
2090
+ }
2091
+ }
2092
+ }
2093
+ },
2094
+ "V2SubscriptionOfferQuoteCreate": {
2095
+ "type": "object",
2096
+ "properties": {
2097
+ "currency": {
2098
+ "type": "string"
2099
+ },
2100
+ "bundle_template": {
2101
+ "type": "integer",
2102
+ "nullable": true
2103
+ },
2104
+ "bundle_quantity": {
2105
+ "type": "integer",
2106
+ "minimum": 1,
2107
+ "default": 1
2108
+ },
2109
+ "bundle_item_selections": {
2110
+ "type": "array",
2111
+ "items": {
2112
+ "$ref": "#/components/schemas/V2BundleItemSelection"
2113
+ }
2114
+ },
2115
+ "items": {
2116
+ "type": "array",
2117
+ "items": {
2118
+ "$ref": "#/components/schemas/V2ContractItemInput"
2119
+ }
2120
+ },
2121
+ "initial_items": {
2122
+ "type": "array",
2123
+ "items": {
2124
+ "$ref": "#/components/schemas/V2ContractItemInput"
2125
+ }
2126
+ },
2127
+ "additional_items": {
2128
+ "type": "array",
2129
+ "items": {
2130
+ "$ref": "#/components/schemas/V2ContractItemInput"
2131
+ }
2132
+ },
2133
+ "additional_bundles": {
2134
+ "type": "array",
2135
+ "items": {
2136
+ "$ref": "#/components/schemas/V2AdditionalBundle"
2137
+ }
2138
+ }
2139
+ }
2140
+ },
2141
+ "V2SubscriptionContractCreate": {
2142
+ "allOf": [
2143
+ {
2144
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteCreate"
2145
+ },
2146
+ {
2147
+ "type": "object",
2148
+ "properties": {
2149
+ "customer": {
2150
+ "type": "integer"
2151
+ },
2152
+ "customer_reference": {
2153
+ "type": "string"
2154
+ },
2155
+ "state": {
2156
+ "type": "string",
2157
+ "enum": [
2158
+ "inactive",
2159
+ "active",
2160
+ "paused",
2161
+ "canceled"
2162
+ ],
2163
+ "default": "inactive"
2164
+ },
2165
+ "billing_anchor_at": {
2166
+ "type": "string",
2167
+ "format": "date-time",
2168
+ "nullable": true
2169
+ },
2170
+ "next_billing_at": {
2171
+ "type": "string",
2172
+ "format": "date-time",
2173
+ "nullable": true
2174
+ },
2175
+ "recurring": {
2176
+ "type": "boolean",
2177
+ "default": true
2178
+ },
2179
+ "payment_processor_override": {
2180
+ "type": "integer",
2181
+ "nullable": true
2182
+ },
2183
+ "metadata": {
2184
+ "$ref": "#/components/schemas/V2Metadata"
2185
+ },
2186
+ "initial_billing_mode": {
2187
+ "type": "string",
2188
+ "enum": [
2189
+ "none",
2190
+ "create_initial_run",
2191
+ "next_invoice"
2192
+ ],
2193
+ "default": "none",
2194
+ "description": "`none` creates recurring schedules without a first-period billing artifact. `create_initial_run` creates a scheduled initial BillingRun with first-period recurring lines and one-time initial items. `next_invoice` creates pending first-period recurring proration lines for the first scheduled invoice."
2195
+ }
2196
+ }
2197
+ }
2198
+ ]
2199
+ },
2200
+ "V2SubscriptionContractPatch": {
2201
+ "type": "object",
2202
+ "properties": {
2203
+ "metadata": {
2204
+ "$ref": "#/components/schemas/V2Metadata"
2205
+ },
2206
+ "payment_processor_override": {
2207
+ "type": "integer",
2208
+ "nullable": true
2209
+ }
2210
+ }
2211
+ },
2212
+ "V2SubscriptionContractCancel": {
2213
+ "type": "object",
2214
+ "properties": {
2215
+ "cancel_at_period_end": {
2216
+ "type": "boolean",
2217
+ "default": false
2218
+ },
2219
+ "effective_at": {
2220
+ "type": "string",
2221
+ "format": "date-time",
2222
+ "nullable": true
2223
+ },
2224
+ "cancel_at": {
2225
+ "type": "string",
2226
+ "format": "date-time",
2227
+ "nullable": true
2228
+ },
2229
+ "reason": {
2230
+ "type": "string",
2231
+ "nullable": true
2232
+ },
2233
+ "proration_behavior": {
2234
+ "type": "string",
2235
+ "enum": [
2236
+ "none",
2237
+ "create_prorations",
2238
+ "always_invoice"
2239
+ ],
2240
+ "nullable": true
2241
+ },
2242
+ "settlement_behavior": {
2243
+ "type": "string",
2244
+ "enum": [
2245
+ "next_invoice",
2246
+ "invoice_now",
2247
+ "credit_balance",
2248
+ "refund_manual"
2249
+ ],
2250
+ "nullable": true
2251
+ },
2252
+ "include_pending_adjustments": {
2253
+ "type": "boolean",
2254
+ "default": false
2255
+ },
2256
+ "idempotency_key": {
2257
+ "type": "string",
2258
+ "nullable": true
2259
+ },
2260
+ "preview_token": {
2261
+ "type": "string",
2262
+ "nullable": true
2263
+ }
2264
+ }
2265
+ },
2266
+ "V2SubscriptionContractRestart": {
2267
+ "type": "object",
2268
+ "properties": {
2269
+ "effective_at": {
2270
+ "type": "string",
2271
+ "format": "date-time",
2272
+ "nullable": true
2273
+ },
2274
+ "reason": {
2275
+ "type": "string",
2276
+ "nullable": true
2277
+ },
2278
+ "proration_behavior": {
2279
+ "type": "string",
2280
+ "enum": [
2281
+ "none",
2282
+ "create_prorations",
2283
+ "always_invoice"
2284
+ ],
2285
+ "nullable": true
2286
+ },
2287
+ "settlement_behavior": {
2288
+ "type": "string",
2289
+ "enum": [
2290
+ "next_invoice",
2291
+ "invoice_now",
2292
+ "credit_balance",
2293
+ "refund_manual"
2294
+ ],
2295
+ "nullable": true
2296
+ },
2297
+ "include_pending_adjustments": {
2298
+ "type": "boolean",
2299
+ "default": false
2300
+ },
2301
+ "idempotency_key": {
2302
+ "type": "string",
2303
+ "nullable": true
2304
+ },
2305
+ "preview_token": {
2306
+ "type": "string",
2307
+ "nullable": true
2308
+ }
2309
+ }
2310
+ },
2311
+ "V2SubscriptionContractPause": {
2312
+ "type": "object",
2313
+ "required": [
2314
+ "start_date",
2315
+ "end_date"
2316
+ ],
2317
+ "properties": {
2318
+ "start_date": {
2319
+ "type": "string",
2320
+ "format": "date"
2321
+ },
2322
+ "end_date": {
2323
+ "type": "string",
2324
+ "format": "date"
2325
+ },
2326
+ "reason": {
2327
+ "type": "string",
2328
+ "nullable": true
2329
+ },
2330
+ "proration_behavior": {
2331
+ "type": "string",
2332
+ "enum": [
2333
+ "none",
2334
+ "create_prorations",
2335
+ "always_invoice"
2336
+ ],
2337
+ "nullable": true
2338
+ },
2339
+ "settlement_behavior": {
2340
+ "type": "string",
2341
+ "enum": [
2342
+ "next_invoice",
2343
+ "invoice_now",
2344
+ "credit_balance",
2345
+ "refund_manual"
2346
+ ],
2347
+ "nullable": true
2348
+ },
2349
+ "include_pending_adjustments": {
2350
+ "type": "boolean",
2351
+ "default": false
2352
+ },
2353
+ "idempotency_key": {
2354
+ "type": "string",
2355
+ "nullable": true
2356
+ },
2357
+ "preview_token": {
2358
+ "type": "string",
2359
+ "nullable": true
2360
+ }
2361
+ }
2362
+ },
2363
+ "V2SubscriptionContractResume": {
2364
+ "type": "object",
2365
+ "properties": {
2366
+ "effective_at": {
2367
+ "type": "string",
2368
+ "format": "date-time",
2369
+ "nullable": true
2370
+ },
2371
+ "reason": {
2372
+ "type": "string",
2373
+ "nullable": true
2374
+ },
2375
+ "proration_behavior": {
2376
+ "type": "string",
2377
+ "enum": [
2378
+ "none",
2379
+ "create_prorations",
2380
+ "always_invoice"
2381
+ ],
2382
+ "nullable": true
2383
+ },
2384
+ "settlement_behavior": {
2385
+ "type": "string",
2386
+ "enum": [
2387
+ "next_invoice",
2388
+ "invoice_now",
2389
+ "credit_balance",
2390
+ "refund_manual"
2391
+ ],
2392
+ "nullable": true
2393
+ },
2394
+ "include_pending_adjustments": {
2395
+ "type": "boolean",
2396
+ "default": false
2397
+ },
2398
+ "idempotency_key": {
2399
+ "type": "string",
2400
+ "nullable": true
2401
+ },
2402
+ "preview_token": {
2403
+ "type": "string",
2404
+ "nullable": true
2405
+ }
2406
+ }
2407
+ },
2408
+ "V2SubscriptionContractProrationPreview": {
2409
+ "type": "object",
2410
+ "properties": {
2411
+ "operation": {
2412
+ "type": "string",
2413
+ "enum": [
2414
+ "add_item",
2415
+ "remove_item",
2416
+ "update_item",
2417
+ "pause",
2418
+ "resume",
2419
+ "cancel",
2420
+ "restart"
2421
+ ],
2422
+ "default": "update_item"
2423
+ },
2424
+ "contract_item": {
2425
+ "type": "integer"
2426
+ },
2427
+ "price": {
2428
+ "type": "integer",
2429
+ "nullable": true
2430
+ },
2431
+ "quantity": {
2432
+ "type": "integer",
2433
+ "nullable": true
2434
+ },
2435
+ "discount_percent": {
2436
+ "type": "string",
2437
+ "format": "decimal",
2438
+ "nullable": true
2439
+ },
2440
+ "effective_at": {
2441
+ "type": "string",
2442
+ "format": "date-time",
2443
+ "nullable": true
2444
+ },
2445
+ "start_date": {
2446
+ "type": "string",
2447
+ "format": "date",
2448
+ "nullable": true
2449
+ },
2450
+ "end_date": {
2451
+ "type": "string",
2452
+ "format": "date",
2453
+ "nullable": true
2454
+ },
2455
+ "pause_end_at": {
2456
+ "type": "string",
2457
+ "format": "date-time",
2458
+ "nullable": true
2459
+ },
2460
+ "proration_behavior": {
2461
+ "type": "string",
2462
+ "enum": [
2463
+ "none",
2464
+ "create_prorations",
2465
+ "always_invoice"
2466
+ ],
2467
+ "nullable": true
2468
+ },
2469
+ "settlement_behavior": {
2470
+ "type": "string",
2471
+ "enum": [
2472
+ "next_invoice",
2473
+ "invoice_now",
2474
+ "credit_balance",
2475
+ "refund_manual"
2476
+ ],
2477
+ "nullable": true
2478
+ },
2479
+ "include_pending_adjustments": {
2480
+ "type": "boolean",
2481
+ "default": false
2482
+ },
2483
+ "reason": {
2484
+ "type": "string",
2485
+ "nullable": true
2486
+ }
2487
+ }
2488
+ },
2489
+ "V2SubscriptionContractItemAdd": {
2490
+ "allOf": [
2491
+ {
2492
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationPreview"
2493
+ },
2494
+ {
2495
+ "type": "object",
2496
+ "properties": {
2497
+ "operation": {
2498
+ "type": "string",
2499
+ "enum": [
2500
+ "add_item"
2501
+ ],
2502
+ "default": "add_item"
2503
+ },
2504
+ "idempotency_key": {
2505
+ "type": "string",
2506
+ "nullable": true
2507
+ },
2508
+ "preview_token": {
2509
+ "type": "string"
2510
+ }
2511
+ }
2512
+ }
2513
+ ]
2514
+ },
2515
+ "V2SubscriptionContractItemRemove": {
2516
+ "allOf": [
2517
+ {
2518
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationPreview"
2519
+ },
2520
+ {
2521
+ "type": "object",
2522
+ "required": [
2523
+ "contract_item"
2524
+ ],
2525
+ "properties": {
2526
+ "operation": {
2527
+ "type": "string",
2528
+ "enum": [
2529
+ "remove_item"
2530
+ ],
2531
+ "default": "remove_item"
2532
+ },
2533
+ "idempotency_key": {
2534
+ "type": "string",
2535
+ "nullable": true
2536
+ },
2537
+ "preview_token": {
2538
+ "type": "string"
2539
+ }
2540
+ }
2541
+ }
2542
+ ]
2543
+ },
2544
+ "V2SubscriptionContractItemUpdate": {
2545
+ "allOf": [
2546
+ {
2547
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationPreview"
2548
+ },
2549
+ {
2550
+ "type": "object",
2551
+ "required": [
2552
+ "contract_item"
2553
+ ],
2554
+ "properties": {
2555
+ "idempotency_key": {
2556
+ "type": "string",
2557
+ "nullable": true
2558
+ },
2559
+ "preview_token": {
2560
+ "type": "string"
2561
+ }
2562
+ }
2563
+ }
2564
+ ]
2565
+ },
2566
+ "V2SubscriptionContractProrationLine": {
2567
+ "type": "object",
2568
+ "properties": {
2569
+ "line_type": {
2570
+ "type": "string"
2571
+ },
2572
+ "price_id": {
2573
+ "type": "integer",
2574
+ "nullable": true
2575
+ },
2576
+ "price_version_id": {
2577
+ "type": "integer",
2578
+ "nullable": true
2579
+ },
2580
+ "product_name": {
2581
+ "type": "string"
2582
+ },
2583
+ "product_reference": {
2584
+ "type": "string",
2585
+ "nullable": true
2586
+ },
2587
+ "quantity": {
2588
+ "type": "integer"
2589
+ },
2590
+ "unit_amount": {
2591
+ "type": "string",
2592
+ "format": "decimal"
2593
+ },
2594
+ "discount_percent": {
2595
+ "type": "string",
2596
+ "format": "decimal",
2597
+ "nullable": true
2598
+ },
2599
+ "currency": {
2600
+ "type": "string"
2601
+ },
2602
+ "line_subtotal_amount": {
2603
+ "type": "string",
2604
+ "format": "decimal"
2605
+ },
2606
+ "line_tax_amount": {
2607
+ "type": "string",
2608
+ "format": "decimal"
2609
+ },
2610
+ "line_total_amount": {
2611
+ "type": "string",
2612
+ "format": "decimal"
2613
+ },
2614
+ "proration_factor": {
2615
+ "type": "string",
2616
+ "format": "decimal"
2617
+ },
2618
+ "proration_reason": {
2619
+ "type": "string",
2620
+ "nullable": true
2621
+ },
2622
+ "adjustment_service_start_at": {
2623
+ "type": "string",
2624
+ "format": "date-time"
2625
+ },
2626
+ "adjustment_service_end_at": {
2627
+ "type": "string",
2628
+ "format": "date-time"
2629
+ },
2630
+ "tax_percent": {
2631
+ "type": "string",
2632
+ "format": "decimal",
2633
+ "nullable": true
2634
+ },
2635
+ "tax_calculation_mode": {
2636
+ "type": "string",
2637
+ "nullable": true
2638
+ },
2639
+ "source_billing_run_line_id": {
2640
+ "type": "integer",
2641
+ "nullable": true
2642
+ }
2643
+ }
2644
+ },
2645
+ "V2SubscriptionContractProrationPreviewResponse": {
2646
+ "type": "object",
2647
+ "properties": {
2648
+ "operation": {
2649
+ "type": "string"
2650
+ },
2651
+ "effective_at": {
2652
+ "type": "string",
2653
+ "format": "date-time"
2654
+ },
2655
+ "proration_behavior": {
2656
+ "type": "string",
2657
+ "nullable": true
2658
+ },
2659
+ "settlement_behavior": {
2660
+ "type": "string",
2661
+ "nullable": true
2662
+ },
2663
+ "old_recurring_total": {
2664
+ "type": "string",
2665
+ "format": "decimal"
2666
+ },
2667
+ "new_recurring_total": {
2668
+ "type": "string",
2669
+ "format": "decimal"
2670
+ },
2671
+ "debit_lines": {
2672
+ "type": "array",
2673
+ "items": {
2674
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationLine"
2675
+ }
2676
+ },
2677
+ "credit_lines": {
2678
+ "type": "array",
2679
+ "items": {
2680
+ "$ref": "#/components/schemas/V2SubscriptionContractProrationLine"
2681
+ }
2682
+ },
2683
+ "net_amount_due_now": {
2684
+ "type": "string",
2685
+ "format": "decimal"
2686
+ },
2687
+ "net_balance_credit": {
2688
+ "type": "string",
2689
+ "format": "decimal"
2690
+ },
2691
+ "next_billing_estimate": {
2692
+ "type": "string",
2693
+ "format": "decimal"
2694
+ },
2695
+ "resolved_price_version_ids": {
2696
+ "type": "object",
2697
+ "additionalProperties": {
2698
+ "type": "integer"
2699
+ }
2700
+ },
2701
+ "preview_token": {
2702
+ "type": "string"
2703
+ }
2704
+ }
2705
+ },
2706
+ "V2SubscriptionContractItemUpdateResponse": {
2707
+ "type": "object",
2708
+ "properties": {
2709
+ "change_id": {
2710
+ "type": "integer"
2711
+ },
2712
+ "billing_run_id": {
2713
+ "type": "integer",
2714
+ "nullable": true
2715
+ },
2716
+ "pending_adjustment_ids": {
2717
+ "type": "array",
2718
+ "items": {
2719
+ "type": "integer"
2720
+ }
2721
+ },
2722
+ "replayed": {
2723
+ "type": "boolean"
2724
+ },
2725
+ "contract": {
2726
+ "$ref": "#/components/schemas/V2SubscriptionContract"
2727
+ }
2728
+ }
2729
+ },
2730
+ "V2CheckoutCreate": {
2731
+ "allOf": [
2732
+ {
2733
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteCreate"
2734
+ },
2735
+ {
2736
+ "type": "object",
2737
+ "properties": {
2738
+ "collection_method": {
2739
+ "type": "string",
2740
+ "enum": [
2741
+ "card",
2742
+ "claim",
2743
+ "invoice"
2744
+ ],
2745
+ "default": "card"
2746
+ },
2747
+ "account_payment_processor": {
2748
+ "type": "integer",
2749
+ "nullable": true
2750
+ },
2751
+ "customer": {
2752
+ "type": "integer"
2753
+ },
2754
+ "customer_reference": {
2755
+ "type": "string"
2756
+ },
2757
+ "metadata": {
2758
+ "$ref": "#/components/schemas/V2Metadata"
2759
+ },
2760
+ "delivery_address": {
2761
+ "$ref": "#/components/schemas/V2Address",
2762
+ "description": "Optional delivery-address snapshot for physical products or alternate delivery."
2763
+ }
2764
+ }
2765
+ }
2766
+ ]
2767
+ },
2768
+ "V2Address": {
2769
+ "type": "object",
2770
+ "properties": {
2771
+ "delivery_name": {
2772
+ "type": "string",
2773
+ "nullable": true
2774
+ },
2775
+ "address_1": {
2776
+ "type": "string"
2777
+ },
2778
+ "address_2": {
2779
+ "type": "string",
2780
+ "nullable": true
2781
+ },
2782
+ "address_3": {
2783
+ "type": "string",
2784
+ "nullable": true
2785
+ },
2786
+ "zip_code": {
2787
+ "type": "string"
2788
+ },
2789
+ "city": {
2790
+ "type": "string",
2791
+ "nullable": true,
2792
+ "description": "Required by the embedded checkout widget for non-Icelandic addresses. Icelandic addresses resolve city from `zip_code`."
2793
+ },
2794
+ "country": {
2795
+ "type": "string",
2796
+ "description": "ISO 3166-1 alpha-2 country code.",
2797
+ "default": "IS"
2798
+ }
2799
+ }
2800
+ },
2801
+ "V2PaymentProcessorOptionsRequest": {
2802
+ "allOf": [
2803
+ {
2804
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteCreate"
2805
+ },
2806
+ {
2807
+ "type": "object",
2808
+ "properties": {
2809
+ "collection_method": {
2810
+ "type": "string",
2811
+ "enum": [
2812
+ "card",
2813
+ "claim",
2814
+ "invoice"
2815
+ ],
2816
+ "default": "card"
2817
+ },
2818
+ "account_payment_processor": {
2819
+ "type": "integer",
2820
+ "nullable": true
2821
+ }
2822
+ }
2823
+ }
2824
+ ]
2825
+ },
2826
+ "V2PaymentProcessorOption": {
2827
+ "type": "object",
2828
+ "properties": {
2829
+ "account_payment_processor_id": {
2830
+ "type": "integer"
2831
+ },
2832
+ "display_name": {
2833
+ "type": "string"
2834
+ },
2835
+ "payment_processor": {
2836
+ "type": "string"
2837
+ },
2838
+ "payment_processor_type": {
2839
+ "type": "string",
2840
+ "nullable": true
2841
+ },
2842
+ "collection_method": {
2843
+ "type": "string",
2844
+ "enum": [
2845
+ "card",
2846
+ "claim",
2847
+ "invoice"
2848
+ ]
2849
+ },
2850
+ "resolution_source": {
2851
+ "type": "string",
2852
+ "enum": [
2853
+ "explicit",
2854
+ "eligible"
2855
+ ]
2856
+ },
2857
+ "render_mode": {
2858
+ "type": "string",
2859
+ "nullable": true
2860
+ },
2861
+ "is_3d_secure": {
2862
+ "type": "boolean"
2863
+ },
2864
+ "card_collection_in_frontend": {
2865
+ "type": "boolean"
2866
+ },
2867
+ "supports_checkout": {
2868
+ "type": "boolean"
2869
+ },
2870
+ "address_required": {
2871
+ "type": "boolean"
2872
+ },
2873
+ "supports_payment_method_registration": {
2874
+ "type": "boolean"
2875
+ },
2876
+ "supports_initial_charge": {
2877
+ "type": "boolean"
2878
+ },
2879
+ "supports_recurring_charge": {
2880
+ "type": "boolean"
2881
+ },
2882
+ "registration_mode": {
2883
+ "type": "string",
2884
+ "enum": [
2885
+ "card_registration",
2886
+ "claim_setup",
2887
+ "invoice_collection"
2888
+ ]
2889
+ },
2890
+ "public_registration_config": {
2891
+ "type": "object"
2892
+ }
2893
+ }
2894
+ },
2895
+ "V2PaymentProcessorOptionsResponse": {
2896
+ "type": "object",
2897
+ "properties": {
2898
+ "currency": {
2899
+ "type": "string"
2900
+ },
2901
+ "collection_method": {
2902
+ "type": "string",
2903
+ "enum": [
2904
+ "card",
2905
+ "claim",
2906
+ "invoice"
2907
+ ]
2908
+ },
2909
+ "selected_account_payment_processor_id": {
2910
+ "type": "integer",
2911
+ "nullable": true
2912
+ },
2913
+ "selection_reason": {
2914
+ "type": "string",
2915
+ "nullable": true
2916
+ },
2917
+ "requires_selection": {
2918
+ "type": "boolean"
2919
+ },
2920
+ "options": {
2921
+ "type": "array",
2922
+ "items": {
2923
+ "$ref": "#/components/schemas/V2PaymentProcessorOption"
2924
+ }
2925
+ }
2926
+ }
2927
+ },
2928
+ "V2CheckoutSessionCreate": {
2929
+ "type": "object",
2930
+ "required": [
2931
+ "sales_channel"
2932
+ ],
2933
+ "properties": {
2934
+ "sales_channel": {
2935
+ "type": "string",
2936
+ "description": "Sales channel id or account-scoped reference."
2937
+ },
2938
+ "customer": {
2939
+ "type": "integer",
2940
+ "description": "Existing customer id. Provide only one of `customer` or `customer_reference`."
2941
+ },
2942
+ "customer_reference": {
2943
+ "type": "string",
2944
+ "description": "Seller customer reference. If an existing customer has this reference, the session is bound to that customer."
2945
+ },
2946
+ "metadata": {
2947
+ "$ref": "#/components/schemas/V2Metadata"
2948
+ },
2949
+ "theme": {
2950
+ "$ref": "#/components/schemas/V2Metadata",
2951
+ "description": "Optional checkout theme override for this session."
2952
+ },
2953
+ "terms_url": {
2954
+ "type": "string",
2955
+ "format": "uri",
2956
+ "description": "Optional per-session terms URL. Sales-channel terms are used when omitted."
2957
+ },
2958
+ "terms_required": {
2959
+ "type": "boolean",
2960
+ "default": false,
2961
+ "description": "Requires buyer acceptance for this session. A provided `terms_url` also makes acceptance required."
2962
+ },
2963
+ "expires_in_seconds": {
2964
+ "type": "integer",
2965
+ "minimum": 60,
2966
+ "maximum": 86400
2967
+ }
2968
+ }
2969
+ },
2970
+ "V2CheckoutSession": {
2971
+ "type": "object",
2972
+ "properties": {
2973
+ "token": {
2974
+ "type": "string",
2975
+ "format": "uuid"
2976
+ },
2977
+ "status": {
2978
+ "type": "string",
2979
+ "enum": [
2980
+ "pending",
2981
+ "completed",
2982
+ "expired",
2983
+ "canceled"
2984
+ ]
2985
+ },
2986
+ "expires_at": {
2987
+ "type": "string",
2988
+ "format": "date-time"
2989
+ },
2990
+ "sales_channel": {
2991
+ "type": "string"
2992
+ },
2993
+ "allowed_origins": {
2994
+ "type": "array",
2995
+ "items": {
2996
+ "type": "string"
2997
+ }
2998
+ },
2999
+ "theme": {
3000
+ "$ref": "#/components/schemas/V2Metadata"
3001
+ },
3002
+ "checkout_token": {
3003
+ "type": "string",
3004
+ "format": "uuid",
3005
+ "nullable": true
3006
+ },
3007
+ "contract_id": {
3008
+ "type": "integer",
3009
+ "nullable": true
3010
+ },
3011
+ "initial_billing_run_id": {
3012
+ "type": "integer",
3013
+ "nullable": true
3014
+ },
3015
+ "metadata": {
3016
+ "$ref": "#/components/schemas/V2Metadata"
3017
+ }
3018
+ }
3019
+ },
3020
+ "V2CustomerPaymentMethodSetup": {
3021
+ "type": "object",
3022
+ "properties": {
3023
+ "collection_method": {
3024
+ "type": "string",
3025
+ "enum": [
3026
+ "card",
3027
+ "claim",
3028
+ "invoice"
3029
+ ]
3030
+ },
3031
+ "claim_rule_id": {
3032
+ "type": "integer"
3033
+ },
3034
+ "claim_template_id": {
3035
+ "type": "integer"
3036
+ },
3037
+ "payor_id": {
3038
+ "type": "string"
3039
+ },
3040
+ "external_customer_reference": {
3041
+ "type": "string"
3042
+ },
3043
+ "invoice_email": {
3044
+ "type": "string",
3045
+ "format": "email"
3046
+ }
3047
+ },
3048
+ "additionalProperties": false
3049
+ },
3050
+ "V2CustomerPaymentMethodMetadata": {
3051
+ "type": "object",
3052
+ "properties": {
3053
+ "v2_setup": {
3054
+ "$ref": "#/components/schemas/V2CustomerPaymentMethodSetup"
3055
+ },
3056
+ "metadata": {
3057
+ "$ref": "#/components/schemas/V2Metadata"
3058
+ }
3059
+ }
3060
+ },
3061
+ "V2CustomerPaymentMethod": {
3062
+ "type": "object",
3063
+ "properties": {
3064
+ "id": {
3065
+ "type": "integer"
3066
+ },
3067
+ "collection_method": {
3068
+ "type": "string",
3069
+ "enum": [
3070
+ "card",
3071
+ "claim",
3072
+ "invoice"
3073
+ ]
3074
+ },
3075
+ "payment_processor": {
3076
+ "type": "string"
3077
+ },
3078
+ "account_payment_processor_id": {
3079
+ "type": "integer",
3080
+ "nullable": true
3081
+ },
3082
+ "account_payment_processor_name": {
3083
+ "type": "string",
3084
+ "nullable": true
3085
+ },
3086
+ "display_info": {
3087
+ "type": "string"
3088
+ },
3089
+ "verified": {
3090
+ "type": "boolean"
3091
+ },
3092
+ "canceled": {
3093
+ "type": "boolean"
3094
+ },
3095
+ "valid_until": {
3096
+ "type": "string",
3097
+ "format": "date-time",
3098
+ "nullable": true
3099
+ },
3100
+ "metadata": {
3101
+ "$ref": "#/components/schemas/V2CustomerPaymentMethodMetadata"
3102
+ }
3103
+ }
3104
+ },
3105
+ "V2CustomerPaymentMethodCreate": {
3106
+ "type": "object",
3107
+ "required": [
3108
+ "collection_method",
3109
+ "account_payment_processor"
3110
+ ],
3111
+ "properties": {
3112
+ "collection_method": {
3113
+ "type": "string",
3114
+ "enum": [
3115
+ "card",
3116
+ "claim",
3117
+ "invoice"
3118
+ ]
3119
+ },
3120
+ "account_payment_processor": {
3121
+ "type": "integer",
3122
+ "description": "Account payment processor id. Required for all collection methods."
3123
+ },
3124
+ "display_info": {
3125
+ "type": "string"
3126
+ },
3127
+ "metadata": {
3128
+ "$ref": "#/components/schemas/V2Metadata"
3129
+ },
3130
+ "token": {
3131
+ "type": "string",
3132
+ "description": "Required for direct card imports. Never returned by the API."
3133
+ },
3134
+ "valid_until": {
3135
+ "type": "string",
3136
+ "format": "date-time",
3137
+ "description": "Card expiry timestamp. For card imports, provide this or expiration_month plus expiration_year."
3138
+ },
3139
+ "expiration_month": {
3140
+ "type": "integer",
3141
+ "minimum": 1,
3142
+ "maximum": 12
3143
+ },
3144
+ "expiration_year": {
3145
+ "type": "integer",
3146
+ "minimum": 2000
3147
+ },
3148
+ "claim_rule_id": {
3149
+ "type": "integer",
3150
+ "nullable": true
3151
+ },
3152
+ "claim_template_id": {
3153
+ "type": "integer",
3154
+ "nullable": true
3155
+ },
3156
+ "payor_id": {
3157
+ "type": "string",
3158
+ "description": "Claim payor kennitala. Defaults from customer_reference when omitted and valid."
3159
+ },
3160
+ "external_customer_reference": {
3161
+ "type": "string",
3162
+ "description": "Invoice-system customer reference. Defaults from customer_reference when omitted."
3163
+ },
3164
+ "invoice_email": {
3165
+ "type": "string",
3166
+ "format": "email",
3167
+ "description": "Invoice delivery email. Defaults from the customer email when omitted."
3168
+ }
3169
+ }
3170
+ },
3171
+ "V2CustomerPaymentMethodPatch": {
3172
+ "type": "object",
3173
+ "properties": {
3174
+ "display_info": {
3175
+ "type": "string"
3176
+ },
3177
+ "metadata": {
3178
+ "$ref": "#/components/schemas/V2Metadata",
3179
+ "description": "Shallow-merged into existing client metadata. A null value removes that metadata key."
3180
+ },
3181
+ "claim_rule_id": {
3182
+ "type": "integer",
3183
+ "nullable": true
3184
+ },
3185
+ "claim_template_id": {
3186
+ "type": "integer",
3187
+ "nullable": true
3188
+ },
3189
+ "payor_id": {
3190
+ "type": "string"
3191
+ },
3192
+ "external_customer_reference": {
3193
+ "type": "string"
3194
+ },
3195
+ "invoice_email": {
3196
+ "type": "string",
3197
+ "format": "email"
3198
+ }
3199
+ },
3200
+ "additionalProperties": false
3201
+ },
3202
+ "V2CheckoutFinalize": {
3203
+ "type": "object",
3204
+ "properties": {
3205
+ "execute_payment": {
3206
+ "type": "boolean",
3207
+ "default": true
3208
+ },
3209
+ "payment_method_registration_token": {
3210
+ "type": "string",
3211
+ "format": "uuid"
3212
+ }
3213
+ }
3214
+ },
3215
+ "V2PaymentMethodRegistrationCreate": {
3216
+ "type": "object",
3217
+ "properties": {
3218
+ "mode": {
3219
+ "type": "string",
3220
+ "enum": [
3221
+ "hosted"
3222
+ ],
3223
+ "default": "hosted"
3224
+ },
3225
+ "return_url": {
3226
+ "type": "string",
3227
+ "format": "uri"
3228
+ },
3229
+ "cancel_url": {
3230
+ "type": "string",
3231
+ "format": "uri"
3232
+ },
3233
+ "metadata": {
3234
+ "$ref": "#/components/schemas/V2Metadata"
3235
+ }
3236
+ }
3237
+ },
3238
+ "V2PaymentMethodRegistration": {
3239
+ "type": "object",
3240
+ "properties": {
3241
+ "token": {
3242
+ "type": "string",
3243
+ "format": "uuid"
3244
+ },
3245
+ "status": {
3246
+ "type": "string",
3247
+ "enum": [
3248
+ "pending",
3249
+ "succeeded",
3250
+ "failed",
3251
+ "canceled"
3252
+ ]
3253
+ },
3254
+ "checkout_token": {
3255
+ "type": "string",
3256
+ "format": "uuid"
3257
+ },
3258
+ "checkout_url": {
3259
+ "type": "string"
3260
+ },
3261
+ "status_url": {
3262
+ "type": "string"
3263
+ },
3264
+ "account_payment_processor_id": {
3265
+ "type": "integer"
3266
+ },
3267
+ "payment_processor": {
3268
+ "type": "string"
3269
+ },
3270
+ "registration_mode": {
3271
+ "type": "string",
3272
+ "enum": [
3273
+ "hosted_card_form"
3274
+ ]
3275
+ },
3276
+ "temporary_payment_method_token": {
3277
+ "type": "string",
3278
+ "nullable": true
3279
+ },
3280
+ "payment_method_id": {
3281
+ "type": "integer",
3282
+ "nullable": true
3283
+ },
3284
+ "metadata": {
3285
+ "$ref": "#/components/schemas/V2Metadata"
3286
+ },
3287
+ "error_message": {
3288
+ "type": "string"
3289
+ },
3290
+ "created_at": {
3291
+ "type": "string",
3292
+ "format": "date-time"
3293
+ },
3294
+ "updated_at": {
3295
+ "type": "string",
3296
+ "format": "date-time"
3297
+ }
3298
+ }
3299
+ },
3300
+ "V2Checkout": {
3301
+ "type": "object",
3302
+ "properties": {
3303
+ "id": {
3304
+ "type": "integer"
3305
+ },
3306
+ "token": {
3307
+ "type": "string",
3308
+ "format": "uuid"
3309
+ },
3310
+ "checkout_url": {
3311
+ "type": "string"
3312
+ },
3313
+ "status": {
3314
+ "type": "string",
3315
+ "enum": [
3316
+ "pending",
3317
+ "processing",
3318
+ "succeeded",
3319
+ "failed",
3320
+ "pending_external",
3321
+ "canceled"
3322
+ ]
3323
+ },
3324
+ "customer_id": {
3325
+ "type": "integer"
3326
+ },
3327
+ "customer_reference": {
3328
+ "type": "string",
3329
+ "nullable": true
3330
+ },
3331
+ "account_payment_processor_id": {
3332
+ "type": "integer",
3333
+ "nullable": true
3334
+ },
3335
+ "currency": {
3336
+ "type": "string"
3337
+ },
3338
+ "subtotal_amount": {
3339
+ "type": "string",
3340
+ "format": "decimal"
3341
+ },
3342
+ "tax_amount": {
3343
+ "type": "string",
3344
+ "format": "decimal"
3345
+ },
3346
+ "total_amount": {
3347
+ "type": "string",
3348
+ "format": "decimal"
3349
+ },
3350
+ "contract_id": {
3351
+ "type": "integer",
3352
+ "nullable": true
3353
+ },
3354
+ "initial_billing_run_id": {
3355
+ "type": "integer",
3356
+ "nullable": true
3357
+ },
3358
+ "quote_snapshot": {
3359
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuote"
3360
+ },
3361
+ "metadata": {
3362
+ "$ref": "#/components/schemas/V2Metadata"
3363
+ },
3364
+ "created_at": {
3365
+ "type": "string",
3366
+ "format": "date-time"
3367
+ },
3368
+ "updated_at": {
3369
+ "type": "string",
3370
+ "format": "date-time"
3371
+ }
3372
+ }
3373
+ },
3374
+ "V2SubscriptionOfferQuoteLine": {
3375
+ "type": "object",
3376
+ "properties": {
3377
+ "key": {
3378
+ "type": "string"
3379
+ },
3380
+ "source": {
3381
+ "type": "string"
3382
+ },
3383
+ "creates_contract_item": {
3384
+ "type": "boolean"
3385
+ },
3386
+ "price_id": {
3387
+ "type": "integer"
3388
+ },
3389
+ "product_id": {
3390
+ "type": "integer"
3391
+ },
3392
+ "product_name": {
3393
+ "type": "string"
3394
+ },
3395
+ "product_reference": {
3396
+ "type": "string",
3397
+ "nullable": true
3398
+ },
3399
+ "billing_type": {
3400
+ "type": "string"
3401
+ },
3402
+ "quantity": {
3403
+ "type": "integer"
3404
+ },
3405
+ "unit_amount": {
3406
+ "type": "string",
3407
+ "format": "decimal"
3408
+ },
3409
+ "currency": {
3410
+ "type": "string"
3411
+ },
3412
+ "line_subtotal_amount": {
3413
+ "type": "string",
3414
+ "format": "decimal"
3415
+ },
3416
+ "line_tax_amount": {
3417
+ "type": "string",
3418
+ "format": "decimal"
3419
+ },
3420
+ "line_total_amount": {
3421
+ "type": "string",
3422
+ "format": "decimal"
3423
+ },
3424
+ "tax_rate_id": {
3425
+ "type": "integer",
3426
+ "nullable": true
3427
+ },
3428
+ "tax_rate_version_id": {
3429
+ "type": "integer",
3430
+ "nullable": true
3431
+ },
3432
+ "tax_percent": {
3433
+ "type": "string",
3434
+ "format": "decimal",
3435
+ "nullable": true
3436
+ },
3437
+ "tax_calculation_mode": {
3438
+ "type": "string",
3439
+ "nullable": true
3440
+ },
3441
+ "service_period_start_at": {
3442
+ "type": "string",
3443
+ "format": "date-time",
3444
+ "nullable": true
3445
+ },
3446
+ "service_period_end_at": {
3447
+ "type": "string",
3448
+ "format": "date-time",
3449
+ "nullable": true
3450
+ },
3451
+ "proration_factor": {
3452
+ "type": "string",
3453
+ "format": "decimal",
3454
+ "nullable": true
3455
+ },
3456
+ "renewal_line_subtotal_amount": {
3457
+ "type": "string",
3458
+ "format": "decimal"
3459
+ },
3460
+ "renewal_line_tax_amount": {
3461
+ "type": "string",
3462
+ "format": "decimal"
3463
+ },
3464
+ "renewal_line_total_amount": {
3465
+ "type": "string",
3466
+ "format": "decimal"
3467
+ },
3468
+ "metadata": {
3469
+ "$ref": "#/components/schemas/V2Metadata"
3470
+ }
3471
+ }
3472
+ },
3473
+ "V2SubscriptionOfferQuote": {
3474
+ "type": "object",
3475
+ "properties": {
3476
+ "input_mode": {
3477
+ "type": "string",
3478
+ "enum": [
3479
+ "bundle",
3480
+ "direct_items"
3481
+ ]
3482
+ },
3483
+ "bundle_template_id": {
3484
+ "type": "integer",
3485
+ "nullable": true
3486
+ },
3487
+ "bundle_quantity": {
3488
+ "type": "integer"
3489
+ },
3490
+ "currency": {
3491
+ "type": "string"
3492
+ },
3493
+ "period_start_at": {
3494
+ "type": "string",
3495
+ "format": "date-time"
3496
+ },
3497
+ "period_end_at": {
3498
+ "type": "string",
3499
+ "format": "date-time"
3500
+ },
3501
+ "subtotal_amount": {
3502
+ "type": "string",
3503
+ "format": "decimal"
3504
+ },
3505
+ "tax_amount": {
3506
+ "type": "string",
3507
+ "format": "decimal"
3508
+ },
3509
+ "total_amount": {
3510
+ "type": "string",
3511
+ "format": "decimal"
3512
+ },
3513
+ "first_period_recurring_subtotal_amount": {
3514
+ "type": "string",
3515
+ "format": "decimal"
3516
+ },
3517
+ "first_period_recurring_tax_amount": {
3518
+ "type": "string",
3519
+ "format": "decimal"
3520
+ },
3521
+ "first_period_recurring_total_amount": {
3522
+ "type": "string",
3523
+ "format": "decimal"
3524
+ },
3525
+ "recurring_subtotal_amount": {
3526
+ "type": "string",
3527
+ "format": "decimal"
3528
+ },
3529
+ "recurring_tax_amount": {
3530
+ "type": "string",
3531
+ "format": "decimal"
3532
+ },
3533
+ "recurring_total_amount": {
3534
+ "type": "string",
3535
+ "format": "decimal"
3536
+ },
3537
+ "billing_schedule_preview": {
3538
+ "$ref": "#/components/schemas/V2Metadata"
3539
+ },
3540
+ "recurring_items": {
3541
+ "type": "array",
3542
+ "items": {
3543
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteLine"
3544
+ }
3545
+ },
3546
+ "initial_lines": {
3547
+ "type": "array",
3548
+ "items": {
3549
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuoteLine"
3550
+ }
3551
+ }
3552
+ }
3553
+ },
3554
+ "V2SubscriptionContractItem": {
3555
+ "type": "object",
3556
+ "properties": {
3557
+ "id": {
3558
+ "type": "integer"
3559
+ },
3560
+ "price_id": {
3561
+ "type": "integer"
3562
+ },
3563
+ "product": {
3564
+ "$ref": "#/components/schemas/V2BundleProduct"
3565
+ },
3566
+ "price": {
3567
+ "$ref": "#/components/schemas/V2CatalogPrice"
3568
+ },
3569
+ "quantity": {
3570
+ "type": "integer"
3571
+ },
3572
+ "unit_amount_override": {
3573
+ "type": "string",
3574
+ "format": "decimal",
3575
+ "nullable": true
3576
+ },
3577
+ "discount_percent": {
3578
+ "type": "string",
3579
+ "format": "decimal",
3580
+ "nullable": true
3581
+ },
3582
+ "active": {
3583
+ "type": "boolean"
3584
+ },
3585
+ "start_at": {
3586
+ "type": "string",
3587
+ "format": "date-time",
3588
+ "nullable": true
3589
+ },
3590
+ "end_at": {
3591
+ "type": "string",
3592
+ "format": "date-time",
3593
+ "nullable": true
3594
+ },
3595
+ "billing_anchor_at": {
3596
+ "type": "string",
3597
+ "format": "date-time",
3598
+ "nullable": true
3599
+ },
3600
+ "next_billing_date": {
3601
+ "type": "string",
3602
+ "format": "date",
3603
+ "nullable": true
3604
+ },
3605
+ "next_billing_at": {
3606
+ "type": "string",
3607
+ "format": "date-time",
3608
+ "nullable": true
3609
+ },
3610
+ "last_billed_at": {
3611
+ "type": "string",
3612
+ "format": "date-time",
3613
+ "nullable": true
3614
+ },
3615
+ "service_active": {
3616
+ "type": "boolean"
3617
+ },
3618
+ "service_state": {
3619
+ "type": "string",
3620
+ "enum": [
3621
+ "inactive",
3622
+ "active",
3623
+ "pending_payment",
3624
+ "past_due",
3625
+ "ended"
3626
+ ]
3627
+ },
3628
+ "entitled_from": {
3629
+ "type": "string",
3630
+ "format": "date-time",
3631
+ "nullable": true
3632
+ },
3633
+ "entitled_until": {
3634
+ "type": "string",
3635
+ "format": "date-time",
3636
+ "nullable": true
3637
+ },
3638
+ "current_service_period_start_at": {
3639
+ "type": "string",
3640
+ "format": "date-time",
3641
+ "nullable": true
3642
+ },
3643
+ "current_service_period_end_at": {
3644
+ "type": "string",
3645
+ "format": "date-time",
3646
+ "nullable": true
3647
+ },
3648
+ "entitlement_billing_run_id": {
3649
+ "type": "integer",
3650
+ "nullable": true
3651
+ },
3652
+ "metadata": {
3653
+ "$ref": "#/components/schemas/V2Metadata"
3654
+ }
3655
+ }
3656
+ },
3657
+ "V2BundlePurchaseSummary": {
3658
+ "type": "object",
3659
+ "properties": {
3660
+ "id": {
3661
+ "type": "integer"
3662
+ },
3663
+ "bundle_template_id": {
3664
+ "type": "integer"
3665
+ },
3666
+ "bundle_template_name": {
3667
+ "type": "string"
3668
+ },
3669
+ "bundle_template_reference": {
3670
+ "type": "string",
3671
+ "nullable": true
3672
+ },
3673
+ "source": {
3674
+ "type": "string"
3675
+ },
3676
+ "metadata": {
3677
+ "$ref": "#/components/schemas/V2Metadata"
3678
+ },
3679
+ "created_at": {
3680
+ "type": "string",
3681
+ "format": "date-time"
3682
+ }
3683
+ }
3684
+ },
3685
+ "V2BillingRunSummary": {
3686
+ "type": "object",
3687
+ "nullable": true,
3688
+ "properties": {
3689
+ "id": {
3690
+ "type": "integer"
3691
+ },
3692
+ "state": {
3693
+ "type": "string"
3694
+ },
3695
+ "period_start_at": {
3696
+ "type": "string",
3697
+ "format": "date-time"
3698
+ },
3699
+ "period_end_at": {
3700
+ "type": "string",
3701
+ "format": "date-time"
3702
+ },
3703
+ "currency": {
3704
+ "type": "string"
3705
+ },
3706
+ "subtotal_amount": {
3707
+ "type": "string",
3708
+ "format": "decimal"
3709
+ },
3710
+ "tax_amount": {
3711
+ "type": "string",
3712
+ "format": "decimal"
3713
+ },
3714
+ "total_amount": {
3715
+ "type": "string",
3716
+ "format": "decimal"
3717
+ },
3718
+ "attempt_count": {
3719
+ "type": "integer"
3720
+ },
3721
+ "max_attempts": {
3722
+ "type": "integer"
3723
+ },
3724
+ "next_retry_at": {
3725
+ "type": "string",
3726
+ "format": "date-time",
3727
+ "nullable": true
3728
+ },
3729
+ "last_attempt_at": {
3730
+ "type": "string",
3731
+ "format": "date-time",
3732
+ "nullable": true
3733
+ },
3734
+ "transaction_id": {
3735
+ "type": "integer",
3736
+ "nullable": true
3737
+ },
3738
+ "metadata": {
3739
+ "$ref": "#/components/schemas/V2Metadata"
3740
+ },
3741
+ "created_at": {
3742
+ "type": "string",
3743
+ "format": "date-time"
3744
+ },
3745
+ "updated_at": {
3746
+ "type": "string",
3747
+ "format": "date-time"
3748
+ }
3749
+ }
3750
+ },
3751
+ "V2BillingRunAttempt": {
3752
+ "type": "object",
3753
+ "properties": {
3754
+ "id": {
3755
+ "type": "integer"
3756
+ },
3757
+ "attempt_no": {
3758
+ "type": "integer"
3759
+ },
3760
+ "state": {
3761
+ "type": "string"
3762
+ },
3763
+ "idempotency_key": {
3764
+ "type": "string"
3765
+ },
3766
+ "transaction_id": {
3767
+ "type": "integer",
3768
+ "nullable": true
3769
+ },
3770
+ "transaction_uuid": {
3771
+ "type": "string",
3772
+ "nullable": true
3773
+ },
3774
+ "transaction_external_reference": {
3775
+ "type": "string",
3776
+ "nullable": true
3777
+ },
3778
+ "fail_code": {
3779
+ "type": "string",
3780
+ "nullable": true
3781
+ },
3782
+ "fail_message": {
3783
+ "type": "string",
3784
+ "nullable": true
3785
+ },
3786
+ "started_at": {
3787
+ "type": "string",
3788
+ "format": "date-time",
3789
+ "nullable": true
3790
+ },
3791
+ "finished_at": {
3792
+ "type": "string",
3793
+ "format": "date-time",
3794
+ "nullable": true
3795
+ },
3796
+ "metadata": {
3797
+ "$ref": "#/components/schemas/V2Metadata"
3798
+ },
3799
+ "created_at": {
3800
+ "type": "string",
3801
+ "format": "date-time"
3802
+ },
3803
+ "updated_at": {
3804
+ "type": "string",
3805
+ "format": "date-time"
3806
+ }
3807
+ }
3808
+ },
3809
+ "V2BillingRunLine": {
3810
+ "type": "object",
3811
+ "properties": {
3812
+ "id": {
3813
+ "type": "integer"
3814
+ },
3815
+ "contract_item_id": {
3816
+ "type": "integer",
3817
+ "nullable": true
3818
+ },
3819
+ "price_id": {
3820
+ "type": "integer",
3821
+ "nullable": true
3822
+ },
3823
+ "product_name": {
3824
+ "type": "string"
3825
+ },
3826
+ "product_reference": {
3827
+ "type": "string",
3828
+ "nullable": true
3829
+ },
3830
+ "quantity": {
3831
+ "type": "integer"
3832
+ },
3833
+ "unit_amount": {
3834
+ "type": "string",
3835
+ "format": "decimal"
3836
+ },
3837
+ "discount_percent": {
3838
+ "type": "string",
3839
+ "format": "decimal",
3840
+ "nullable": true
3841
+ },
3842
+ "currency": {
3843
+ "type": "string"
3844
+ },
3845
+ "line_subtotal_amount": {
3846
+ "type": "string",
3847
+ "format": "decimal"
3848
+ },
3849
+ "line_tax_amount": {
3850
+ "type": "string",
3851
+ "format": "decimal"
3852
+ },
3853
+ "line_total_amount": {
3854
+ "type": "string",
3855
+ "format": "decimal"
3856
+ },
3857
+ "service_period_start_at": {
3858
+ "type": "string",
3859
+ "format": "date-time",
3860
+ "nullable": true
3861
+ },
3862
+ "service_period_end_at": {
3863
+ "type": "string",
3864
+ "format": "date-time",
3865
+ "nullable": true
3866
+ },
3867
+ "proration_factor": {
3868
+ "type": "string",
3869
+ "format": "decimal"
3870
+ },
3871
+ "tax_rate_id": {
3872
+ "type": "integer",
3873
+ "nullable": true
3874
+ },
3875
+ "tax_rate_version_id": {
3876
+ "type": "integer",
3877
+ "nullable": true
3878
+ },
3879
+ "tax_percent": {
3880
+ "type": "string",
3881
+ "format": "decimal",
3882
+ "nullable": true
3883
+ },
3884
+ "tax_calculation_mode": {
3885
+ "type": "string",
3886
+ "nullable": true
3887
+ },
3888
+ "metadata": {
3889
+ "$ref": "#/components/schemas/V2Metadata"
3890
+ },
3891
+ "created_at": {
3892
+ "type": "string",
3893
+ "format": "date-time"
3894
+ },
3895
+ "updated_at": {
3896
+ "type": "string",
3897
+ "format": "date-time"
3898
+ }
3899
+ }
3900
+ },
3901
+ "V2BillingRun": {
3902
+ "type": "object",
3903
+ "properties": {
3904
+ "id": {
3905
+ "type": "integer"
3906
+ },
3907
+ "contract_id": {
3908
+ "type": "integer"
3909
+ },
3910
+ "customer_id": {
3911
+ "type": "integer"
3912
+ },
3913
+ "customer_reference": {
3914
+ "type": "string",
3915
+ "nullable": true
3916
+ },
3917
+ "period_start_at": {
3918
+ "type": "string",
3919
+ "format": "date-time"
3920
+ },
3921
+ "period_end_at": {
3922
+ "type": "string",
3923
+ "format": "date-time"
3924
+ },
3925
+ "state": {
3926
+ "type": "string"
3927
+ },
3928
+ "currency": {
3929
+ "type": "string"
3930
+ },
3931
+ "subtotal_amount": {
3932
+ "type": "string",
3933
+ "format": "decimal"
3934
+ },
3935
+ "tax_amount": {
3936
+ "type": "string",
3937
+ "format": "decimal"
3938
+ },
3939
+ "total_amount": {
3940
+ "type": "string",
3941
+ "format": "decimal"
3942
+ },
3943
+ "attempt_count": {
3944
+ "type": "integer"
3945
+ },
3946
+ "max_attempts": {
3947
+ "type": "integer"
3948
+ },
3949
+ "next_retry_at": {
3950
+ "type": "string",
3951
+ "format": "date-time",
3952
+ "nullable": true
3953
+ },
3954
+ "last_attempt_at": {
3955
+ "type": "string",
3956
+ "format": "date-time",
3957
+ "nullable": true
3958
+ },
3959
+ "transaction_id": {
3960
+ "type": "integer",
3961
+ "nullable": true
3962
+ },
3963
+ "transaction_uuid": {
3964
+ "type": "string",
3965
+ "nullable": true
3966
+ },
3967
+ "transaction_external_reference": {
3968
+ "type": "string",
3969
+ "nullable": true
3970
+ },
3971
+ "lines": {
3972
+ "type": "array",
3973
+ "items": {
3974
+ "$ref": "#/components/schemas/V2BillingRunLine"
3975
+ }
3976
+ },
3977
+ "attempts": {
3978
+ "type": "array",
3979
+ "items": {
3980
+ "$ref": "#/components/schemas/V2BillingRunAttempt"
3981
+ }
3982
+ },
3983
+ "metadata": {
3984
+ "$ref": "#/components/schemas/V2Metadata"
3985
+ },
3986
+ "created_at": {
3987
+ "type": "string",
3988
+ "format": "date-time"
3989
+ },
3990
+ "updated_at": {
3991
+ "type": "string",
3992
+ "format": "date-time"
3993
+ }
3994
+ }
3995
+ },
3996
+ "V2BillingRunRetry": {
3997
+ "type": "object",
3998
+ "required": [
3999
+ "reason"
4000
+ ],
4001
+ "properties": {
4002
+ "reason": {
4003
+ "type": "string"
4004
+ },
4005
+ "process_now": {
4006
+ "type": "boolean",
4007
+ "default": false
4008
+ },
4009
+ "execute_payment": {
4010
+ "type": "boolean",
4011
+ "default": false
4012
+ },
4013
+ "dryrun": {
4014
+ "type": "boolean",
4015
+ "default": false
4016
+ }
4017
+ }
4018
+ },
4019
+ "V2SubscriptionContractCustomer": {
4020
+ "type": "object",
4021
+ "properties": {
4022
+ "id": {
4023
+ "type": "integer"
4024
+ },
4025
+ "customer_reference": {
4026
+ "type": "string"
4027
+ },
4028
+ "email": {
4029
+ "type": "string",
4030
+ "nullable": true
4031
+ },
4032
+ "customer_username": {
4033
+ "type": "string",
4034
+ "nullable": true
4035
+ }
4036
+ }
4037
+ },
4038
+ "V2SubscriptionContractBillingCadence": {
4039
+ "type": "object",
4040
+ "nullable": true,
4041
+ "properties": {
4042
+ "recurrence_type": {
4043
+ "type": "string"
4044
+ },
4045
+ "interval": {
4046
+ "type": "string",
4047
+ "nullable": true
4048
+ },
4049
+ "interval_count": {
4050
+ "type": "integer",
4051
+ "nullable": true
4052
+ },
4053
+ "billing_day_of_month": {
4054
+ "type": "integer",
4055
+ "nullable": true
4056
+ },
4057
+ "billing_schedule_id": {
4058
+ "type": "integer",
4059
+ "nullable": true
4060
+ },
4061
+ "billing_schedule_name": {
4062
+ "type": "string",
4063
+ "nullable": true
4064
+ }
4065
+ }
4066
+ },
4067
+ "V2SubscriptionContractPauseWindow": {
4068
+ "type": "object",
4069
+ "properties": {
4070
+ "id": {
4071
+ "type": "integer"
4072
+ },
4073
+ "start_date": {
4074
+ "type": "string",
4075
+ "format": "date"
4076
+ },
4077
+ "end_date": {
4078
+ "type": "string",
4079
+ "format": "date"
4080
+ },
4081
+ "active": {
4082
+ "type": "boolean"
4083
+ },
4084
+ "created_at": {
4085
+ "type": "string",
4086
+ "format": "date-time"
4087
+ },
4088
+ "updated_at": {
4089
+ "type": "string",
4090
+ "format": "date-time"
4091
+ }
4092
+ }
4093
+ },
4094
+ "V2EntitlementSummary": {
4095
+ "type": "object",
4096
+ "description": "Aggregate service entitlement state for a subscription contract.",
4097
+ "properties": {
4098
+ "service_active": {
4099
+ "type": "boolean"
4100
+ },
4101
+ "service_state": {
4102
+ "type": "string",
4103
+ "enum": [
4104
+ "active",
4105
+ "inactive",
4106
+ "partial",
4107
+ "past_due"
4108
+ ]
4109
+ },
4110
+ "active_service_item_count": {
4111
+ "type": "integer"
4112
+ },
4113
+ "inactive_service_item_count": {
4114
+ "type": "integer"
4115
+ },
4116
+ "past_due_service_item_count": {
4117
+ "type": "integer"
4118
+ },
4119
+ "total_active_quantity": {
4120
+ "type": "integer"
4121
+ },
4122
+ "active_product_ids": {
4123
+ "type": "array",
4124
+ "items": {
4125
+ "type": "integer"
4126
+ }
4127
+ },
4128
+ "evaluated_at": {
4129
+ "type": "string",
4130
+ "format": "date-time"
4131
+ }
4132
+ }
4133
+ },
4134
+ "V2CustomerEntitlementItem": {
4135
+ "type": "object",
4136
+ "description": "One contract item considered by the customer entitlement access check.",
4137
+ "properties": {
4138
+ "subscription_contract_id": {
4139
+ "type": "integer"
4140
+ },
4141
+ "contract_item_id": {
4142
+ "type": "integer"
4143
+ },
4144
+ "product_id": {
4145
+ "type": "integer"
4146
+ },
4147
+ "product_reference": {
4148
+ "type": "string",
4149
+ "nullable": true
4150
+ },
4151
+ "price_id": {
4152
+ "type": "integer"
4153
+ },
4154
+ "quantity": {
4155
+ "type": "integer"
4156
+ },
4157
+ "service_active": {
4158
+ "type": "boolean"
4159
+ },
4160
+ "service_state": {
4161
+ "type": "string",
4162
+ "enum": [
4163
+ "inactive",
4164
+ "active",
4165
+ "pending_payment",
4166
+ "past_due",
4167
+ "ended"
4168
+ ]
4169
+ },
4170
+ "entitled_from": {
4171
+ "type": "string",
4172
+ "format": "date-time",
4173
+ "nullable": true
4174
+ },
4175
+ "entitled_until": {
4176
+ "type": "string",
4177
+ "format": "date-time",
4178
+ "nullable": true
4179
+ },
4180
+ "current_service_period_start_at": {
4181
+ "type": "string",
4182
+ "format": "date-time",
4183
+ "nullable": true
4184
+ },
4185
+ "current_service_period_end_at": {
4186
+ "type": "string",
4187
+ "format": "date-time",
4188
+ "nullable": true
4189
+ },
4190
+ "entitlement_billing_run_id": {
4191
+ "type": "integer",
4192
+ "nullable": true
4193
+ }
4194
+ }
4195
+ },
4196
+ "V2CustomerEntitlements": {
4197
+ "type": "object",
4198
+ "description": "Customer/product service entitlement access-check response.",
4199
+ "properties": {
4200
+ "customer_reference": {
4201
+ "type": "string"
4202
+ },
4203
+ "product_reference": {
4204
+ "type": "string",
4205
+ "nullable": true
4206
+ },
4207
+ "service_active": {
4208
+ "type": "boolean",
4209
+ "description": "Simple integration-facing access flag."
4210
+ },
4211
+ "service_state": {
4212
+ "type": "string",
4213
+ "enum": [
4214
+ "active",
4215
+ "inactive",
4216
+ "partial",
4217
+ "past_due"
4218
+ ]
4219
+ },
4220
+ "total_active_quantity": {
4221
+ "type": "integer"
4222
+ },
4223
+ "active_product_ids": {
4224
+ "type": "array",
4225
+ "items": {
4226
+ "type": "integer"
4227
+ }
4228
+ },
4229
+ "evaluated_at": {
4230
+ "type": "string",
4231
+ "format": "date-time"
4232
+ },
4233
+ "items": {
4234
+ "type": "array",
4235
+ "items": {
4236
+ "$ref": "#/components/schemas/V2CustomerEntitlementItem"
4237
+ }
4238
+ }
4239
+ }
4240
+ },
4241
+ "V2SubscriptionContract": {
4242
+ "type": "object",
4243
+ "properties": {
4244
+ "id": {
4245
+ "type": "integer"
4246
+ },
4247
+ "customer_id": {
4248
+ "type": "integer"
4249
+ },
4250
+ "customer": {
4251
+ "$ref": "#/components/schemas/V2SubscriptionContractCustomer"
4252
+ },
4253
+ "customer_reference": {
4254
+ "type": "string"
4255
+ },
4256
+ "state": {
4257
+ "type": "string"
4258
+ },
4259
+ "billing_anchor_at": {
4260
+ "type": "string",
4261
+ "format": "date-time",
4262
+ "nullable": true
4263
+ },
4264
+ "billing_timezone": {
4265
+ "type": "string"
4266
+ },
4267
+ "billing_time": {
4268
+ "type": "string"
4269
+ },
4270
+ "billing_advance_policy": {
4271
+ "type": "string",
4272
+ "enum": [
4273
+ "on_run_created",
4274
+ "on_run_succeeded"
4275
+ ]
4276
+ },
4277
+ "service_entitlement_policy": {
4278
+ "type": "string",
4279
+ "enum": [
4280
+ "on_run_created",
4281
+ "on_run_succeeded"
4282
+ ]
4283
+ },
4284
+ "service_active": {
4285
+ "type": "boolean"
4286
+ },
4287
+ "service_state": {
4288
+ "type": "string",
4289
+ "enum": [
4290
+ "active",
4291
+ "inactive",
4292
+ "partial",
4293
+ "past_due"
4294
+ ]
4295
+ },
4296
+ "active_service_item_count": {
4297
+ "type": "integer"
4298
+ },
4299
+ "inactive_service_item_count": {
4300
+ "type": "integer"
4301
+ },
4302
+ "total_active_quantity": {
4303
+ "type": "integer"
4304
+ },
4305
+ "entitlement_summary": {
4306
+ "$ref": "#/components/schemas/V2EntitlementSummary"
4307
+ },
4308
+ "billing_attention_required": {
4309
+ "type": "boolean"
4310
+ },
4311
+ "trial_start_at": {
4312
+ "type": "string",
4313
+ "format": "date-time",
4314
+ "nullable": true
4315
+ },
4316
+ "trial_end_at": {
4317
+ "type": "string",
4318
+ "format": "date-time",
4319
+ "nullable": true
4320
+ },
4321
+ "next_billing_at": {
4322
+ "type": "string",
4323
+ "format": "date-time",
4324
+ "nullable": true
4325
+ },
4326
+ "cancel_at": {
4327
+ "type": "string",
4328
+ "format": "date-time",
4329
+ "nullable": true
4330
+ },
4331
+ "cancel_at_period_end": {
4332
+ "type": "boolean"
4333
+ },
4334
+ "canceled_at": {
4335
+ "type": "string",
4336
+ "format": "date-time",
4337
+ "nullable": true
4338
+ },
4339
+ "ended_at": {
4340
+ "type": "string",
4341
+ "format": "date-time",
4342
+ "nullable": true
4343
+ },
4344
+ "currency": {
4345
+ "type": "string"
4346
+ },
4347
+ "recurring": {
4348
+ "type": "boolean"
4349
+ },
4350
+ "has_future_pause": {
4351
+ "type": "boolean"
4352
+ },
4353
+ "paused_until": {
4354
+ "type": "string",
4355
+ "format": "date",
4356
+ "nullable": true
4357
+ },
4358
+ "payment_processor_override_id": {
4359
+ "type": "integer",
4360
+ "nullable": true
4361
+ },
4362
+ "legacy_subscription_ids": {
4363
+ "type": "array",
4364
+ "items": {
4365
+ "type": "integer"
4366
+ }
4367
+ },
4368
+ "metadata": {
4369
+ "$ref": "#/components/schemas/V2Metadata"
4370
+ },
4371
+ "created_at": {
4372
+ "type": "string",
4373
+ "format": "date-time"
4374
+ },
4375
+ "updated_at": {
4376
+ "type": "string",
4377
+ "format": "date-time"
4378
+ },
4379
+ "items": {
4380
+ "type": "array",
4381
+ "items": {
4382
+ "$ref": "#/components/schemas/V2SubscriptionContractItem"
4383
+ }
4384
+ },
4385
+ "pauses": {
4386
+ "type": "array",
4387
+ "items": {
4388
+ "$ref": "#/components/schemas/V2SubscriptionContractPauseWindow"
4389
+ }
4390
+ },
4391
+ "current_pauses": {
4392
+ "type": "array",
4393
+ "items": {
4394
+ "$ref": "#/components/schemas/V2SubscriptionContractPauseWindow"
4395
+ }
4396
+ },
4397
+ "future_pauses": {
4398
+ "type": "array",
4399
+ "items": {
4400
+ "$ref": "#/components/schemas/V2SubscriptionContractPauseWindow"
4401
+ }
4402
+ },
4403
+ "past_pauses": {
4404
+ "type": "array",
4405
+ "items": {
4406
+ "$ref": "#/components/schemas/V2SubscriptionContractPauseWindow"
4407
+ }
4408
+ },
4409
+ "billing_cadence": {
4410
+ "$ref": "#/components/schemas/V2SubscriptionContractBillingCadence"
4411
+ },
4412
+ "bundle_purchases": {
4413
+ "type": "array",
4414
+ "items": {
4415
+ "$ref": "#/components/schemas/V2BundlePurchaseSummary"
4416
+ }
4417
+ },
4418
+ "bundle_purchase_id": {
4419
+ "type": "integer",
4420
+ "nullable": true
4421
+ },
4422
+ "initial_billing_run": {
4423
+ "$ref": "#/components/schemas/V2BillingRunSummary"
4424
+ },
4425
+ "initial_billing_run_id": {
4426
+ "type": "integer",
4427
+ "nullable": true
4428
+ },
4429
+ "initial_billing_run_total_amount": {
4430
+ "type": "string",
4431
+ "format": "decimal",
4432
+ "nullable": true
4433
+ },
4434
+ "latest_billing_run": {
4435
+ "$ref": "#/components/schemas/V2BillingRunSummary"
4436
+ }
4437
+ }
4438
+ }
4439
+ },
4440
+ "parameters": {
4441
+ "PageSizeFilter": {
4442
+ "in": "query",
4443
+ "name": "page_size",
4444
+ "schema": {
4445
+ "type": "integer"
4446
+ },
4447
+ "description": "The number of items to return in the response. If omitted, no pagination is applied."
4448
+ },
4449
+ "V2ActiveFilter": {
4450
+ "in": "query",
4451
+ "name": "active",
4452
+ "schema": {
4453
+ "type": "string",
4454
+ "enum": [
4455
+ "true",
4456
+ "false",
4457
+ "all",
4458
+ "any"
4459
+ ]
4460
+ },
4461
+ "description": "Filter active resources. Use `all` or `any` to include active and inactive resources."
4462
+ },
4463
+ "V2ReferenceFilter": {
4464
+ "in": "query",
4465
+ "name": "reference",
4466
+ "schema": {
4467
+ "type": "string"
4468
+ },
4469
+ "description": "Filter by resource reference."
4470
+ },
4471
+ "V2ProductId": {
4472
+ "name": "productId",
4473
+ "in": "path",
4474
+ "description": "Catalog product id.",
4475
+ "required": true,
4476
+ "style": "simple",
4477
+ "explode": false,
4478
+ "schema": {
4479
+ "type": "integer"
4480
+ }
4481
+ },
4482
+ "V2PriceId": {
4483
+ "name": "priceId",
4484
+ "in": "path",
4485
+ "description": "Catalog price id.",
4486
+ "required": true,
4487
+ "style": "simple",
4488
+ "explode": false,
4489
+ "schema": {
4490
+ "type": "integer"
4491
+ }
4492
+ },
4493
+ "V2BundleTemplateId": {
4494
+ "name": "bundleTemplateId",
4495
+ "in": "path",
4496
+ "description": "Bundle template id.",
4497
+ "required": true,
4498
+ "style": "simple",
4499
+ "explode": false,
4500
+ "schema": {
4501
+ "type": "integer"
4502
+ }
4503
+ },
4504
+ "V2ContractId": {
4505
+ "name": "contractId",
4506
+ "in": "path",
4507
+ "description": "Subscription contract id.",
4508
+ "required": true,
4509
+ "style": "simple",
4510
+ "explode": false,
4511
+ "schema": {
4512
+ "type": "integer"
4513
+ }
4514
+ },
4515
+ "V2BillingRunId": {
4516
+ "name": "billingRunId",
4517
+ "in": "path",
4518
+ "description": "Billing run id.",
4519
+ "required": true,
4520
+ "style": "simple",
4521
+ "explode": false,
4522
+ "schema": {
4523
+ "type": "integer"
4524
+ }
4525
+ },
4526
+ "V2CustomerReference": {
4527
+ "name": "customerReference",
4528
+ "in": "path",
4529
+ "description": "Customer reference for the customer within the authenticated account.",
4530
+ "required": true,
4531
+ "style": "simple",
4532
+ "explode": false,
4533
+ "schema": {
4534
+ "type": "string"
4535
+ }
4536
+ },
4537
+ "V2PaymentMethodId": {
4538
+ "name": "paymentMethodId",
4539
+ "in": "path",
4540
+ "description": "Payment method id.",
4541
+ "required": true,
4542
+ "style": "simple",
4543
+ "explode": false,
4544
+ "schema": {
4545
+ "type": "integer"
4546
+ }
4547
+ },
4548
+ "V2CheckoutToken": {
4549
+ "name": "token",
4550
+ "in": "path",
4551
+ "description": "V2 checkout token.",
4552
+ "required": true,
4553
+ "style": "simple",
4554
+ "explode": false,
4555
+ "schema": {
4556
+ "type": "string",
4557
+ "format": "uuid"
4558
+ }
4559
+ },
4560
+ "V2PaymentMethodRegistrationToken": {
4561
+ "name": "token",
4562
+ "in": "path",
4563
+ "description": "V2 payment method registration token.",
4564
+ "required": true,
4565
+ "style": "simple",
4566
+ "explode": false,
4567
+ "schema": {
4568
+ "type": "string",
4569
+ "format": "uuid"
4570
+ }
4571
+ },
4572
+ "V2CheckoutSessionToken": {
4573
+ "name": "token",
4574
+ "in": "path",
4575
+ "description": "Embedded checkout session token.",
4576
+ "required": true,
4577
+ "style": "simple",
4578
+ "explode": false,
4579
+ "schema": {
4580
+ "type": "string",
4581
+ "format": "uuid"
4582
+ }
4583
+ }
4584
+ },
4585
+ "responses": {
4586
+ "V2ValidationError": {
4587
+ "description": "Validation error",
4588
+ "content": {
4589
+ "application/json": {
4590
+ "schema": {
4591
+ "$ref": "#/components/schemas/V2ValidationError"
4592
+ }
4593
+ }
4594
+ }
4595
+ },
4596
+ "V2NotFound": {
4597
+ "description": "Not found"
4598
+ },
4599
+ "V2CatalogProductList": {
4600
+ "description": "V2 catalog product list",
4601
+ "content": {
4602
+ "application/json": {
4603
+ "schema": {
4604
+ "anyOf": [
4605
+ {
4606
+ "type": "array",
4607
+ "items": {
4608
+ "$ref": "#/components/schemas/V2CatalogProduct"
4609
+ }
4610
+ },
4611
+ {
4612
+ "type": "object",
4613
+ "properties": {
4614
+ "count": {
4615
+ "type": "integer"
4616
+ },
4617
+ "next": {
4618
+ "type": "string",
4619
+ "nullable": true
4620
+ },
4621
+ "previous": {
4622
+ "type": "string",
4623
+ "nullable": true
4624
+ },
4625
+ "results": {
4626
+ "type": "array",
4627
+ "items": {
4628
+ "$ref": "#/components/schemas/V2CatalogProduct"
4629
+ }
4630
+ }
4631
+ }
4632
+ }
4633
+ ]
4634
+ }
4635
+ }
4636
+ }
4637
+ },
4638
+ "V2CatalogProductDetail": {
4639
+ "description": "V2 catalog product detail",
4640
+ "content": {
4641
+ "application/json": {
4642
+ "schema": {
4643
+ "$ref": "#/components/schemas/V2CatalogProductDetail"
4644
+ }
4645
+ }
4646
+ }
4647
+ },
4648
+ "V2CatalogPriceList": {
4649
+ "description": "V2 catalog price list",
4650
+ "content": {
4651
+ "application/json": {
4652
+ "schema": {
4653
+ "anyOf": [
4654
+ {
4655
+ "type": "array",
4656
+ "items": {
4657
+ "$ref": "#/components/schemas/V2CatalogPrice"
4658
+ }
4659
+ },
4660
+ {
4661
+ "type": "object",
4662
+ "properties": {
4663
+ "count": {
4664
+ "type": "integer"
4665
+ },
4666
+ "next": {
4667
+ "type": "string",
4668
+ "nullable": true
4669
+ },
4670
+ "previous": {
4671
+ "type": "string",
4672
+ "nullable": true
4673
+ },
4674
+ "results": {
4675
+ "type": "array",
4676
+ "items": {
4677
+ "$ref": "#/components/schemas/V2CatalogPrice"
4678
+ }
4679
+ }
4680
+ }
4681
+ }
4682
+ ]
4683
+ }
4684
+ }
4685
+ }
4686
+ },
4687
+ "V2CatalogPrice": {
4688
+ "description": "V2 catalog price",
4689
+ "content": {
4690
+ "application/json": {
4691
+ "schema": {
4692
+ "$ref": "#/components/schemas/V2CatalogPrice"
4693
+ }
4694
+ }
4695
+ }
4696
+ },
4697
+ "V2BundleTemplateList": {
4698
+ "description": "V2 bundle template list",
4699
+ "content": {
4700
+ "application/json": {
4701
+ "schema": {
4702
+ "anyOf": [
4703
+ {
4704
+ "type": "array",
4705
+ "items": {
4706
+ "$ref": "#/components/schemas/V2BundleTemplate"
4707
+ }
4708
+ },
4709
+ {
4710
+ "type": "object",
4711
+ "properties": {
4712
+ "count": {
4713
+ "type": "integer"
4714
+ },
4715
+ "next": {
4716
+ "type": "string",
4717
+ "nullable": true
4718
+ },
4719
+ "previous": {
4720
+ "type": "string",
4721
+ "nullable": true
4722
+ },
4723
+ "results": {
4724
+ "type": "array",
4725
+ "items": {
4726
+ "$ref": "#/components/schemas/V2BundleTemplate"
4727
+ }
4728
+ }
4729
+ }
4730
+ }
4731
+ ]
4732
+ }
4733
+ }
4734
+ }
4735
+ },
4736
+ "V2BundleTemplateDetail": {
4737
+ "description": "V2 bundle template detail",
4738
+ "content": {
4739
+ "application/json": {
4740
+ "schema": {
4741
+ "$ref": "#/components/schemas/V2BundleTemplateDetail"
4742
+ }
4743
+ }
4744
+ }
4745
+ },
4746
+ "V2BundleAddonDiscovery": {
4747
+ "description": "V2 bundle add-on discovery response",
4748
+ "content": {
4749
+ "application/json": {
4750
+ "schema": {
4751
+ "$ref": "#/components/schemas/V2BundleAddonDiscoveryResponse"
4752
+ }
4753
+ }
4754
+ }
4755
+ },
4756
+ "V2SubscriptionOfferQuote": {
4757
+ "description": "V2 subscription offer quote",
4758
+ "content": {
4759
+ "application/json": {
4760
+ "schema": {
4761
+ "$ref": "#/components/schemas/V2SubscriptionOfferQuote"
4762
+ }
4763
+ }
4764
+ }
4765
+ },
4766
+ "V2SubscriptionContract": {
4767
+ "description": "V2 subscription contract",
4768
+ "content": {
4769
+ "application/json": {
4770
+ "schema": {
4771
+ "$ref": "#/components/schemas/V2SubscriptionContract"
4772
+ }
4773
+ }
4774
+ }
4775
+ },
4776
+ "V2CustomerEntitlements": {
4777
+ "description": "V2 customer service entitlement access-check result",
4778
+ "content": {
4779
+ "application/json": {
4780
+ "schema": {
4781
+ "$ref": "#/components/schemas/V2CustomerEntitlements"
4782
+ }
4783
+ }
4784
+ }
4785
+ },
4786
+ "V2CustomerPaymentMethod": {
4787
+ "description": "V2 customer payment method",
4788
+ "content": {
4789
+ "application/json": {
4790
+ "schema": {
4791
+ "$ref": "#/components/schemas/V2CustomerPaymentMethod"
4792
+ }
4793
+ }
4794
+ }
4795
+ },
4796
+ "V2CustomerPaymentMethodList": {
4797
+ "description": "V2 customer payment method list",
4798
+ "content": {
4799
+ "application/json": {
4800
+ "schema": {
4801
+ "type": "array",
4802
+ "items": {
4803
+ "$ref": "#/components/schemas/V2CustomerPaymentMethod"
4804
+ }
4805
+ }
4806
+ }
4807
+ }
4808
+ },
4809
+ "V2Checkout": {
4810
+ "description": "V2 checkout",
4811
+ "content": {
4812
+ "application/json": {
4813
+ "schema": {
4814
+ "$ref": "#/components/schemas/V2Checkout"
4815
+ }
4816
+ }
4817
+ }
4818
+ },
4819
+ "V2PaymentMethodRegistration": {
4820
+ "description": "V2 payment method registration",
4821
+ "content": {
4822
+ "application/json": {
4823
+ "schema": {
4824
+ "$ref": "#/components/schemas/V2PaymentMethodRegistration"
4825
+ }
4826
+ }
4827
+ }
4828
+ },
4829
+ "V2PaymentProcessorOptions": {
4830
+ "description": "V2 payment processor options",
4831
+ "content": {
4832
+ "application/json": {
4833
+ "schema": {
4834
+ "$ref": "#/components/schemas/V2PaymentProcessorOptionsResponse"
4835
+ }
4836
+ }
4837
+ }
4838
+ },
4839
+ "V2CheckoutSession": {
4840
+ "description": "Embedded checkout session",
4841
+ "content": {
4842
+ "application/json": {
4843
+ "schema": {
4844
+ "$ref": "#/components/schemas/V2CheckoutSession"
4845
+ }
4846
+ }
4847
+ }
4848
+ },
4849
+ "V2SubscriptionContractList": {
4850
+ "description": "V2 subscription contract list",
4851
+ "content": {
4852
+ "application/json": {
4853
+ "schema": {
4854
+ "anyOf": [
4855
+ {
4856
+ "type": "array",
4857
+ "items": {
4858
+ "$ref": "#/components/schemas/V2SubscriptionContract"
4859
+ }
4860
+ },
4861
+ {
4862
+ "type": "object",
4863
+ "properties": {
4864
+ "count": {
4865
+ "type": "integer"
4866
+ },
4867
+ "next": {
4868
+ "type": "string",
4869
+ "nullable": true
4870
+ },
4871
+ "previous": {
4872
+ "type": "string",
4873
+ "nullable": true
4874
+ },
4875
+ "results": {
4876
+ "type": "array",
4877
+ "items": {
4878
+ "$ref": "#/components/schemas/V2SubscriptionContract"
4879
+ }
4880
+ }
4881
+ }
4882
+ }
4883
+ ]
4884
+ }
4885
+ }
4886
+ }
4887
+ },
4888
+ "V2BillingRun": {
4889
+ "description": "V2 billing run",
4890
+ "content": {
4891
+ "application/json": {
4892
+ "schema": {
4893
+ "$ref": "#/components/schemas/V2BillingRun"
4894
+ }
4895
+ }
4896
+ }
4897
+ },
4898
+ "V2BillingRunList": {
4899
+ "description": "V2 billing run list",
4900
+ "content": {
4901
+ "application/json": {
4902
+ "schema": {
4903
+ "anyOf": [
4904
+ {
4905
+ "type": "array",
4906
+ "items": {
4907
+ "$ref": "#/components/schemas/V2BillingRun"
4908
+ }
4909
+ },
4910
+ {
4911
+ "type": "object",
4912
+ "properties": {
4913
+ "count": {
4914
+ "type": "integer"
4915
+ },
4916
+ "next": {
4917
+ "type": "string",
4918
+ "nullable": true
4919
+ },
4920
+ "previous": {
4921
+ "type": "string",
4922
+ "nullable": true
4923
+ },
4924
+ "results": {
4925
+ "type": "array",
4926
+ "items": {
4927
+ "$ref": "#/components/schemas/V2BillingRun"
4928
+ }
4929
+ }
4930
+ }
4931
+ }
4932
+ ]
4933
+ }
4934
+ }
4935
+ }
4936
+ }
4937
+ },
4938
+ "securitySchemes": {
4939
+ "Secret-Api-Key": {
4940
+ "type": "apiKey",
4941
+ "name": "Authorization",
4942
+ "in": "header"
4943
+ },
4944
+ "Public-Api-Key": {
4945
+ "type": "apiKey",
4946
+ "name": "Authorization",
4947
+ "in": "header"
4948
+ }
4949
+ }
4950
+ }
4951
+ }