@voyant-travel/finance 0.151.4 → 0.152.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.
Files changed (50) hide show
  1. package/dist/booking-lifecycle.d.ts +13 -0
  2. package/dist/booking-lifecycle.d.ts.map +1 -0
  3. package/dist/booking-lifecycle.js +64 -0
  4. package/dist/booking-schedule/subscriber-runtime.d.ts +20 -0
  5. package/dist/booking-schedule/subscriber-runtime.d.ts.map +1 -0
  6. package/dist/booking-schedule/subscriber-runtime.js +39 -0
  7. package/dist/booking-tax.d.ts +31 -21
  8. package/dist/booking-tax.d.ts.map +1 -1
  9. package/dist/booking-tax.js +84 -13
  10. package/dist/index.d.ts +6 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +37 -7
  13. package/dist/mcp-runtime.d.ts +3 -0
  14. package/dist/mcp-runtime.d.ts.map +1 -0
  15. package/dist/mcp-runtime.js +16 -0
  16. package/dist/payment-schedule/routes.d.ts +1 -0
  17. package/dist/payment-schedule/routes.d.ts.map +1 -1
  18. package/dist/payment-schedule/routes.js +32 -0
  19. package/dist/routes-action-ledger.d.ts +19 -19
  20. package/dist/routes-booking-billing.d.ts +30 -30
  21. package/dist/routes-booking-create.d.ts.map +1 -1
  22. package/dist/routes-booking-create.js +2 -0
  23. package/dist/routes-booking-reads.d.ts +11 -11
  24. package/dist/routes-invoice-core.d.ts +11 -11
  25. package/dist/routes-public.d.ts +24 -24
  26. package/dist/routes-public.d.ts.map +1 -1
  27. package/dist/routes-public.js +12 -0
  28. package/dist/routes-reference-data.d.ts +15 -15
  29. package/dist/routes-reports.d.ts +11 -11
  30. package/dist/routes-settlement.d.ts +11 -11
  31. package/dist/routes-supplier-invoices.d.ts +20 -20
  32. package/dist/routes.d.ts +78 -78
  33. package/dist/runtime-contributor.d.ts +7 -0
  34. package/dist/runtime-contributor.d.ts.map +1 -0
  35. package/dist/runtime-contributor.js +17 -0
  36. package/dist/runtime-port.d.ts +70 -0
  37. package/dist/runtime-port.d.ts.map +1 -0
  38. package/dist/runtime-port.js +47 -0
  39. package/dist/runtime.d.ts +10 -0
  40. package/dist/runtime.d.ts.map +1 -0
  41. package/dist/runtime.js +98 -0
  42. package/dist/stale-booking-holds-runtime.d.ts +9 -0
  43. package/dist/stale-booking-holds-runtime.d.ts.map +1 -0
  44. package/dist/stale-booking-holds-runtime.js +25 -0
  45. package/dist/voyant.d.ts.map +1 -1
  46. package/dist/voyant.js +156 -8
  47. package/openapi/admin/booking-tax.json +86 -0
  48. package/openapi/admin/finance.json +36583 -0
  49. package/openapi/storefront/finance.json +3678 -0
  50. package/package.json +45 -17
