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