@@ -0,0 +1,3678 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant Operator API",
5
+ "version": "0.0.0",
6
+ "description": "Generated from the composed operator app. Do not edit by hand."
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "/",
11
+ "description": "This deployment (same origin)"
12
+ }
13
+ ],
14
+ "components": {
15
+ "schemas": {
16
+ "CatalogSearchFilter": {
17
+ "anyOf": [
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "kind": {
22
+ "type": "string",
23
+ "enum": ["eq"]
24
+ },
25
+ "field": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "value": {
30
+ "anyOf": [
31
+ {
32
+ "type": "string"
33
+ },
34
+ {
35
+ "type": "number"
36
+ },
37
+ {
38
+ "type": "boolean"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ "required": ["kind", "field", "value"]
44
+ },
45
+ {
46
+ "type": "object",
47
+ "properties": {
48
+ "kind": {
49
+ "type": "string",
50
+ "enum": ["in"]
51
+ },
52
+ "field": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
56
+ "values": {
57
+ "type": "array",
58
+ "items": {
59
+ "anyOf": [
60
+ {
61
+ "type": "string"
62
+ },
63
+ {
64
+ "type": "number"
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ },
70
+ "required": ["kind", "field", "values"]
71
+ },
72
+ {
73
+ "type": "object",
74
+ "properties": {
75
+ "kind": {
76
+ "type": "string",
77
+ "enum": ["range"]
78
+ },
79
+ "field": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "gte": {
84
+ "type": "number"
85
+ },
86
+ "lte": {
87
+ "type": "number"
88
+ }
89
+ },
90
+ "required": ["kind", "field"]
91
+ },
92
+ {
93
+ "type": "object",
94
+ "properties": {
95
+ "kind": {
96
+ "type": "string",
97
+ "enum": ["and"]
98
+ },
99
+ "clauses": {
100
+ "type": "array",
101
+ "items": {
102
+ "$ref": "#/components/schemas/CatalogSearchFilter"
103
+ }
104
+ }
105
+ },
106
+ "required": ["kind", "clauses"]
107
+ },
108
+ {
109
+ "type": "object",
110
+ "properties": {
111
+ "kind": {
112
+ "type": "string",
113
+ "enum": ["or"]
114
+ },
115
+ "clauses": {
116
+ "type": "array",
117
+ "items": {
118
+ "$ref": "#/components/schemas/CatalogSearchFilter"
119
+ }
120
+ }
121
+ },
122
+ "required": ["kind", "clauses"]
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "parameters": {}
128
+ },
129
+ "paths": {
130
+ "/v1/public/finance/vouchers/validate": {
131
+ "post": {
132
+ "requestBody": {
133
+ "required": true,
134
+ "content": {
135
+ "application/json": {
136
+ "schema": {
137
+ "type": "object",
138
+ "properties": {
139
+ "code": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "maxLength": 255
143
+ },
144
+ "provider": {
145
+ "type": ["string", "null"],
146
+ "maxLength": 255
147
+ },
148
+ "bookingId": {
149
+ "type": ["string", "null"]
150
+ },
151
+ "currency": {
152
+ "type": ["string", "null"],
153
+ "minLength": 3,
154
+ "maxLength": 3
155
+ },
156
+ "amountCents": {
157
+ "type": ["integer", "null"],
158
+ "minimum": 1
159
+ }
160
+ },
161
+ "required": ["code"]
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "responses": {
167
+ "200": {
168
+ "description": "Voucher validity result",
169
+ "content": {
170
+ "application/json": {
171
+ "schema": {
172
+ "type": "object",
173
+ "properties": {
174
+ "data": {
175
+ "type": "object",
176
+ "properties": {
177
+ "valid": {
178
+ "type": "boolean"
179
+ },
180
+ "reason": {
181
+ "type": ["string", "null"],
182
+ "enum": [
183
+ "not_found",
184
+ "inactive",
185
+ "not_started",
186
+ "expired",
187
+ "booking_mismatch",
188
+ "currency_mismatch",
189
+ "insufficient_balance",
190
+ null
191
+ ]
192
+ },
193
+ "voucher": {
194
+ "type": ["object", "null"],
195
+ "properties": {
196
+ "id": {
197
+ "type": "string"
198
+ },
199
+ "code": {
200
+ "type": "string"
201
+ },
202
+ "label": {
203
+ "type": ["string", "null"]
204
+ },
205
+ "provider": {
206
+ "type": ["string", "null"]
207
+ },
208
+ "currency": {
209
+ "type": ["string", "null"]
210
+ },
211
+ "amountCents": {
212
+ "type": ["integer", "null"]
213
+ },
214
+ "remainingAmountCents": {
215
+ "type": ["integer", "null"]
216
+ },
217
+ "expiresAt": {
218
+ "type": ["string", "null"]
219
+ }
220
+ },
221
+ "required": [
222
+ "id",
223
+ "code",
224
+ "label",
225
+ "provider",
226
+ "currency",
227
+ "amountCents",
228
+ "remainingAmountCents",
229
+ "expiresAt"
230
+ ]
231
+ }
232
+ },
233
+ "required": ["valid", "reason", "voucher"]
234
+ }
235
+ },
236
+ "required": ["data"]
237
+ }
238
+ }
239
+ }
240
+ }
241
+ },
242
+ "operationId": "postPublicFinanceVouchersValidate",
243
+ "summary": "POST /v1/public/finance/vouchers/validate",
244
+ "tags": ["finance"],
245
+ "x-voyant-module": "finance",
246
+ "x-voyant-surface": "storefront"
247
+ }
248
+ },
249
+ "/v1/public/finance/documents/by-reference": {
250
+ "get": {
251
+ "parameters": [
252
+ {
253
+ "schema": {
254
+ "type": "string",
255
+ "minLength": 1,
256
+ "maxLength": 255
257
+ },
258
+ "required": true,
259
+ "name": "reference",
260
+ "in": "query"
261
+ },
262
+ {
263
+ "schema": {
264
+ "type": "string",
265
+ "enum": ["invoice", "proforma", "credit_note"]
266
+ },
267
+ "required": false,
268
+ "name": "invoiceType",
269
+ "in": "query"
270
+ }
271
+ ],
272
+ "responses": {
273
+ "200": {
274
+ "description": "Finance document resolved by external reference",
275
+ "content": {
276
+ "application/json": {
277
+ "schema": {
278
+ "type": "object",
279
+ "properties": {
280
+ "data": {
281
+ "type": "object",
282
+ "properties": {
283
+ "invoiceId": {
284
+ "type": "string"
285
+ },
286
+ "invoiceNumber": {
287
+ "type": "string"
288
+ },
289
+ "invoiceType": {
290
+ "type": "string",
291
+ "enum": ["invoice", "proforma", "credit_note"]
292
+ },
293
+ "invoiceStatus": {
294
+ "type": "string",
295
+ "enum": [
296
+ "draft",
297
+ "pending_external_allocation",
298
+ "issued",
299
+ "partially_paid",
300
+ "paid",
301
+ "overdue",
302
+ "void"
303
+ ]
304
+ },
305
+ "currency": {
306
+ "type": "string"
307
+ },
308
+ "totalCents": {
309
+ "type": "integer"
310
+ },
311
+ "paidCents": {
312
+ "type": "integer"
313
+ },
314
+ "balanceDueCents": {
315
+ "type": "integer"
316
+ },
317
+ "issueDate": {
318
+ "type": "string"
319
+ },
320
+ "dueDate": {
321
+ "type": "string"
322
+ },
323
+ "renditionId": {
324
+ "type": ["string", "null"]
325
+ },
326
+ "documentStatus": {
327
+ "type": "string",
328
+ "enum": ["missing", "pending", "ready", "failed", "stale"]
329
+ },
330
+ "format": {
331
+ "type": ["string", "null"],
332
+ "enum": ["html", "pdf", "xml", "json", null]
333
+ },
334
+ "language": {
335
+ "type": ["string", "null"]
336
+ },
337
+ "generatedAt": {
338
+ "type": ["string", "null"]
339
+ },
340
+ "fileSize": {
341
+ "type": ["integer", "null"]
342
+ },
343
+ "checksum": {
344
+ "type": ["string", "null"]
345
+ },
346
+ "downloadUrl": {
347
+ "type": ["string", "null"]
348
+ },
349
+ "bookingId": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "required": [
354
+ "invoiceId",
355
+ "invoiceNumber",
356
+ "invoiceType",
357
+ "invoiceStatus",
358
+ "currency",
359
+ "totalCents",
360
+ "paidCents",
361
+ "balanceDueCents",
362
+ "issueDate",
363
+ "dueDate",
364
+ "renditionId",
365
+ "documentStatus",
366
+ "format",
367
+ "language",
368
+ "generatedAt",
369
+ "fileSize",
370
+ "checksum",
371
+ "downloadUrl",
372
+ "bookingId"
373
+ ]
374
+ }
375
+ },
376
+ "required": ["data"]
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "404": {
382
+ "description": "Finance document not found",
383
+ "content": {
384
+ "application/json": {
385
+ "schema": {
386
+ "type": "object",
387
+ "properties": {
388
+ "error": {
389
+ "type": "string"
390
+ }
391
+ },
392
+ "required": ["error"]
393
+ }
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "operationId": "getPublicFinanceDocumentsByReference",
399
+ "summary": "GET /v1/public/finance/documents/by-reference",
400
+ "tags": ["finance"],
401
+ "x-voyant-module": "finance",
402
+ "x-voyant-surface": "storefront"
403
+ }
404
+ },
405
+ "/v1/public/finance/bookings/{bookingId}/documents": {
406
+ "get": {
407
+ "parameters": [
408
+ {
409
+ "schema": {
410
+ "type": "string"
411
+ },
412
+ "required": true,
413
+ "name": "bookingId",
414
+ "in": "path"
415
+ }
416
+ ],
417
+ "responses": {
418
+ "200": {
419
+ "description": "Finance documents for a booking",
420
+ "content": {
421
+ "application/json": {
422
+ "schema": {
423
+ "type": "object",
424
+ "properties": {
425
+ "data": {
426
+ "type": "object",
427
+ "properties": {
428
+ "bookingId": {
429
+ "type": "string"
430
+ },
431
+ "documents": {
432
+ "type": "array",
433
+ "items": {
434
+ "type": "object",
435
+ "properties": {
436
+ "invoiceId": {
437
+ "type": "string"
438
+ },
439
+ "invoiceNumber": {
440
+ "type": "string"
441
+ },
442
+ "invoiceType": {
443
+ "type": "string",
444
+ "enum": ["invoice", "proforma", "credit_note"]
445
+ },
446
+ "invoiceStatus": {
447
+ "type": "string",
448
+ "enum": [
449
+ "draft",
450
+ "pending_external_allocation",
451
+ "issued",
452
+ "partially_paid",
453
+ "paid",
454
+ "overdue",
455
+ "void"
456
+ ]
457
+ },
458
+ "currency": {
459
+ "type": "string"
460
+ },
461
+ "totalCents": {
462
+ "type": "integer"
463
+ },
464
+ "paidCents": {
465
+ "type": "integer"
466
+ },
467
+ "balanceDueCents": {
468
+ "type": "integer"
469
+ },
470
+ "issueDate": {
471
+ "type": "string"
472
+ },
473
+ "dueDate": {
474
+ "type": "string"
475
+ },
476
+ "renditionId": {
477
+ "type": ["string", "null"]
478
+ },
479
+ "documentStatus": {
480
+ "type": "string",
481
+ "enum": ["missing", "pending", "ready", "failed", "stale"]
482
+ },
483
+ "format": {
484
+ "type": ["string", "null"],
485
+ "enum": ["html", "pdf", "xml", "json", null]
486
+ },
487
+ "language": {
488
+ "type": ["string", "null"]
489
+ },
490
+ "generatedAt": {
491
+ "type": ["string", "null"]
492
+ },
493
+ "fileSize": {
494
+ "type": ["integer", "null"]
495
+ },
496
+ "checksum": {
497
+ "type": ["string", "null"]
498
+ },
499
+ "downloadUrl": {
500
+ "type": ["string", "null"]
501
+ }
502
+ },
503
+ "required": [
504
+ "invoiceId",
505
+ "invoiceNumber",
506
+ "invoiceType",
507
+ "invoiceStatus",
508
+ "currency",
509
+ "totalCents",
510
+ "paidCents",
511
+ "balanceDueCents",
512
+ "issueDate",
513
+ "dueDate",
514
+ "renditionId",
515
+ "documentStatus",
516
+ "format",
517
+ "language",
518
+ "generatedAt",
519
+ "fileSize",
520
+ "checksum",
521
+ "downloadUrl"
522
+ ]
523
+ }
524
+ }
525
+ },
526
+ "required": ["bookingId", "documents"]
527
+ }
528
+ },
529
+ "required": ["data"]
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "404": {
535
+ "description": "Booking documents not found",
536
+ "content": {
537
+ "application/json": {
538
+ "schema": {
539
+ "type": "object",
540
+ "properties": {
541
+ "error": {
542
+ "type": "string"
543
+ }
544
+ },
545
+ "required": ["error"]
546
+ }
547
+ }
548
+ }
549
+ }
550
+ },
551
+ "operationId": "getPublicFinanceBookingsByBookingIdDocuments",
552
+ "summary": "GET /v1/public/finance/bookings/{bookingId}/documents",
553
+ "tags": ["finance"],
554
+ "x-voyant-module": "finance",
555
+ "x-voyant-surface": "storefront"
556
+ }
557
+ },
558
+ "/v1/public/finance/bookings/{bookingId}/documents/by-reference": {
559
+ "get": {
560
+ "parameters": [
561
+ {
562
+ "schema": {
563
+ "type": "string"
564
+ },
565
+ "required": true,
566
+ "name": "bookingId",
567
+ "in": "path"
568
+ },
569
+ {
570
+ "schema": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 255
574
+ },
575
+ "required": true,
576
+ "name": "reference",
577
+ "in": "query"
578
+ },
579
+ {
580
+ "schema": {
581
+ "type": "string",
582
+ "enum": ["invoice", "proforma", "credit_note"]
583
+ },
584
+ "required": false,
585
+ "name": "invoiceType",
586
+ "in": "query"
587
+ }
588
+ ],
589
+ "responses": {
590
+ "200": {
591
+ "description": "Finance document for a booking resolved by external reference",
592
+ "content": {
593
+ "application/json": {
594
+ "schema": {
595
+ "type": "object",
596
+ "properties": {
597
+ "data": {
598
+ "type": "object",
599
+ "properties": {
600
+ "invoiceId": {
601
+ "type": "string"
602
+ },
603
+ "invoiceNumber": {
604
+ "type": "string"
605
+ },
606
+ "invoiceType": {
607
+ "type": "string",
608
+ "enum": ["invoice", "proforma", "credit_note"]
609
+ },
610
+ "invoiceStatus": {
611
+ "type": "string",
612
+ "enum": [
613
+ "draft",
614
+ "pending_external_allocation",
615
+ "issued",
616
+ "partially_paid",
617
+ "paid",
618
+ "overdue",
619
+ "void"
620
+ ]
621
+ },
622
+ "currency": {
623
+ "type": "string"
624
+ },
625
+ "totalCents": {
626
+ "type": "integer"
627
+ },
628
+ "paidCents": {
629
+ "type": "integer"
630
+ },
631
+ "balanceDueCents": {
632
+ "type": "integer"
633
+ },
634
+ "issueDate": {
635
+ "type": "string"
636
+ },
637
+ "dueDate": {
638
+ "type": "string"
639
+ },
640
+ "renditionId": {
641
+ "type": ["string", "null"]
642
+ },
643
+ "documentStatus": {
644
+ "type": "string",
645
+ "enum": ["missing", "pending", "ready", "failed", "stale"]
646
+ },
647
+ "format": {
648
+ "type": ["string", "null"],
649
+ "enum": ["html", "pdf", "xml", "json", null]
650
+ },
651
+ "language": {
652
+ "type": ["string", "null"]
653
+ },
654
+ "generatedAt": {
655
+ "type": ["string", "null"]
656
+ },
657
+ "fileSize": {
658
+ "type": ["integer", "null"]
659
+ },
660
+ "checksum": {
661
+ "type": ["string", "null"]
662
+ },
663
+ "downloadUrl": {
664
+ "type": ["string", "null"]
665
+ },
666
+ "bookingId": {
667
+ "type": "string"
668
+ }
669
+ },
670
+ "required": [
671
+ "invoiceId",
672
+ "invoiceNumber",
673
+ "invoiceType",
674
+ "invoiceStatus",
675
+ "currency",
676
+ "totalCents",
677
+ "paidCents",
678
+ "balanceDueCents",
679
+ "issueDate",
680
+ "dueDate",
681
+ "renditionId",
682
+ "documentStatus",
683
+ "format",
684
+ "language",
685
+ "generatedAt",
686
+ "fileSize",
687
+ "checksum",
688
+ "downloadUrl",
689
+ "bookingId"
690
+ ]
691
+ }
692
+ },
693
+ "required": ["data"]
694
+ }
695
+ }
696
+ }
697
+ },
698
+ "404": {
699
+ "description": "Finance document not found",
700
+ "content": {
701
+ "application/json": {
702
+ "schema": {
703
+ "type": "object",
704
+ "properties": {
705
+ "error": {
706
+ "type": "string"
707
+ }
708
+ },
709
+ "required": ["error"]
710
+ }
711
+ }
712
+ }
713
+ }
714
+ },
715
+ "operationId": "getPublicFinanceBookingsByBookingIdDocumentsByReference",
716
+ "summary": "GET /v1/public/finance/bookings/{bookingId}/documents/by-reference",
717
+ "tags": ["finance"],
718
+ "x-voyant-module": "finance",
719
+ "x-voyant-surface": "storefront"
720
+ }
721
+ },
722
+ "/v1/public/finance/bookings/{bookingId}/payments": {
723
+ "get": {
724
+ "parameters": [
725
+ {
726
+ "schema": {
727
+ "type": "string"
728
+ },
729
+ "required": true,
730
+ "name": "bookingId",
731
+ "in": "path"
732
+ }
733
+ ],
734
+ "responses": {
735
+ "200": {
736
+ "description": "Payments recorded against a booking",
737
+ "content": {
738
+ "application/json": {
739
+ "schema": {
740
+ "type": "object",
741
+ "properties": {
742
+ "data": {
743
+ "type": "object",
744
+ "properties": {
745
+ "bookingId": {
746
+ "type": "string"
747
+ },
748
+ "payments": {
749
+ "type": "array",
750
+ "items": {
751
+ "type": "object",
752
+ "properties": {
753
+ "id": {
754
+ "type": "string"
755
+ },
756
+ "source": {
757
+ "type": "string",
758
+ "enum": ["payment", "voucher_redemption"],
759
+ "default": "payment"
760
+ },
761
+ "invoiceId": {
762
+ "type": ["string", "null"]
763
+ },
764
+ "invoiceNumber": {
765
+ "type": ["string", "null"]
766
+ },
767
+ "invoiceType": {
768
+ "type": ["string", "null"],
769
+ "enum": ["invoice", "proforma", "credit_note", null]
770
+ },
771
+ "status": {
772
+ "type": "string",
773
+ "enum": ["pending", "completed", "failed", "refunded"]
774
+ },
775
+ "paymentMethod": {
776
+ "type": "string",
777
+ "enum": [
778
+ "bank_transfer",
779
+ "credit_card",
780
+ "debit_card",
781
+ "cash",
782
+ "cheque",
783
+ "wallet",
784
+ "direct_bill",
785
+ "voucher",
786
+ "other"
787
+ ]
788
+ },
789
+ "amountCents": {
790
+ "type": "integer"
791
+ },
792
+ "currency": {
793
+ "type": "string"
794
+ },
795
+ "baseCurrency": {
796
+ "type": ["string", "null"]
797
+ },
798
+ "baseAmountCents": {
799
+ "type": ["integer", "null"]
800
+ },
801
+ "paymentDate": {
802
+ "type": "string"
803
+ },
804
+ "referenceNumber": {
805
+ "type": ["string", "null"]
806
+ },
807
+ "notes": {
808
+ "type": ["string", "null"]
809
+ }
810
+ },
811
+ "required": [
812
+ "id",
813
+ "invoiceId",
814
+ "invoiceNumber",
815
+ "invoiceType",
816
+ "status",
817
+ "paymentMethod",
818
+ "amountCents",
819
+ "currency",
820
+ "baseCurrency",
821
+ "baseAmountCents",
822
+ "paymentDate",
823
+ "referenceNumber",
824
+ "notes"
825
+ ]
826
+ }
827
+ }
828
+ },
829
+ "required": ["bookingId", "payments"]
830
+ }
831
+ },
832
+ "required": ["data"]
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "404": {
838
+ "description": "Booking payments not found",
839
+ "content": {
840
+ "application/json": {
841
+ "schema": {
842
+ "type": "object",
843
+ "properties": {
844
+ "error": {
845
+ "type": "string"
846
+ }
847
+ },
848
+ "required": ["error"]
849
+ }
850
+ }
851
+ }
852
+ }
853
+ },
854
+ "operationId": "getPublicFinanceBookingsByBookingIdPayments",
855
+ "summary": "GET /v1/public/finance/bookings/{bookingId}/payments",
856
+ "tags": ["finance"],
857
+ "x-voyant-module": "finance",
858
+ "x-voyant-surface": "storefront"
859
+ }
860
+ },
861
+ "/v1/public/finance/bookings/{bookingId}/payment-options": {
862
+ "get": {
863
+ "parameters": [
864
+ {
865
+ "schema": {
866
+ "type": "string"
867
+ },
868
+ "required": true,
869
+ "name": "bookingId",
870
+ "in": "path"
871
+ },
872
+ {
873
+ "schema": {
874
+ "type": "string"
875
+ },
876
+ "required": false,
877
+ "name": "personId",
878
+ "in": "query"
879
+ },
880
+ {
881
+ "schema": {
882
+ "type": "string"
883
+ },
884
+ "required": false,
885
+ "name": "organizationId",
886
+ "in": "query"
887
+ },
888
+ {
889
+ "schema": {
890
+ "type": "string"
891
+ },
892
+ "required": false,
893
+ "name": "provider",
894
+ "in": "query"
895
+ },
896
+ {
897
+ "schema": {
898
+ "type": "string",
899
+ "enum": [
900
+ "credit_card",
901
+ "debit_card",
902
+ "bank_account",
903
+ "wallet",
904
+ "voucher",
905
+ "direct_bill",
906
+ "cash",
907
+ "other"
908
+ ]
909
+ },
910
+ "required": false,
911
+ "name": "instrumentType",
912
+ "in": "query"
913
+ },
914
+ {
915
+ "schema": {
916
+ "type": ["boolean", "null"],
917
+ "default": false
918
+ },
919
+ "required": false,
920
+ "name": "includeInactive",
921
+ "in": "query"
922
+ }
923
+ ],
924
+ "responses": {
925
+ "200": {
926
+ "description": "Payment options (instruments, schedules, guarantees) for a booking",
927
+ "content": {
928
+ "application/json": {
929
+ "schema": {
930
+ "type": "object",
931
+ "properties": {
932
+ "data": {
933
+ "type": "object",
934
+ "properties": {
935
+ "bookingId": {
936
+ "type": "string"
937
+ },
938
+ "accounts": {
939
+ "type": "array",
940
+ "items": {
941
+ "type": "object",
942
+ "properties": {
943
+ "id": {
944
+ "type": "string"
945
+ },
946
+ "label": {
947
+ "type": "string"
948
+ },
949
+ "provider": {
950
+ "type": ["string", "null"]
951
+ },
952
+ "instrumentType": {
953
+ "type": "string",
954
+ "enum": [
955
+ "credit_card",
956
+ "debit_card",
957
+ "bank_account",
958
+ "wallet",
959
+ "voucher",
960
+ "direct_bill",
961
+ "cash",
962
+ "other"
963
+ ]
964
+ },
965
+ "status": {
966
+ "type": "string",
967
+ "enum": [
968
+ "active",
969
+ "inactive",
970
+ "expired",
971
+ "revoked",
972
+ "failed_verification"
973
+ ]
974
+ },
975
+ "brand": {
976
+ "type": ["string", "null"]
977
+ },
978
+ "last4": {
979
+ "type": ["string", "null"]
980
+ },
981
+ "expiryMonth": {
982
+ "type": ["integer", "null"]
983
+ },
984
+ "expiryYear": {
985
+ "type": ["integer", "null"]
986
+ },
987
+ "isDefault": {
988
+ "type": "boolean"
989
+ }
990
+ },
991
+ "required": [
992
+ "id",
993
+ "label",
994
+ "provider",
995
+ "instrumentType",
996
+ "status",
997
+ "brand",
998
+ "last4",
999
+ "expiryMonth",
1000
+ "expiryYear",
1001
+ "isDefault"
1002
+ ]
1003
+ }
1004
+ },
1005
+ "schedules": {
1006
+ "type": "array",
1007
+ "items": {
1008
+ "type": "object",
1009
+ "properties": {
1010
+ "id": {
1011
+ "type": "string"
1012
+ },
1013
+ "scheduleType": {
1014
+ "type": "string",
1015
+ "enum": ["deposit", "installment", "balance", "hold", "other"]
1016
+ },
1017
+ "status": {
1018
+ "type": "string",
1019
+ "enum": ["pending", "due", "paid", "waived", "cancelled", "expired"]
1020
+ },
1021
+ "dueDate": {
1022
+ "type": "string"
1023
+ },
1024
+ "currency": {
1025
+ "type": "string"
1026
+ },
1027
+ "amountCents": {
1028
+ "type": "integer"
1029
+ },
1030
+ "notes": {
1031
+ "type": ["string", "null"]
1032
+ }
1033
+ },
1034
+ "required": [
1035
+ "id",
1036
+ "scheduleType",
1037
+ "status",
1038
+ "dueDate",
1039
+ "currency",
1040
+ "amountCents",
1041
+ "notes"
1042
+ ]
1043
+ }
1044
+ },
1045
+ "guarantees": {
1046
+ "type": "array",
1047
+ "items": {
1048
+ "type": "object",
1049
+ "properties": {
1050
+ "id": {
1051
+ "type": "string"
1052
+ },
1053
+ "bookingPaymentScheduleId": {
1054
+ "type": ["string", "null"]
1055
+ },
1056
+ "guaranteeType": {
1057
+ "type": "string"
1058
+ },
1059
+ "status": {
1060
+ "type": "string"
1061
+ },
1062
+ "currency": {
1063
+ "type": ["string", "null"]
1064
+ },
1065
+ "amountCents": {
1066
+ "type": ["integer", "null"]
1067
+ },
1068
+ "provider": {
1069
+ "type": ["string", "null"]
1070
+ },
1071
+ "referenceNumber": {
1072
+ "type": ["string", "null"]
1073
+ },
1074
+ "expiresAt": {
1075
+ "type": ["string", "null"]
1076
+ },
1077
+ "notes": {
1078
+ "type": ["string", "null"]
1079
+ }
1080
+ },
1081
+ "required": [
1082
+ "id",
1083
+ "bookingPaymentScheduleId",
1084
+ "guaranteeType",
1085
+ "status",
1086
+ "currency",
1087
+ "amountCents",
1088
+ "provider",
1089
+ "referenceNumber",
1090
+ "expiresAt",
1091
+ "notes"
1092
+ ]
1093
+ }
1094
+ },
1095
+ "recommendedTarget": {
1096
+ "type": ["object", "null"],
1097
+ "properties": {
1098
+ "targetType": {
1099
+ "type": ["string", "null"],
1100
+ "enum": ["booking_payment_schedule", "booking_guarantee", null]
1101
+ },
1102
+ "targetId": {
1103
+ "type": ["string", "null"]
1104
+ }
1105
+ },
1106
+ "required": ["targetType", "targetId"]
1107
+ }
1108
+ },
1109
+ "required": [
1110
+ "bookingId",
1111
+ "accounts",
1112
+ "schedules",
1113
+ "guarantees",
1114
+ "recommendedTarget"
1115
+ ]
1116
+ }
1117
+ },
1118
+ "required": ["data"]
1119
+ }
1120
+ }
1121
+ }
1122
+ },
1123
+ "404": {
1124
+ "description": "Booking payment options not found",
1125
+ "content": {
1126
+ "application/json": {
1127
+ "schema": {
1128
+ "type": "object",
1129
+ "properties": {
1130
+ "error": {
1131
+ "type": "string"
1132
+ }
1133
+ },
1134
+ "required": ["error"]
1135
+ }
1136
+ }
1137
+ }
1138
+ }
1139
+ },
1140
+ "operationId": "getPublicFinanceBookingsByBookingIdPaymentOptions",
1141
+ "summary": "GET /v1/public/finance/bookings/{bookingId}/payment-options",
1142
+ "tags": ["finance"],
1143
+ "x-voyant-module": "finance",
1144
+ "x-voyant-surface": "storefront"
1145
+ }
1146
+ },
1147
+ "/v1/public/finance/payment-sessions/{sessionId}": {
1148
+ "get": {
1149
+ "parameters": [
1150
+ {
1151
+ "schema": {
1152
+ "type": "string"
1153
+ },
1154
+ "required": true,
1155
+ "name": "sessionId",
1156
+ "in": "path"
1157
+ }
1158
+ ],
1159
+ "responses": {
1160
+ "200": {
1161
+ "description": "A redacted public payment-session projection",
1162
+ "content": {
1163
+ "application/json": {
1164
+ "schema": {
1165
+ "type": "object",
1166
+ "properties": {
1167
+ "data": {
1168
+ "type": "object",
1169
+ "properties": {
1170
+ "id": {
1171
+ "type": "string"
1172
+ },
1173
+ "target": {
1174
+ "oneOf": [
1175
+ {
1176
+ "type": "object",
1177
+ "properties": {
1178
+ "type": {
1179
+ "type": "string",
1180
+ "enum": ["booking"]
1181
+ },
1182
+ "bookingId": {
1183
+ "type": "string",
1184
+ "minLength": 1
1185
+ }
1186
+ },
1187
+ "required": ["type", "bookingId"]
1188
+ },
1189
+ {
1190
+ "type": "object",
1191
+ "properties": {
1192
+ "type": {
1193
+ "type": "string",
1194
+ "enum": ["invoice"]
1195
+ },
1196
+ "invoiceId": {
1197
+ "type": "string",
1198
+ "minLength": 1
1199
+ }
1200
+ },
1201
+ "required": ["type", "invoiceId"]
1202
+ },
1203
+ {
1204
+ "type": "object",
1205
+ "properties": {
1206
+ "type": {
1207
+ "type": "string",
1208
+ "enum": ["booking_payment_schedule"]
1209
+ },
1210
+ "bookingPaymentScheduleId": {
1211
+ "type": "string",
1212
+ "minLength": 1
1213
+ }
1214
+ },
1215
+ "required": ["type", "bookingPaymentScheduleId"]
1216
+ },
1217
+ {
1218
+ "type": "object",
1219
+ "properties": {
1220
+ "type": {
1221
+ "type": "string",
1222
+ "enum": ["booking_guarantee"]
1223
+ },
1224
+ "bookingGuaranteeId": {
1225
+ "type": "string",
1226
+ "minLength": 1
1227
+ }
1228
+ },
1229
+ "required": ["type", "bookingGuaranteeId"]
1230
+ },
1231
+ {
1232
+ "type": "object",
1233
+ "properties": {
1234
+ "type": {
1235
+ "type": "string",
1236
+ "enum": ["flight_order"]
1237
+ },
1238
+ "flightOrderId": {
1239
+ "type": "string",
1240
+ "minLength": 1
1241
+ }
1242
+ },
1243
+ "required": ["type", "flightOrderId"]
1244
+ },
1245
+ {
1246
+ "type": "object",
1247
+ "properties": {
1248
+ "type": {
1249
+ "type": "string",
1250
+ "enum": ["program"]
1251
+ },
1252
+ "programId": {
1253
+ "type": "string",
1254
+ "minLength": 1
1255
+ }
1256
+ },
1257
+ "required": ["type", "programId"]
1258
+ },
1259
+ {
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "type": {
1263
+ "type": "string",
1264
+ "enum": ["supplier_settlement"]
1265
+ },
1266
+ "supplierSettlementId": {
1267
+ "type": "string",
1268
+ "minLength": 1
1269
+ }
1270
+ },
1271
+ "required": ["type", "supplierSettlementId"]
1272
+ },
1273
+ {
1274
+ "type": "object",
1275
+ "properties": {
1276
+ "type": {
1277
+ "type": "string",
1278
+ "enum": ["channel_settlement"]
1279
+ },
1280
+ "channelSettlementId": {
1281
+ "type": "string",
1282
+ "minLength": 1
1283
+ }
1284
+ },
1285
+ "required": ["type", "channelSettlementId"]
1286
+ },
1287
+ {
1288
+ "type": "object",
1289
+ "properties": {
1290
+ "type": {
1291
+ "type": "string",
1292
+ "enum": ["provider_reference"]
1293
+ },
1294
+ "provider": {
1295
+ "type": "string",
1296
+ "minLength": 1,
1297
+ "maxLength": 255
1298
+ },
1299
+ "reference": {
1300
+ "type": "string",
1301
+ "minLength": 1,
1302
+ "maxLength": 255
1303
+ }
1304
+ },
1305
+ "required": ["type", "provider", "reference"]
1306
+ },
1307
+ {
1308
+ "type": "object",
1309
+ "properties": {
1310
+ "type": {
1311
+ "type": "string",
1312
+ "enum": ["legacy_order"]
1313
+ },
1314
+ "legacyOrderId": {
1315
+ "type": "string",
1316
+ "minLength": 1
1317
+ }
1318
+ },
1319
+ "required": ["type", "legacyOrderId"]
1320
+ },
1321
+ {
1322
+ "type": "null"
1323
+ }
1324
+ ]
1325
+ },
1326
+ "provenance": {
1327
+ "type": ["object", "null"],
1328
+ "properties": {
1329
+ "source": {
1330
+ "type": "string",
1331
+ "enum": [
1332
+ "operator",
1333
+ "storefront",
1334
+ "customer_portal",
1335
+ "payment_provider",
1336
+ "supplier_channel",
1337
+ "migration",
1338
+ "other"
1339
+ ],
1340
+ "default": "operator"
1341
+ },
1342
+ "provider": {
1343
+ "type": ["string", "null"],
1344
+ "maxLength": 255
1345
+ },
1346
+ "reference": {
1347
+ "type": ["string", "null"],
1348
+ "maxLength": 255
1349
+ },
1350
+ "idempotencyKey": {
1351
+ "type": ["string", "null"],
1352
+ "maxLength": 255
1353
+ }
1354
+ }
1355
+ },
1356
+ "targetType": {
1357
+ "type": "string",
1358
+ "enum": [
1359
+ "booking",
1360
+ "order",
1361
+ "invoice",
1362
+ "booking_payment_schedule",
1363
+ "booking_guarantee",
1364
+ "flight_order",
1365
+ "other"
1366
+ ]
1367
+ },
1368
+ "targetId": {
1369
+ "type": ["string", "null"]
1370
+ },
1371
+ "bookingId": {
1372
+ "type": ["string", "null"]
1373
+ },
1374
+ "legacyOrderId": {
1375
+ "type": ["string", "null"]
1376
+ },
1377
+ "invoiceId": {
1378
+ "type": ["string", "null"]
1379
+ },
1380
+ "bookingPaymentScheduleId": {
1381
+ "type": ["string", "null"]
1382
+ },
1383
+ "bookingGuaranteeId": {
1384
+ "type": ["string", "null"]
1385
+ },
1386
+ "status": {
1387
+ "type": "string",
1388
+ "enum": [
1389
+ "pending",
1390
+ "requires_redirect",
1391
+ "processing",
1392
+ "authorized",
1393
+ "paid",
1394
+ "failed",
1395
+ "cancelled",
1396
+ "expired"
1397
+ ]
1398
+ },
1399
+ "provider": {
1400
+ "type": ["string", "null"]
1401
+ },
1402
+ "providerSessionId": {
1403
+ "type": ["string", "null"]
1404
+ },
1405
+ "providerPaymentId": {
1406
+ "type": ["string", "null"]
1407
+ },
1408
+ "externalReference": {
1409
+ "type": ["string", "null"]
1410
+ },
1411
+ "clientReference": {
1412
+ "type": ["string", "null"]
1413
+ },
1414
+ "currency": {
1415
+ "type": "string"
1416
+ },
1417
+ "amountCents": {
1418
+ "type": "integer"
1419
+ },
1420
+ "paymentMethod": {
1421
+ "type": ["string", "null"],
1422
+ "enum": [
1423
+ "bank_transfer",
1424
+ "credit_card",
1425
+ "debit_card",
1426
+ "cash",
1427
+ "cheque",
1428
+ "wallet",
1429
+ "direct_bill",
1430
+ "voucher",
1431
+ "other",
1432
+ null
1433
+ ]
1434
+ },
1435
+ "payerEmail": {
1436
+ "type": ["string", "null"]
1437
+ },
1438
+ "payerName": {
1439
+ "type": ["string", "null"]
1440
+ },
1441
+ "redirectUrl": {
1442
+ "type": ["string", "null"]
1443
+ },
1444
+ "returnUrl": {
1445
+ "type": ["string", "null"]
1446
+ },
1447
+ "cancelUrl": {
1448
+ "type": ["string", "null"]
1449
+ },
1450
+ "expiresAt": {
1451
+ "type": ["string", "null"]
1452
+ },
1453
+ "completedAt": {
1454
+ "type": ["string", "null"]
1455
+ },
1456
+ "failureCode": {
1457
+ "type": ["string", "null"]
1458
+ },
1459
+ "failureMessage": {
1460
+ "type": ["string", "null"]
1461
+ },
1462
+ "notes": {
1463
+ "type": ["string", "null"]
1464
+ }
1465
+ },
1466
+ "required": [
1467
+ "id",
1468
+ "targetType",
1469
+ "targetId",
1470
+ "bookingId",
1471
+ "invoiceId",
1472
+ "bookingPaymentScheduleId",
1473
+ "bookingGuaranteeId",
1474
+ "status",
1475
+ "provider",
1476
+ "providerSessionId",
1477
+ "providerPaymentId",
1478
+ "externalReference",
1479
+ "clientReference",
1480
+ "currency",
1481
+ "amountCents",
1482
+ "paymentMethod",
1483
+ "payerEmail",
1484
+ "payerName",
1485
+ "redirectUrl",
1486
+ "returnUrl",
1487
+ "cancelUrl",
1488
+ "expiresAt",
1489
+ "completedAt",
1490
+ "failureCode",
1491
+ "failureMessage",
1492
+ "notes"
1493
+ ]
1494
+ }
1495
+ },
1496
+ "required": ["data"]
1497
+ }
1498
+ }
1499
+ }
1500
+ },
1501
+ "404": {
1502
+ "description": "Payment session not found",
1503
+ "content": {
1504
+ "application/json": {
1505
+ "schema": {
1506
+ "type": "object",
1507
+ "properties": {
1508
+ "error": {
1509
+ "type": "string"
1510
+ }
1511
+ },
1512
+ "required": ["error"]
1513
+ }
1514
+ }
1515
+ }
1516
+ }
1517
+ },
1518
+ "operationId": "getPublicFinancePaymentSessionsBySessionId",
1519
+ "summary": "GET /v1/public/finance/payment-sessions/{sessionId}",
1520
+ "tags": ["finance"],
1521
+ "x-voyant-module": "finance",
1522
+ "x-voyant-surface": "storefront"
1523
+ }
1524
+ },
1525
+ "/v1/public/finance/bookings/{bookingId}/payment-schedules/{scheduleId}/payment-session": {
1526
+ "post": {
1527
+ "parameters": [
1528
+ {
1529
+ "schema": {
1530
+ "type": "string"
1531
+ },
1532
+ "required": true,
1533
+ "name": "bookingId",
1534
+ "in": "path"
1535
+ },
1536
+ {
1537
+ "schema": {
1538
+ "type": "string"
1539
+ },
1540
+ "required": true,
1541
+ "name": "scheduleId",
1542
+ "in": "path"
1543
+ }
1544
+ ],
1545
+ "requestBody": {
1546
+ "required": true,
1547
+ "content": {
1548
+ "application/json": {
1549
+ "schema": {
1550
+ "type": "object",
1551
+ "properties": {
1552
+ "target": {
1553
+ "oneOf": [
1554
+ {
1555
+ "type": "object",
1556
+ "properties": {
1557
+ "type": {
1558
+ "type": "string",
1559
+ "enum": ["booking"]
1560
+ },
1561
+ "bookingId": {
1562
+ "type": "string",
1563
+ "minLength": 1
1564
+ }
1565
+ },
1566
+ "required": ["type", "bookingId"]
1567
+ },
1568
+ {
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "type": {
1572
+ "type": "string",
1573
+ "enum": ["invoice"]
1574
+ },
1575
+ "invoiceId": {
1576
+ "type": "string",
1577
+ "minLength": 1
1578
+ }
1579
+ },
1580
+ "required": ["type", "invoiceId"]
1581
+ },
1582
+ {
1583
+ "type": "object",
1584
+ "properties": {
1585
+ "type": {
1586
+ "type": "string",
1587
+ "enum": ["booking_payment_schedule"]
1588
+ },
1589
+ "bookingPaymentScheduleId": {
1590
+ "type": "string",
1591
+ "minLength": 1
1592
+ }
1593
+ },
1594
+ "required": ["type", "bookingPaymentScheduleId"]
1595
+ },
1596
+ {
1597
+ "type": "object",
1598
+ "properties": {
1599
+ "type": {
1600
+ "type": "string",
1601
+ "enum": ["booking_guarantee"]
1602
+ },
1603
+ "bookingGuaranteeId": {
1604
+ "type": "string",
1605
+ "minLength": 1
1606
+ }
1607
+ },
1608
+ "required": ["type", "bookingGuaranteeId"]
1609
+ },
1610
+ {
1611
+ "type": "object",
1612
+ "properties": {
1613
+ "type": {
1614
+ "type": "string",
1615
+ "enum": ["flight_order"]
1616
+ },
1617
+ "flightOrderId": {
1618
+ "type": "string",
1619
+ "minLength": 1
1620
+ }
1621
+ },
1622
+ "required": ["type", "flightOrderId"]
1623
+ },
1624
+ {
1625
+ "type": "object",
1626
+ "properties": {
1627
+ "type": {
1628
+ "type": "string",
1629
+ "enum": ["program"]
1630
+ },
1631
+ "programId": {
1632
+ "type": "string",
1633
+ "minLength": 1
1634
+ }
1635
+ },
1636
+ "required": ["type", "programId"]
1637
+ },
1638
+ {
1639
+ "type": "object",
1640
+ "properties": {
1641
+ "type": {
1642
+ "type": "string",
1643
+ "enum": ["supplier_settlement"]
1644
+ },
1645
+ "supplierSettlementId": {
1646
+ "type": "string",
1647
+ "minLength": 1
1648
+ }
1649
+ },
1650
+ "required": ["type", "supplierSettlementId"]
1651
+ },
1652
+ {
1653
+ "type": "object",
1654
+ "properties": {
1655
+ "type": {
1656
+ "type": "string",
1657
+ "enum": ["channel_settlement"]
1658
+ },
1659
+ "channelSettlementId": {
1660
+ "type": "string",
1661
+ "minLength": 1
1662
+ }
1663
+ },
1664
+ "required": ["type", "channelSettlementId"]
1665
+ },
1666
+ {
1667
+ "type": "object",
1668
+ "properties": {
1669
+ "type": {
1670
+ "type": "string",
1671
+ "enum": ["provider_reference"]
1672
+ },
1673
+ "provider": {
1674
+ "type": "string",
1675
+ "minLength": 1,
1676
+ "maxLength": 255
1677
+ },
1678
+ "reference": {
1679
+ "type": "string",
1680
+ "minLength": 1,
1681
+ "maxLength": 255
1682
+ }
1683
+ },
1684
+ "required": ["type", "provider", "reference"]
1685
+ },
1686
+ {
1687
+ "type": "object",
1688
+ "properties": {
1689
+ "type": {
1690
+ "type": "string",
1691
+ "enum": ["legacy_order"]
1692
+ },
1693
+ "legacyOrderId": {
1694
+ "type": "string",
1695
+ "minLength": 1
1696
+ }
1697
+ },
1698
+ "required": ["type", "legacyOrderId"]
1699
+ }
1700
+ ]
1701
+ },
1702
+ "provenance": {
1703
+ "type": "object",
1704
+ "properties": {
1705
+ "source": {
1706
+ "type": "string",
1707
+ "enum": [
1708
+ "operator",
1709
+ "storefront",
1710
+ "customer_portal",
1711
+ "payment_provider",
1712
+ "supplier_channel",
1713
+ "migration",
1714
+ "other"
1715
+ ],
1716
+ "default": "operator"
1717
+ },
1718
+ "provider": {
1719
+ "type": ["string", "null"],
1720
+ "maxLength": 255
1721
+ },
1722
+ "reference": {
1723
+ "type": ["string", "null"],
1724
+ "maxLength": 255
1725
+ },
1726
+ "idempotencyKey": {
1727
+ "type": ["string", "null"],
1728
+ "maxLength": 255
1729
+ }
1730
+ }
1731
+ },
1732
+ "provider": {
1733
+ "type": ["string", "null"],
1734
+ "maxLength": 255
1735
+ },
1736
+ "paymentMethod": {
1737
+ "type": ["string", "null"],
1738
+ "enum": [
1739
+ "bank_transfer",
1740
+ "credit_card",
1741
+ "debit_card",
1742
+ "cash",
1743
+ "cheque",
1744
+ "wallet",
1745
+ "direct_bill",
1746
+ "voucher",
1747
+ "other",
1748
+ null
1749
+ ]
1750
+ },
1751
+ "paymentInstrumentId": {
1752
+ "type": ["string", "null"]
1753
+ },
1754
+ "payerPersonId": {
1755
+ "type": ["string", "null"]
1756
+ },
1757
+ "payerOrganizationId": {
1758
+ "type": ["string", "null"]
1759
+ },
1760
+ "payerEmail": {
1761
+ "type": ["string", "null"],
1762
+ "format": "email"
1763
+ },
1764
+ "payerName": {
1765
+ "type": ["string", "null"],
1766
+ "maxLength": 255
1767
+ },
1768
+ "externalReference": {
1769
+ "type": ["string", "null"],
1770
+ "maxLength": 255
1771
+ },
1772
+ "idempotencyKey": {
1773
+ "type": ["string", "null"],
1774
+ "maxLength": 255
1775
+ },
1776
+ "clientReference": {
1777
+ "type": ["string", "null"],
1778
+ "maxLength": 255
1779
+ },
1780
+ "returnUrl": {
1781
+ "type": ["string", "null"],
1782
+ "format": "uri"
1783
+ },
1784
+ "cancelUrl": {
1785
+ "type": ["string", "null"],
1786
+ "format": "uri"
1787
+ },
1788
+ "callbackUrl": {
1789
+ "type": ["string", "null"],
1790
+ "format": "uri"
1791
+ },
1792
+ "expiresAt": {
1793
+ "type": ["string", "null"]
1794
+ },
1795
+ "notes": {
1796
+ "type": ["string", "null"]
1797
+ },
1798
+ "providerPayload": {
1799
+ "type": ["object", "null"],
1800
+ "additionalProperties": {}
1801
+ },
1802
+ "metadata": {
1803
+ "type": ["object", "null"],
1804
+ "additionalProperties": {}
1805
+ }
1806
+ }
1807
+ }
1808
+ }
1809
+ }
1810
+ },
1811
+ "responses": {
1812
+ "201": {
1813
+ "description": "Started payment session for a booking payment schedule",
1814
+ "content": {
1815
+ "application/json": {
1816
+ "schema": {
1817
+ "type": "object",
1818
+ "properties": {
1819
+ "data": {
1820
+ "type": "object",
1821
+ "properties": {
1822
+ "id": {
1823
+ "type": "string"
1824
+ },
1825
+ "target": {
1826
+ "oneOf": [
1827
+ {
1828
+ "type": "object",
1829
+ "properties": {
1830
+ "type": {
1831
+ "type": "string",
1832
+ "enum": ["booking"]
1833
+ },
1834
+ "bookingId": {
1835
+ "type": "string",
1836
+ "minLength": 1
1837
+ }
1838
+ },
1839
+ "required": ["type", "bookingId"]
1840
+ },
1841
+ {
1842
+ "type": "object",
1843
+ "properties": {
1844
+ "type": {
1845
+ "type": "string",
1846
+ "enum": ["invoice"]
1847
+ },
1848
+ "invoiceId": {
1849
+ "type": "string",
1850
+ "minLength": 1
1851
+ }
1852
+ },
1853
+ "required": ["type", "invoiceId"]
1854
+ },
1855
+ {
1856
+ "type": "object",
1857
+ "properties": {
1858
+ "type": {
1859
+ "type": "string",
1860
+ "enum": ["booking_payment_schedule"]
1861
+ },
1862
+ "bookingPaymentScheduleId": {
1863
+ "type": "string",
1864
+ "minLength": 1
1865
+ }
1866
+ },
1867
+ "required": ["type", "bookingPaymentScheduleId"]
1868
+ },
1869
+ {
1870
+ "type": "object",
1871
+ "properties": {
1872
+ "type": {
1873
+ "type": "string",
1874
+ "enum": ["booking_guarantee"]
1875
+ },
1876
+ "bookingGuaranteeId": {
1877
+ "type": "string",
1878
+ "minLength": 1
1879
+ }
1880
+ },
1881
+ "required": ["type", "bookingGuaranteeId"]
1882
+ },
1883
+ {
1884
+ "type": "object",
1885
+ "properties": {
1886
+ "type": {
1887
+ "type": "string",
1888
+ "enum": ["flight_order"]
1889
+ },
1890
+ "flightOrderId": {
1891
+ "type": "string",
1892
+ "minLength": 1
1893
+ }
1894
+ },
1895
+ "required": ["type", "flightOrderId"]
1896
+ },
1897
+ {
1898
+ "type": "object",
1899
+ "properties": {
1900
+ "type": {
1901
+ "type": "string",
1902
+ "enum": ["program"]
1903
+ },
1904
+ "programId": {
1905
+ "type": "string",
1906
+ "minLength": 1
1907
+ }
1908
+ },
1909
+ "required": ["type", "programId"]
1910
+ },
1911
+ {
1912
+ "type": "object",
1913
+ "properties": {
1914
+ "type": {
1915
+ "type": "string",
1916
+ "enum": ["supplier_settlement"]
1917
+ },
1918
+ "supplierSettlementId": {
1919
+ "type": "string",
1920
+ "minLength": 1
1921
+ }
1922
+ },
1923
+ "required": ["type", "supplierSettlementId"]
1924
+ },
1925
+ {
1926
+ "type": "object",
1927
+ "properties": {
1928
+ "type": {
1929
+ "type": "string",
1930
+ "enum": ["channel_settlement"]
1931
+ },
1932
+ "channelSettlementId": {
1933
+ "type": "string",
1934
+ "minLength": 1
1935
+ }
1936
+ },
1937
+ "required": ["type", "channelSettlementId"]
1938
+ },
1939
+ {
1940
+ "type": "object",
1941
+ "properties": {
1942
+ "type": {
1943
+ "type": "string",
1944
+ "enum": ["provider_reference"]
1945
+ },
1946
+ "provider": {
1947
+ "type": "string",
1948
+ "minLength": 1,
1949
+ "maxLength": 255
1950
+ },
1951
+ "reference": {
1952
+ "type": "string",
1953
+ "minLength": 1,
1954
+ "maxLength": 255
1955
+ }
1956
+ },
1957
+ "required": ["type", "provider", "reference"]
1958
+ },
1959
+ {
1960
+ "type": "object",
1961
+ "properties": {
1962
+ "type": {
1963
+ "type": "string",
1964
+ "enum": ["legacy_order"]
1965
+ },
1966
+ "legacyOrderId": {
1967
+ "type": "string",
1968
+ "minLength": 1
1969
+ }
1970
+ },
1971
+ "required": ["type", "legacyOrderId"]
1972
+ },
1973
+ {
1974
+ "type": "null"
1975
+ }
1976
+ ]
1977
+ },
1978
+ "provenance": {
1979
+ "type": ["object", "null"],
1980
+ "properties": {
1981
+ "source": {
1982
+ "type": "string",
1983
+ "enum": [
1984
+ "operator",
1985
+ "storefront",
1986
+ "customer_portal",
1987
+ "payment_provider",
1988
+ "supplier_channel",
1989
+ "migration",
1990
+ "other"
1991
+ ],
1992
+ "default": "operator"
1993
+ },
1994
+ "provider": {
1995
+ "type": ["string", "null"],
1996
+ "maxLength": 255
1997
+ },
1998
+ "reference": {
1999
+ "type": ["string", "null"],
2000
+ "maxLength": 255
2001
+ },
2002
+ "idempotencyKey": {
2003
+ "type": ["string", "null"],
2004
+ "maxLength": 255
2005
+ }
2006
+ }
2007
+ },
2008
+ "targetType": {
2009
+ "type": "string",
2010
+ "enum": [
2011
+ "booking",
2012
+ "order",
2013
+ "invoice",
2014
+ "booking_payment_schedule",
2015
+ "booking_guarantee",
2016
+ "flight_order",
2017
+ "other"
2018
+ ]
2019
+ },
2020
+ "targetId": {
2021
+ "type": ["string", "null"]
2022
+ },
2023
+ "bookingId": {
2024
+ "type": ["string", "null"]
2025
+ },
2026
+ "legacyOrderId": {
2027
+ "type": ["string", "null"]
2028
+ },
2029
+ "invoiceId": {
2030
+ "type": ["string", "null"]
2031
+ },
2032
+ "bookingPaymentScheduleId": {
2033
+ "type": ["string", "null"]
2034
+ },
2035
+ "bookingGuaranteeId": {
2036
+ "type": ["string", "null"]
2037
+ },
2038
+ "status": {
2039
+ "type": "string",
2040
+ "enum": [
2041
+ "pending",
2042
+ "requires_redirect",
2043
+ "processing",
2044
+ "authorized",
2045
+ "paid",
2046
+ "failed",
2047
+ "cancelled",
2048
+ "expired"
2049
+ ]
2050
+ },
2051
+ "provider": {
2052
+ "type": ["string", "null"]
2053
+ },
2054
+ "providerSessionId": {
2055
+ "type": ["string", "null"]
2056
+ },
2057
+ "providerPaymentId": {
2058
+ "type": ["string", "null"]
2059
+ },
2060
+ "externalReference": {
2061
+ "type": ["string", "null"]
2062
+ },
2063
+ "clientReference": {
2064
+ "type": ["string", "null"]
2065
+ },
2066
+ "currency": {
2067
+ "type": "string"
2068
+ },
2069
+ "amountCents": {
2070
+ "type": "integer"
2071
+ },
2072
+ "paymentMethod": {
2073
+ "type": ["string", "null"],
2074
+ "enum": [
2075
+ "bank_transfer",
2076
+ "credit_card",
2077
+ "debit_card",
2078
+ "cash",
2079
+ "cheque",
2080
+ "wallet",
2081
+ "direct_bill",
2082
+ "voucher",
2083
+ "other",
2084
+ null
2085
+ ]
2086
+ },
2087
+ "payerEmail": {
2088
+ "type": ["string", "null"]
2089
+ },
2090
+ "payerName": {
2091
+ "type": ["string", "null"]
2092
+ },
2093
+ "redirectUrl": {
2094
+ "type": ["string", "null"]
2095
+ },
2096
+ "returnUrl": {
2097
+ "type": ["string", "null"]
2098
+ },
2099
+ "cancelUrl": {
2100
+ "type": ["string", "null"]
2101
+ },
2102
+ "expiresAt": {
2103
+ "type": ["string", "null"]
2104
+ },
2105
+ "completedAt": {
2106
+ "type": ["string", "null"]
2107
+ },
2108
+ "failureCode": {
2109
+ "type": ["string", "null"]
2110
+ },
2111
+ "failureMessage": {
2112
+ "type": ["string", "null"]
2113
+ },
2114
+ "notes": {
2115
+ "type": ["string", "null"]
2116
+ }
2117
+ },
2118
+ "required": [
2119
+ "id",
2120
+ "targetType",
2121
+ "targetId",
2122
+ "bookingId",
2123
+ "invoiceId",
2124
+ "bookingPaymentScheduleId",
2125
+ "bookingGuaranteeId",
2126
+ "status",
2127
+ "provider",
2128
+ "providerSessionId",
2129
+ "providerPaymentId",
2130
+ "externalReference",
2131
+ "clientReference",
2132
+ "currency",
2133
+ "amountCents",
2134
+ "paymentMethod",
2135
+ "payerEmail",
2136
+ "payerName",
2137
+ "redirectUrl",
2138
+ "returnUrl",
2139
+ "cancelUrl",
2140
+ "expiresAt",
2141
+ "completedAt",
2142
+ "failureCode",
2143
+ "failureMessage",
2144
+ "notes"
2145
+ ]
2146
+ }
2147
+ },
2148
+ "required": ["data"]
2149
+ }
2150
+ }
2151
+ }
2152
+ },
2153
+ "404": {
2154
+ "description": "Booking payment schedule not found",
2155
+ "content": {
2156
+ "application/json": {
2157
+ "schema": {
2158
+ "type": "object",
2159
+ "properties": {
2160
+ "error": {
2161
+ "type": "string"
2162
+ }
2163
+ },
2164
+ "required": ["error"]
2165
+ }
2166
+ }
2167
+ }
2168
+ },
2169
+ "409": {
2170
+ "description": "Payment session could not be started",
2171
+ "content": {
2172
+ "application/json": {
2173
+ "schema": {
2174
+ "type": "object",
2175
+ "properties": {
2176
+ "error": {
2177
+ "type": "string"
2178
+ }
2179
+ },
2180
+ "required": ["error"]
2181
+ }
2182
+ }
2183
+ }
2184
+ }
2185
+ },
2186
+ "operationId": "postPublicFinanceBookingsByBookingIdPaymentSchedulesByScheduleIdPaymentSession",
2187
+ "summary": "POST /v1/public/finance/bookings/{bookingId}/payment-schedules/{scheduleId}/payment-session",
2188
+ "tags": ["finance"],
2189
+ "x-voyant-module": "finance",
2190
+ "x-voyant-surface": "storefront"
2191
+ }
2192
+ },
2193
+ "/v1/public/finance/bookings/{bookingId}/guarantees/{guaranteeId}/payment-session": {
2194
+ "post": {
2195
+ "parameters": [
2196
+ {
2197
+ "schema": {
2198
+ "type": "string"
2199
+ },
2200
+ "required": true,
2201
+ "name": "bookingId",
2202
+ "in": "path"
2203
+ },
2204
+ {
2205
+ "schema": {
2206
+ "type": "string"
2207
+ },
2208
+ "required": true,
2209
+ "name": "guaranteeId",
2210
+ "in": "path"
2211
+ }
2212
+ ],
2213
+ "requestBody": {
2214
+ "required": true,
2215
+ "content": {
2216
+ "application/json": {
2217
+ "schema": {
2218
+ "type": "object",
2219
+ "properties": {
2220
+ "target": {
2221
+ "oneOf": [
2222
+ {
2223
+ "type": "object",
2224
+ "properties": {
2225
+ "type": {
2226
+ "type": "string",
2227
+ "enum": ["booking"]
2228
+ },
2229
+ "bookingId": {
2230
+ "type": "string",
2231
+ "minLength": 1
2232
+ }
2233
+ },
2234
+ "required": ["type", "bookingId"]
2235
+ },
2236
+ {
2237
+ "type": "object",
2238
+ "properties": {
2239
+ "type": {
2240
+ "type": "string",
2241
+ "enum": ["invoice"]
2242
+ },
2243
+ "invoiceId": {
2244
+ "type": "string",
2245
+ "minLength": 1
2246
+ }
2247
+ },
2248
+ "required": ["type", "invoiceId"]
2249
+ },
2250
+ {
2251
+ "type": "object",
2252
+ "properties": {
2253
+ "type": {
2254
+ "type": "string",
2255
+ "enum": ["booking_payment_schedule"]
2256
+ },
2257
+ "bookingPaymentScheduleId": {
2258
+ "type": "string",
2259
+ "minLength": 1
2260
+ }
2261
+ },
2262
+ "required": ["type", "bookingPaymentScheduleId"]
2263
+ },
2264
+ {
2265
+ "type": "object",
2266
+ "properties": {
2267
+ "type": {
2268
+ "type": "string",
2269
+ "enum": ["booking_guarantee"]
2270
+ },
2271
+ "bookingGuaranteeId": {
2272
+ "type": "string",
2273
+ "minLength": 1
2274
+ }
2275
+ },
2276
+ "required": ["type", "bookingGuaranteeId"]
2277
+ },
2278
+ {
2279
+ "type": "object",
2280
+ "properties": {
2281
+ "type": {
2282
+ "type": "string",
2283
+ "enum": ["flight_order"]
2284
+ },
2285
+ "flightOrderId": {
2286
+ "type": "string",
2287
+ "minLength": 1
2288
+ }
2289
+ },
2290
+ "required": ["type", "flightOrderId"]
2291
+ },
2292
+ {
2293
+ "type": "object",
2294
+ "properties": {
2295
+ "type": {
2296
+ "type": "string",
2297
+ "enum": ["program"]
2298
+ },
2299
+ "programId": {
2300
+ "type": "string",
2301
+ "minLength": 1
2302
+ }
2303
+ },
2304
+ "required": ["type", "programId"]
2305
+ },
2306
+ {
2307
+ "type": "object",
2308
+ "properties": {
2309
+ "type": {
2310
+ "type": "string",
2311
+ "enum": ["supplier_settlement"]
2312
+ },
2313
+ "supplierSettlementId": {
2314
+ "type": "string",
2315
+ "minLength": 1
2316
+ }
2317
+ },
2318
+ "required": ["type", "supplierSettlementId"]
2319
+ },
2320
+ {
2321
+ "type": "object",
2322
+ "properties": {
2323
+ "type": {
2324
+ "type": "string",
2325
+ "enum": ["channel_settlement"]
2326
+ },
2327
+ "channelSettlementId": {
2328
+ "type": "string",
2329
+ "minLength": 1
2330
+ }
2331
+ },
2332
+ "required": ["type", "channelSettlementId"]
2333
+ },
2334
+ {
2335
+ "type": "object",
2336
+ "properties": {
2337
+ "type": {
2338
+ "type": "string",
2339
+ "enum": ["provider_reference"]
2340
+ },
2341
+ "provider": {
2342
+ "type": "string",
2343
+ "minLength": 1,
2344
+ "maxLength": 255
2345
+ },
2346
+ "reference": {
2347
+ "type": "string",
2348
+ "minLength": 1,
2349
+ "maxLength": 255
2350
+ }
2351
+ },
2352
+ "required": ["type", "provider", "reference"]
2353
+ },
2354
+ {
2355
+ "type": "object",
2356
+ "properties": {
2357
+ "type": {
2358
+ "type": "string",
2359
+ "enum": ["legacy_order"]
2360
+ },
2361
+ "legacyOrderId": {
2362
+ "type": "string",
2363
+ "minLength": 1
2364
+ }
2365
+ },
2366
+ "required": ["type", "legacyOrderId"]
2367
+ }
2368
+ ]
2369
+ },
2370
+ "provenance": {
2371
+ "type": "object",
2372
+ "properties": {
2373
+ "source": {
2374
+ "type": "string",
2375
+ "enum": [
2376
+ "operator",
2377
+ "storefront",
2378
+ "customer_portal",
2379
+ "payment_provider",
2380
+ "supplier_channel",
2381
+ "migration",
2382
+ "other"
2383
+ ],
2384
+ "default": "operator"
2385
+ },
2386
+ "provider": {
2387
+ "type": ["string", "null"],
2388
+ "maxLength": 255
2389
+ },
2390
+ "reference": {
2391
+ "type": ["string", "null"],
2392
+ "maxLength": 255
2393
+ },
2394
+ "idempotencyKey": {
2395
+ "type": ["string", "null"],
2396
+ "maxLength": 255
2397
+ }
2398
+ }
2399
+ },
2400
+ "provider": {
2401
+ "type": ["string", "null"],
2402
+ "maxLength": 255
2403
+ },
2404
+ "paymentMethod": {
2405
+ "type": ["string", "null"],
2406
+ "enum": [
2407
+ "bank_transfer",
2408
+ "credit_card",
2409
+ "debit_card",
2410
+ "cash",
2411
+ "cheque",
2412
+ "wallet",
2413
+ "direct_bill",
2414
+ "voucher",
2415
+ "other",
2416
+ null
2417
+ ]
2418
+ },
2419
+ "paymentInstrumentId": {
2420
+ "type": ["string", "null"]
2421
+ },
2422
+ "payerPersonId": {
2423
+ "type": ["string", "null"]
2424
+ },
2425
+ "payerOrganizationId": {
2426
+ "type": ["string", "null"]
2427
+ },
2428
+ "payerEmail": {
2429
+ "type": ["string", "null"],
2430
+ "format": "email"
2431
+ },
2432
+ "payerName": {
2433
+ "type": ["string", "null"],
2434
+ "maxLength": 255
2435
+ },
2436
+ "externalReference": {
2437
+ "type": ["string", "null"],
2438
+ "maxLength": 255
2439
+ },
2440
+ "idempotencyKey": {
2441
+ "type": ["string", "null"],
2442
+ "maxLength": 255
2443
+ },
2444
+ "clientReference": {
2445
+ "type": ["string", "null"],
2446
+ "maxLength": 255
2447
+ },
2448
+ "returnUrl": {
2449
+ "type": ["string", "null"],
2450
+ "format": "uri"
2451
+ },
2452
+ "cancelUrl": {
2453
+ "type": ["string", "null"],
2454
+ "format": "uri"
2455
+ },
2456
+ "callbackUrl": {
2457
+ "type": ["string", "null"],
2458
+ "format": "uri"
2459
+ },
2460
+ "expiresAt": {
2461
+ "type": ["string", "null"]
2462
+ },
2463
+ "notes": {
2464
+ "type": ["string", "null"]
2465
+ },
2466
+ "providerPayload": {
2467
+ "type": ["object", "null"],
2468
+ "additionalProperties": {}
2469
+ },
2470
+ "metadata": {
2471
+ "type": ["object", "null"],
2472
+ "additionalProperties": {}
2473
+ }
2474
+ }
2475
+ }
2476
+ }
2477
+ }
2478
+ },
2479
+ "responses": {
2480
+ "201": {
2481
+ "description": "Started payment session for a booking guarantee",
2482
+ "content": {
2483
+ "application/json": {
2484
+ "schema": {
2485
+ "type": "object",
2486
+ "properties": {
2487
+ "data": {
2488
+ "type": "object",
2489
+ "properties": {
2490
+ "id": {
2491
+ "type": "string"
2492
+ },
2493
+ "target": {
2494
+ "oneOf": [
2495
+ {
2496
+ "type": "object",
2497
+ "properties": {
2498
+ "type": {
2499
+ "type": "string",
2500
+ "enum": ["booking"]
2501
+ },
2502
+ "bookingId": {
2503
+ "type": "string",
2504
+ "minLength": 1
2505
+ }
2506
+ },
2507
+ "required": ["type", "bookingId"]
2508
+ },
2509
+ {
2510
+ "type": "object",
2511
+ "properties": {
2512
+ "type": {
2513
+ "type": "string",
2514
+ "enum": ["invoice"]
2515
+ },
2516
+ "invoiceId": {
2517
+ "type": "string",
2518
+ "minLength": 1
2519
+ }
2520
+ },
2521
+ "required": ["type", "invoiceId"]
2522
+ },
2523
+ {
2524
+ "type": "object",
2525
+ "properties": {
2526
+ "type": {
2527
+ "type": "string",
2528
+ "enum": ["booking_payment_schedule"]
2529
+ },
2530
+ "bookingPaymentScheduleId": {
2531
+ "type": "string",
2532
+ "minLength": 1
2533
+ }
2534
+ },
2535
+ "required": ["type", "bookingPaymentScheduleId"]
2536
+ },
2537
+ {
2538
+ "type": "object",
2539
+ "properties": {
2540
+ "type": {
2541
+ "type": "string",
2542
+ "enum": ["booking_guarantee"]
2543
+ },
2544
+ "bookingGuaranteeId": {
2545
+ "type": "string",
2546
+ "minLength": 1
2547
+ }
2548
+ },
2549
+ "required": ["type", "bookingGuaranteeId"]
2550
+ },
2551
+ {
2552
+ "type": "object",
2553
+ "properties": {
2554
+ "type": {
2555
+ "type": "string",
2556
+ "enum": ["flight_order"]
2557
+ },
2558
+ "flightOrderId": {
2559
+ "type": "string",
2560
+ "minLength": 1
2561
+ }
2562
+ },
2563
+ "required": ["type", "flightOrderId"]
2564
+ },
2565
+ {
2566
+ "type": "object",
2567
+ "properties": {
2568
+ "type": {
2569
+ "type": "string",
2570
+ "enum": ["program"]
2571
+ },
2572
+ "programId": {
2573
+ "type": "string",
2574
+ "minLength": 1
2575
+ }
2576
+ },
2577
+ "required": ["type", "programId"]
2578
+ },
2579
+ {
2580
+ "type": "object",
2581
+ "properties": {
2582
+ "type": {
2583
+ "type": "string",
2584
+ "enum": ["supplier_settlement"]
2585
+ },
2586
+ "supplierSettlementId": {
2587
+ "type": "string",
2588
+ "minLength": 1
2589
+ }
2590
+ },
2591
+ "required": ["type", "supplierSettlementId"]
2592
+ },
2593
+ {
2594
+ "type": "object",
2595
+ "properties": {
2596
+ "type": {
2597
+ "type": "string",
2598
+ "enum": ["channel_settlement"]
2599
+ },
2600
+ "channelSettlementId": {
2601
+ "type": "string",
2602
+ "minLength": 1
2603
+ }
2604
+ },
2605
+ "required": ["type", "channelSettlementId"]
2606
+ },
2607
+ {
2608
+ "type": "object",
2609
+ "properties": {
2610
+ "type": {
2611
+ "type": "string",
2612
+ "enum": ["provider_reference"]
2613
+ },
2614
+ "provider": {
2615
+ "type": "string",
2616
+ "minLength": 1,
2617
+ "maxLength": 255
2618
+ },
2619
+ "reference": {
2620
+ "type": "string",
2621
+ "minLength": 1,
2622
+ "maxLength": 255
2623
+ }
2624
+ },
2625
+ "required": ["type", "provider", "reference"]
2626
+ },
2627
+ {
2628
+ "type": "object",
2629
+ "properties": {
2630
+ "type": {
2631
+ "type": "string",
2632
+ "enum": ["legacy_order"]
2633
+ },
2634
+ "legacyOrderId": {
2635
+ "type": "string",
2636
+ "minLength": 1
2637
+ }
2638
+ },
2639
+ "required": ["type", "legacyOrderId"]
2640
+ },
2641
+ {
2642
+ "type": "null"
2643
+ }
2644
+ ]
2645
+ },
2646
+ "provenance": {
2647
+ "type": ["object", "null"],
2648
+ "properties": {
2649
+ "source": {
2650
+ "type": "string",
2651
+ "enum": [
2652
+ "operator",
2653
+ "storefront",
2654
+ "customer_portal",
2655
+ "payment_provider",
2656
+ "supplier_channel",
2657
+ "migration",
2658
+ "other"
2659
+ ],
2660
+ "default": "operator"
2661
+ },
2662
+ "provider": {
2663
+ "type": ["string", "null"],
2664
+ "maxLength": 255
2665
+ },
2666
+ "reference": {
2667
+ "type": ["string", "null"],
2668
+ "maxLength": 255
2669
+ },
2670
+ "idempotencyKey": {
2671
+ "type": ["string", "null"],
2672
+ "maxLength": 255
2673
+ }
2674
+ }
2675
+ },
2676
+ "targetType": {
2677
+ "type": "string",
2678
+ "enum": [
2679
+ "booking",
2680
+ "order",
2681
+ "invoice",
2682
+ "booking_payment_schedule",
2683
+ "booking_guarantee",
2684
+ "flight_order",
2685
+ "other"
2686
+ ]
2687
+ },
2688
+ "targetId": {
2689
+ "type": ["string", "null"]
2690
+ },
2691
+ "bookingId": {
2692
+ "type": ["string", "null"]
2693
+ },
2694
+ "legacyOrderId": {
2695
+ "type": ["string", "null"]
2696
+ },
2697
+ "invoiceId": {
2698
+ "type": ["string", "null"]
2699
+ },
2700
+ "bookingPaymentScheduleId": {
2701
+ "type": ["string", "null"]
2702
+ },
2703
+ "bookingGuaranteeId": {
2704
+ "type": ["string", "null"]
2705
+ },
2706
+ "status": {
2707
+ "type": "string",
2708
+ "enum": [
2709
+ "pending",
2710
+ "requires_redirect",
2711
+ "processing",
2712
+ "authorized",
2713
+ "paid",
2714
+ "failed",
2715
+ "cancelled",
2716
+ "expired"
2717
+ ]
2718
+ },
2719
+ "provider": {
2720
+ "type": ["string", "null"]
2721
+ },
2722
+ "providerSessionId": {
2723
+ "type": ["string", "null"]
2724
+ },
2725
+ "providerPaymentId": {
2726
+ "type": ["string", "null"]
2727
+ },
2728
+ "externalReference": {
2729
+ "type": ["string", "null"]
2730
+ },
2731
+ "clientReference": {
2732
+ "type": ["string", "null"]
2733
+ },
2734
+ "currency": {
2735
+ "type": "string"
2736
+ },
2737
+ "amountCents": {
2738
+ "type": "integer"
2739
+ },
2740
+ "paymentMethod": {
2741
+ "type": ["string", "null"],
2742
+ "enum": [
2743
+ "bank_transfer",
2744
+ "credit_card",
2745
+ "debit_card",
2746
+ "cash",
2747
+ "cheque",
2748
+ "wallet",
2749
+ "direct_bill",
2750
+ "voucher",
2751
+ "other",
2752
+ null
2753
+ ]
2754
+ },
2755
+ "payerEmail": {
2756
+ "type": ["string", "null"]
2757
+ },
2758
+ "payerName": {
2759
+ "type": ["string", "null"]
2760
+ },
2761
+ "redirectUrl": {
2762
+ "type": ["string", "null"]
2763
+ },
2764
+ "returnUrl": {
2765
+ "type": ["string", "null"]
2766
+ },
2767
+ "cancelUrl": {
2768
+ "type": ["string", "null"]
2769
+ },
2770
+ "expiresAt": {
2771
+ "type": ["string", "null"]
2772
+ },
2773
+ "completedAt": {
2774
+ "type": ["string", "null"]
2775
+ },
2776
+ "failureCode": {
2777
+ "type": ["string", "null"]
2778
+ },
2779
+ "failureMessage": {
2780
+ "type": ["string", "null"]
2781
+ },
2782
+ "notes": {
2783
+ "type": ["string", "null"]
2784
+ }
2785
+ },
2786
+ "required": [
2787
+ "id",
2788
+ "targetType",
2789
+ "targetId",
2790
+ "bookingId",
2791
+ "invoiceId",
2792
+ "bookingPaymentScheduleId",
2793
+ "bookingGuaranteeId",
2794
+ "status",
2795
+ "provider",
2796
+ "providerSessionId",
2797
+ "providerPaymentId",
2798
+ "externalReference",
2799
+ "clientReference",
2800
+ "currency",
2801
+ "amountCents",
2802
+ "paymentMethod",
2803
+ "payerEmail",
2804
+ "payerName",
2805
+ "redirectUrl",
2806
+ "returnUrl",
2807
+ "cancelUrl",
2808
+ "expiresAt",
2809
+ "completedAt",
2810
+ "failureCode",
2811
+ "failureMessage",
2812
+ "notes"
2813
+ ]
2814
+ }
2815
+ },
2816
+ "required": ["data"]
2817
+ }
2818
+ }
2819
+ }
2820
+ },
2821
+ "404": {
2822
+ "description": "Booking guarantee not found",
2823
+ "content": {
2824
+ "application/json": {
2825
+ "schema": {
2826
+ "type": "object",
2827
+ "properties": {
2828
+ "error": {
2829
+ "type": "string"
2830
+ }
2831
+ },
2832
+ "required": ["error"]
2833
+ }
2834
+ }
2835
+ }
2836
+ },
2837
+ "409": {
2838
+ "description": "Payment session could not be started",
2839
+ "content": {
2840
+ "application/json": {
2841
+ "schema": {
2842
+ "type": "object",
2843
+ "properties": {
2844
+ "error": {
2845
+ "type": "string"
2846
+ }
2847
+ },
2848
+ "required": ["error"]
2849
+ }
2850
+ }
2851
+ }
2852
+ }
2853
+ },
2854
+ "operationId": "postPublicFinanceBookingsByBookingIdGuaranteesByGuaranteeIdPaymentSession",
2855
+ "summary": "POST /v1/public/finance/bookings/{bookingId}/guarantees/{guaranteeId}/payment-session",
2856
+ "tags": ["finance"],
2857
+ "x-voyant-module": "finance",
2858
+ "x-voyant-surface": "storefront"
2859
+ }
2860
+ },
2861
+ "/v1/public/finance/invoices/{invoiceId}/payment-session": {
2862
+ "post": {
2863
+ "parameters": [
2864
+ {
2865
+ "schema": {
2866
+ "type": "string"
2867
+ },
2868
+ "required": true,
2869
+ "name": "invoiceId",
2870
+ "in": "path"
2871
+ }
2872
+ ],
2873
+ "requestBody": {
2874
+ "required": true,
2875
+ "content": {
2876
+ "application/json": {
2877
+ "schema": {
2878
+ "type": "object",
2879
+ "properties": {
2880
+ "target": {
2881
+ "oneOf": [
2882
+ {
2883
+ "type": "object",
2884
+ "properties": {
2885
+ "type": {
2886
+ "type": "string",
2887
+ "enum": ["booking"]
2888
+ },
2889
+ "bookingId": {
2890
+ "type": "string",
2891
+ "minLength": 1
2892
+ }
2893
+ },
2894
+ "required": ["type", "bookingId"]
2895
+ },
2896
+ {
2897
+ "type": "object",
2898
+ "properties": {
2899
+ "type": {
2900
+ "type": "string",
2901
+ "enum": ["invoice"]
2902
+ },
2903
+ "invoiceId": {
2904
+ "type": "string",
2905
+ "minLength": 1
2906
+ }
2907
+ },
2908
+ "required": ["type", "invoiceId"]
2909
+ },
2910
+ {
2911
+ "type": "object",
2912
+ "properties": {
2913
+ "type": {
2914
+ "type": "string",
2915
+ "enum": ["booking_payment_schedule"]
2916
+ },
2917
+ "bookingPaymentScheduleId": {
2918
+ "type": "string",
2919
+ "minLength": 1
2920
+ }
2921
+ },
2922
+ "required": ["type", "bookingPaymentScheduleId"]
2923
+ },
2924
+ {
2925
+ "type": "object",
2926
+ "properties": {
2927
+ "type": {
2928
+ "type": "string",
2929
+ "enum": ["booking_guarantee"]
2930
+ },
2931
+ "bookingGuaranteeId": {
2932
+ "type": "string",
2933
+ "minLength": 1
2934
+ }
2935
+ },
2936
+ "required": ["type", "bookingGuaranteeId"]
2937
+ },
2938
+ {
2939
+ "type": "object",
2940
+ "properties": {
2941
+ "type": {
2942
+ "type": "string",
2943
+ "enum": ["flight_order"]
2944
+ },
2945
+ "flightOrderId": {
2946
+ "type": "string",
2947
+ "minLength": 1
2948
+ }
2949
+ },
2950
+ "required": ["type", "flightOrderId"]
2951
+ },
2952
+ {
2953
+ "type": "object",
2954
+ "properties": {
2955
+ "type": {
2956
+ "type": "string",
2957
+ "enum": ["program"]
2958
+ },
2959
+ "programId": {
2960
+ "type": "string",
2961
+ "minLength": 1
2962
+ }
2963
+ },
2964
+ "required": ["type", "programId"]
2965
+ },
2966
+ {
2967
+ "type": "object",
2968
+ "properties": {
2969
+ "type": {
2970
+ "type": "string",
2971
+ "enum": ["supplier_settlement"]
2972
+ },
2973
+ "supplierSettlementId": {
2974
+ "type": "string",
2975
+ "minLength": 1
2976
+ }
2977
+ },
2978
+ "required": ["type", "supplierSettlementId"]
2979
+ },
2980
+ {
2981
+ "type": "object",
2982
+ "properties": {
2983
+ "type": {
2984
+ "type": "string",
2985
+ "enum": ["channel_settlement"]
2986
+ },
2987
+ "channelSettlementId": {
2988
+ "type": "string",
2989
+ "minLength": 1
2990
+ }
2991
+ },
2992
+ "required": ["type", "channelSettlementId"]
2993
+ },
2994
+ {
2995
+ "type": "object",
2996
+ "properties": {
2997
+ "type": {
2998
+ "type": "string",
2999
+ "enum": ["provider_reference"]
3000
+ },
3001
+ "provider": {
3002
+ "type": "string",
3003
+ "minLength": 1,
3004
+ "maxLength": 255
3005
+ },
3006
+ "reference": {
3007
+ "type": "string",
3008
+ "minLength": 1,
3009
+ "maxLength": 255
3010
+ }
3011
+ },
3012
+ "required": ["type", "provider", "reference"]
3013
+ },
3014
+ {
3015
+ "type": "object",
3016
+ "properties": {
3017
+ "type": {
3018
+ "type": "string",
3019
+ "enum": ["legacy_order"]
3020
+ },
3021
+ "legacyOrderId": {
3022
+ "type": "string",
3023
+ "minLength": 1
3024
+ }
3025
+ },
3026
+ "required": ["type", "legacyOrderId"]
3027
+ }
3028
+ ]
3029
+ },
3030
+ "provenance": {
3031
+ "type": "object",
3032
+ "properties": {
3033
+ "source": {
3034
+ "type": "string",
3035
+ "enum": [
3036
+ "operator",
3037
+ "storefront",
3038
+ "customer_portal",
3039
+ "payment_provider",
3040
+ "supplier_channel",
3041
+ "migration",
3042
+ "other"
3043
+ ],
3044
+ "default": "operator"
3045
+ },
3046
+ "provider": {
3047
+ "type": ["string", "null"],
3048
+ "maxLength": 255
3049
+ },
3050
+ "reference": {
3051
+ "type": ["string", "null"],
3052
+ "maxLength": 255
3053
+ },
3054
+ "idempotencyKey": {
3055
+ "type": ["string", "null"],
3056
+ "maxLength": 255
3057
+ }
3058
+ }
3059
+ },
3060
+ "provider": {
3061
+ "type": ["string", "null"],
3062
+ "maxLength": 255
3063
+ },
3064
+ "paymentMethod": {
3065
+ "type": ["string", "null"],
3066
+ "enum": [
3067
+ "bank_transfer",
3068
+ "credit_card",
3069
+ "debit_card",
3070
+ "cash",
3071
+ "cheque",
3072
+ "wallet",
3073
+ "direct_bill",
3074
+ "voucher",
3075
+ "other",
3076
+ null
3077
+ ]
3078
+ },
3079
+ "paymentInstrumentId": {
3080
+ "type": ["string", "null"]
3081
+ },
3082
+ "payerPersonId": {
3083
+ "type": ["string", "null"]
3084
+ },
3085
+ "payerOrganizationId": {
3086
+ "type": ["string", "null"]
3087
+ },
3088
+ "payerEmail": {
3089
+ "type": ["string", "null"],
3090
+ "format": "email"
3091
+ },
3092
+ "payerName": {
3093
+ "type": ["string", "null"],
3094
+ "maxLength": 255
3095
+ },
3096
+ "externalReference": {
3097
+ "type": ["string", "null"],
3098
+ "maxLength": 255
3099
+ },
3100
+ "idempotencyKey": {
3101
+ "type": ["string", "null"],
3102
+ "maxLength": 255
3103
+ },
3104
+ "clientReference": {
3105
+ "type": ["string", "null"],
3106
+ "maxLength": 255
3107
+ },
3108
+ "returnUrl": {
3109
+ "type": ["string", "null"],
3110
+ "format": "uri"
3111
+ },
3112
+ "cancelUrl": {
3113
+ "type": ["string", "null"],
3114
+ "format": "uri"
3115
+ },
3116
+ "callbackUrl": {
3117
+ "type": ["string", "null"],
3118
+ "format": "uri"
3119
+ },
3120
+ "expiresAt": {
3121
+ "type": ["string", "null"]
3122
+ },
3123
+ "notes": {
3124
+ "type": ["string", "null"]
3125
+ },
3126
+ "providerPayload": {
3127
+ "type": ["object", "null"],
3128
+ "additionalProperties": {}
3129
+ },
3130
+ "metadata": {
3131
+ "type": ["object", "null"],
3132
+ "additionalProperties": {}
3133
+ }
3134
+ }
3135
+ }
3136
+ }
3137
+ }
3138
+ },
3139
+ "responses": {
3140
+ "201": {
3141
+ "description": "Started payment session for an invoice",
3142
+ "content": {
3143
+ "application/json": {
3144
+ "schema": {
3145
+ "type": "object",
3146
+ "properties": {
3147
+ "data": {
3148
+ "type": "object",
3149
+ "properties": {
3150
+ "id": {
3151
+ "type": "string"
3152
+ },
3153
+ "target": {
3154
+ "oneOf": [
3155
+ {
3156
+ "type": "object",
3157
+ "properties": {
3158
+ "type": {
3159
+ "type": "string",
3160
+ "enum": ["booking"]
3161
+ },
3162
+ "bookingId": {
3163
+ "type": "string",
3164
+ "minLength": 1
3165
+ }
3166
+ },
3167
+ "required": ["type", "bookingId"]
3168
+ },
3169
+ {
3170
+ "type": "object",
3171
+ "properties": {
3172
+ "type": {
3173
+ "type": "string",
3174
+ "enum": ["invoice"]
3175
+ },
3176
+ "invoiceId": {
3177
+ "type": "string",
3178
+ "minLength": 1
3179
+ }
3180
+ },
3181
+ "required": ["type", "invoiceId"]
3182
+ },
3183
+ {
3184
+ "type": "object",
3185
+ "properties": {
3186
+ "type": {
3187
+ "type": "string",
3188
+ "enum": ["booking_payment_schedule"]
3189
+ },
3190
+ "bookingPaymentScheduleId": {
3191
+ "type": "string",
3192
+ "minLength": 1
3193
+ }
3194
+ },
3195
+ "required": ["type", "bookingPaymentScheduleId"]
3196
+ },
3197
+ {
3198
+ "type": "object",
3199
+ "properties": {
3200
+ "type": {
3201
+ "type": "string",
3202
+ "enum": ["booking_guarantee"]
3203
+ },
3204
+ "bookingGuaranteeId": {
3205
+ "type": "string",
3206
+ "minLength": 1
3207
+ }
3208
+ },
3209
+ "required": ["type", "bookingGuaranteeId"]
3210
+ },
3211
+ {
3212
+ "type": "object",
3213
+ "properties": {
3214
+ "type": {
3215
+ "type": "string",
3216
+ "enum": ["flight_order"]
3217
+ },
3218
+ "flightOrderId": {
3219
+ "type": "string",
3220
+ "minLength": 1
3221
+ }
3222
+ },
3223
+ "required": ["type", "flightOrderId"]
3224
+ },
3225
+ {
3226
+ "type": "object",
3227
+ "properties": {
3228
+ "type": {
3229
+ "type": "string",
3230
+ "enum": ["program"]
3231
+ },
3232
+ "programId": {
3233
+ "type": "string",
3234
+ "minLength": 1
3235
+ }
3236
+ },
3237
+ "required": ["type", "programId"]
3238
+ },
3239
+ {
3240
+ "type": "object",
3241
+ "properties": {
3242
+ "type": {
3243
+ "type": "string",
3244
+ "enum": ["supplier_settlement"]
3245
+ },
3246
+ "supplierSettlementId": {
3247
+ "type": "string",
3248
+ "minLength": 1
3249
+ }
3250
+ },
3251
+ "required": ["type", "supplierSettlementId"]
3252
+ },
3253
+ {
3254
+ "type": "object",
3255
+ "properties": {
3256
+ "type": {
3257
+ "type": "string",
3258
+ "enum": ["channel_settlement"]
3259
+ },
3260
+ "channelSettlementId": {
3261
+ "type": "string",
3262
+ "minLength": 1
3263
+ }
3264
+ },
3265
+ "required": ["type", "channelSettlementId"]
3266
+ },
3267
+ {
3268
+ "type": "object",
3269
+ "properties": {
3270
+ "type": {
3271
+ "type": "string",
3272
+ "enum": ["provider_reference"]
3273
+ },
3274
+ "provider": {
3275
+ "type": "string",
3276
+ "minLength": 1,
3277
+ "maxLength": 255
3278
+ },
3279
+ "reference": {
3280
+ "type": "string",
3281
+ "minLength": 1,
3282
+ "maxLength": 255
3283
+ }
3284
+ },
3285
+ "required": ["type", "provider", "reference"]
3286
+ },
3287
+ {
3288
+ "type": "object",
3289
+ "properties": {
3290
+ "type": {
3291
+ "type": "string",
3292
+ "enum": ["legacy_order"]
3293
+ },
3294
+ "legacyOrderId": {
3295
+ "type": "string",
3296
+ "minLength": 1
3297
+ }
3298
+ },
3299
+ "required": ["type", "legacyOrderId"]
3300
+ },
3301
+ {
3302
+ "type": "null"
3303
+ }
3304
+ ]
3305
+ },
3306
+ "provenance": {
3307
+ "type": ["object", "null"],
3308
+ "properties": {
3309
+ "source": {
3310
+ "type": "string",
3311
+ "enum": [
3312
+ "operator",
3313
+ "storefront",
3314
+ "customer_portal",
3315
+ "payment_provider",
3316
+ "supplier_channel",
3317
+ "migration",
3318
+ "other"
3319
+ ],
3320
+ "default": "operator"
3321
+ },
3322
+ "provider": {
3323
+ "type": ["string", "null"],
3324
+ "maxLength": 255
3325
+ },
3326
+ "reference": {
3327
+ "type": ["string", "null"],
3328
+ "maxLength": 255
3329
+ },
3330
+ "idempotencyKey": {
3331
+ "type": ["string", "null"],
3332
+ "maxLength": 255
3333
+ }
3334
+ }
3335
+ },
3336
+ "targetType": {
3337
+ "type": "string",
3338
+ "enum": [
3339
+ "booking",
3340
+ "order",
3341
+ "invoice",
3342
+ "booking_payment_schedule",
3343
+ "booking_guarantee",
3344
+ "flight_order",
3345
+ "other"
3346
+ ]
3347
+ },
3348
+ "targetId": {
3349
+ "type": ["string", "null"]
3350
+ },
3351
+ "bookingId": {
3352
+ "type": ["string", "null"]
3353
+ },
3354
+ "legacyOrderId": {
3355
+ "type": ["string", "null"]
3356
+ },
3357
+ "invoiceId": {
3358
+ "type": ["string", "null"]
3359
+ },
3360
+ "bookingPaymentScheduleId": {
3361
+ "type": ["string", "null"]
3362
+ },
3363
+ "bookingGuaranteeId": {
3364
+ "type": ["string", "null"]
3365
+ },
3366
+ "status": {
3367
+ "type": "string",
3368
+ "enum": [
3369
+ "pending",
3370
+ "requires_redirect",
3371
+ "processing",
3372
+ "authorized",
3373
+ "paid",
3374
+ "failed",
3375
+ "cancelled",
3376
+ "expired"
3377
+ ]
3378
+ },
3379
+ "provider": {
3380
+ "type": ["string", "null"]
3381
+ },
3382
+ "providerSessionId": {
3383
+ "type": ["string", "null"]
3384
+ },
3385
+ "providerPaymentId": {
3386
+ "type": ["string", "null"]
3387
+ },
3388
+ "externalReference": {
3389
+ "type": ["string", "null"]
3390
+ },
3391
+ "clientReference": {
3392
+ "type": ["string", "null"]
3393
+ },
3394
+ "currency": {
3395
+ "type": "string"
3396
+ },
3397
+ "amountCents": {
3398
+ "type": "integer"
3399
+ },
3400
+ "paymentMethod": {
3401
+ "type": ["string", "null"],
3402
+ "enum": [
3403
+ "bank_transfer",
3404
+ "credit_card",
3405
+ "debit_card",
3406
+ "cash",
3407
+ "cheque",
3408
+ "wallet",
3409
+ "direct_bill",
3410
+ "voucher",
3411
+ "other",
3412
+ null
3413
+ ]
3414
+ },
3415
+ "payerEmail": {
3416
+ "type": ["string", "null"]
3417
+ },
3418
+ "payerName": {
3419
+ "type": ["string", "null"]
3420
+ },
3421
+ "redirectUrl": {
3422
+ "type": ["string", "null"]
3423
+ },
3424
+ "returnUrl": {
3425
+ "type": ["string", "null"]
3426
+ },
3427
+ "cancelUrl": {
3428
+ "type": ["string", "null"]
3429
+ },
3430
+ "expiresAt": {
3431
+ "type": ["string", "null"]
3432
+ },
3433
+ "completedAt": {
3434
+ "type": ["string", "null"]
3435
+ },
3436
+ "failureCode": {
3437
+ "type": ["string", "null"]
3438
+ },
3439
+ "failureMessage": {
3440
+ "type": ["string", "null"]
3441
+ },
3442
+ "notes": {
3443
+ "type": ["string", "null"]
3444
+ }
3445
+ },
3446
+ "required": [
3447
+ "id",
3448
+ "targetType",
3449
+ "targetId",
3450
+ "bookingId",
3451
+ "invoiceId",
3452
+ "bookingPaymentScheduleId",
3453
+ "bookingGuaranteeId",
3454
+ "status",
3455
+ "provider",
3456
+ "providerSessionId",
3457
+ "providerPaymentId",
3458
+ "externalReference",
3459
+ "clientReference",
3460
+ "currency",
3461
+ "amountCents",
3462
+ "paymentMethod",
3463
+ "payerEmail",
3464
+ "payerName",
3465
+ "redirectUrl",
3466
+ "returnUrl",
3467
+ "cancelUrl",
3468
+ "expiresAt",
3469
+ "completedAt",
3470
+ "failureCode",
3471
+ "failureMessage",
3472
+ "notes"
3473
+ ]
3474
+ }
3475
+ },
3476
+ "required": ["data"]
3477
+ }
3478
+ }
3479
+ }
3480
+ },
3481
+ "404": {
3482
+ "description": "Invoice not found",
3483
+ "content": {
3484
+ "application/json": {
3485
+ "schema": {
3486
+ "type": "object",
3487
+ "properties": {
3488
+ "error": {
3489
+ "type": "string"
3490
+ }
3491
+ },
3492
+ "required": ["error"]
3493
+ }
3494
+ }
3495
+ }
3496
+ },
3497
+ "409": {
3498
+ "description": "Payment session could not be started",
3499
+ "content": {
3500
+ "application/json": {
3501
+ "schema": {
3502
+ "type": "object",
3503
+ "properties": {
3504
+ "error": {
3505
+ "type": "string"
3506
+ }
3507
+ },
3508
+ "required": ["error"]
3509
+ }
3510
+ }
3511
+ }
3512
+ }
3513
+ },
3514
+ "operationId": "postPublicFinanceInvoicesByInvoiceIdPaymentSession",
3515
+ "summary": "POST /v1/public/finance/invoices/{invoiceId}/payment-session",
3516
+ "tags": ["finance"],
3517
+ "x-voyant-module": "finance",
3518
+ "x-voyant-surface": "storefront"
3519
+ }
3520
+ },
3521
+ "/v1/public/finance/accountant/{token}/summary": {
3522
+ "get": {
3523
+ "parameters": [
3524
+ {
3525
+ "schema": {
3526
+ "type": "string"
3527
+ },
3528
+ "required": true,
3529
+ "name": "token",
3530
+ "in": "path"
3531
+ }
3532
+ ],
3533
+ "responses": {
3534
+ "200": {
3535
+ "description": "Accountant share profitability summary (scope + departure/product rollups)",
3536
+ "content": {
3537
+ "application/json": {
3538
+ "schema": {
3539
+ "type": "object",
3540
+ "properties": {
3541
+ "data": {
3542
+ "type": "object",
3543
+ "properties": {
3544
+ "scope": {
3545
+ "type": "object",
3546
+ "properties": {
3547
+ "from": {
3548
+ "type": ["string", "null"]
3549
+ },
3550
+ "to": {
3551
+ "type": ["string", "null"]
3552
+ }
3553
+ }
3554
+ },
3555
+ "departures": {},
3556
+ "products": {}
3557
+ },
3558
+ "required": ["scope"]
3559
+ }
3560
+ },
3561
+ "required": ["data"]
3562
+ }
3563
+ }
3564
+ }
3565
+ },
3566
+ "404": {
3567
+ "description": "Share not found",
3568
+ "content": {
3569
+ "application/json": {
3570
+ "schema": {
3571
+ "type": "object",
3572
+ "properties": {
3573
+ "error": {
3574
+ "type": "string"
3575
+ }
3576
+ },
3577
+ "required": ["error"]
3578
+ }
3579
+ }
3580
+ }
3581
+ },
3582
+ "410": {
3583
+ "description": "Share expired or revoked",
3584
+ "content": {
3585
+ "application/json": {
3586
+ "schema": {
3587
+ "type": "object",
3588
+ "properties": {
3589
+ "error": {
3590
+ "type": "string"
3591
+ }
3592
+ },
3593
+ "required": ["error"]
3594
+ }
3595
+ }
3596
+ }
3597
+ }
3598
+ },
3599
+ "operationId": "getPublicFinanceAccountantByTokenSummary",
3600
+ "summary": "GET /v1/public/finance/accountant/{token}/summary",
3601
+ "tags": ["finance"],
3602
+ "x-voyant-module": "finance",
3603
+ "x-voyant-surface": "storefront"
3604
+ }
3605
+ },
3606
+ "/v1/public/finance/accountant/{token}/invoices": {
3607
+ "get": {
3608
+ "parameters": [
3609
+ {
3610
+ "schema": {
3611
+ "type": "string"
3612
+ },
3613
+ "required": true,
3614
+ "name": "token",
3615
+ "in": "path"
3616
+ }
3617
+ ],
3618
+ "responses": {
3619
+ "200": {
3620
+ "description": "Invoices (with attachments) visible to an accountant share",
3621
+ "content": {
3622
+ "application/json": {
3623
+ "schema": {
3624
+ "type": "object",
3625
+ "properties": {
3626
+ "data": {
3627
+ "type": "array",
3628
+ "items": {}
3629
+ }
3630
+ },
3631
+ "required": ["data"]
3632
+ }
3633
+ }
3634
+ }
3635
+ },
3636
+ "404": {
3637
+ "description": "Share not found",
3638
+ "content": {
3639
+ "application/json": {
3640
+ "schema": {
3641
+ "type": "object",
3642
+ "properties": {
3643
+ "error": {
3644
+ "type": "string"
3645
+ }
3646
+ },
3647
+ "required": ["error"]
3648
+ }
3649
+ }
3650
+ }
3651
+ },
3652
+ "410": {
3653
+ "description": "Share expired or revoked",
3654
+ "content": {
3655
+ "application/json": {
3656
+ "schema": {
3657
+ "type": "object",
3658
+ "properties": {
3659
+ "error": {
3660
+ "type": "string"
3661
+ }
3662
+ },
3663
+ "required": ["error"]
3664
+ }
3665
+ }
3666
+ }
3667
+ }
3668
+ },
3669
+ "operationId": "getPublicFinanceAccountantByTokenInvoices",
3670
+ "summary": "GET /v1/public/finance/accountant/{token}/invoices",
3671
+ "tags": ["finance"],
3672
+ "x-voyant-module": "finance",
3673
+ "x-voyant-surface": "storefront"
3674
+ }
3675
+ }
3676
+ },
3677
+ "webhooks": {}
3678
+ }