forked from swissfintechinnovations/ca-payment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaymentAPI.yaml
2114 lines (2011 loc) · 77.3 KB
/
paymentAPI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: 4.1.1
title: Common Payment API
description: >
This specification defines a simple payment API for payment types used in Switzerland.
The API is supposed to be used by customers who want to initiate a payment at their bank.
Note that, consents and SCA will be handled in a dedicated specification file.
This specification uses schema definitions from the Common Data Model v1.2.1.
termsOfService: Tbd
contact:
email: [email protected]
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: payment.common-api.ch/api/v4
externalDocs:
description: Find out more about SFTI API specifications.
url: https://www.common-api.ch
tags:
- name: standing orders
description: >
Third party payment service considering standing order operations (JSON).
- name: payments
description: >
Third party payment service considering bulk payments operations (JSON). PUT operation can be used for both payment submission
and payment initiation (PSS/PIS), depending on security implementation.
- name: single payments
description: >
Third party payment service considering single payments operations (JSON). PUT operation can be used for both payment submission
and payment initiation (PSS/PIS), depending on security implementation.
- name: iso20022
description: >
Third party payment service considering pain.001 and pain.002 operations (XML). PUT operation can be used for both payment submission
and payment initiation (PSS/PIS), depending on security implementation.
security:
- OAuth2:
- read
- write
paths:
/standing-orders:
get:
tags:
- standing orders
summary: Get the list of all standing orders.
description: Return the list of all standing orders for the authenticated context.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: List of standing orders.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
type: object
properties:
paymentList:
type: array
items:
$ref: '#/components/schemas/StandingorderSubmissionRequest'
_links:
$ref: '#/components/schemas/LinksPagination'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
post:
tags:
- standing orders
summary: Create a new Standing Order
description: It is used to create a permanent order for the transfer of funds.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
requestBody:
description: Details of standing orders submission to be added.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StandingorderSubmissionRequest'
responses:
'201':
description: Created.
headers:
Location:
$ref: '#/components/headers/Location'
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/standing-orders/{submissionId}:
get:
tags:
- standing orders
summary: Get a specific standing order submission
description: Retrieve a specific standing order submission.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: The original standing order submission.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/StandingorderSubmissionRequest'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
delete:
tags:
- standing orders
summary: Delete a specific standing order submission
description: Delete a specific standing order submission.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Standing order has been deleted.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'201':
description: Standing order is marked for deletion.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/standing-orders/{submissionId}/status:
get:
tags:
- standing orders
summary: Get status information for the specific standing order submission
description: Retrieve a specific standing order submission's status.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Status information for the specific standing order submission.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/StandingorderSubmissionStatus'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/payments:
get:
tags:
- payments
summary: Get the list of all payments.
description: Return the list of all payments for the authenticated context.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: List of payments.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
type: object
properties:
paymentList:
type: array
items:
$ref: '#/components/schemas/PaymentSubmissionRequest'
_links::
$ref: '#/components/schemas/LinksPagination'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
post:
tags:
- payments
summary: Initiate new payments submission
description: Create new payments submission.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
requestBody:
description: Details of payments submission to be added.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentSubmissionRequest'
responses:
'201':
description: Created.
headers:
Location:
$ref: '#/components/headers/Location'
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/payments/{submissionId}:
delete:
tags:
- payments
summary: Delete a specific payment submission before executed
description: Delete a specific payment submission before executed.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Payment submission has been deleted.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'201':
description: Payment submission is marked for deletion.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/payments/{submissionId}/status:
get:
tags:
- payments
summary: Get status information for the specific payment submission
description: Retrieve a specific payment submission's status.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Status information for the specific payment submission.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentSubmissionStatus'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/single-payments:
get:
tags:
- single payments
summary: Get the list of all payments (all payment types)
description: Return the list of all initiated payments of all types for the authenticated context.
parameters:
- in: query
name: entryReferenceFrom
schema:
type: string
description: Get all objects after the one with the given ID.
- in: query
name: limit
schema:
type: integer
description: Number of items to be returned.
- in: query
name: dateFrom
schema:
$ref: '#/components/schemas/Date'
description: Start date of the payments query.
- in: query
name: dateTo
schema:
$ref: '#/components/schemas/Date'
description: End date of the transaction query.
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Paginated list of all payments.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
type: object
properties:
paymentList:
type: array
items:
$ref: '#/components/schemas/SinglepaymentsSubmissionRequest'
_links:
$ref: '#/components/schemas/LinksPagination'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
post:
tags:
- single payments
summary: Initiate new single payments submission
description: Create new single payments submission.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
requestBody:
description: Details of single payments submission to be added.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SinglepaymentsSubmissionRequest'
responses:
'201':
description: Created.
headers:
Location:
$ref: '#/components/headers/Location'
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/single-payments/{submissionId}:
get:
tags:
- single payments
summary: Get a specific payment
description: Receive payment with corresponding submissionId.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Details on the chosen payment.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/SinglepaymentsSubmissionRequest'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
delete:
tags:
- single payments
summary: Delete a single payment
description: Delete single payment with corresponding submissionId.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Payment has been deleted.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'201':
description: Payment is marked for deletion.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/single-payments/{submissionId}/status:
get:
tags:
- single payments
summary: Get status information for the specific single payment
description: Retrieve a specific single payment submission's status.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Status information for the specific payment submission.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentSubmissionStatus'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/iso20022/payments:
post:
tags:
- iso20022
summary: Submit ISO20022 XML payment instruction (pain.001)
description: Submit an XML pain.001 payment instruction according to the ISO20022 specification.
parameters:
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
requestBody:
description: The XML pain.001.
required: true
content:
application/xml:
schema:
type: string
responses:
'201':
description: Created.
headers:
Location:
$ref: '#/components/headers/Location'
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/iso20022/payments/{submissionId}:
get:
tags:
- iso20022
summary: Submitted ISO20022 XML pain.001 message
description: Retrieves the submitted ISO20022 XML pain.001 message.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Returns the requested ISO20022 XML pain.001 message.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/xml:
schema:
type: string
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
delete:
tags:
- iso20022
summary: Delete ISO20022 XML PAIN.001 message
description: Deletes the submitted ISO20022 XML PAIN.001 message before execution.
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: ISO20022 XML pain.001 message submission has been deleted.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'201':
description: ISO20022 XML pain.001 message submission is marked for deletion.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
/iso20022/payments/{submissionId}/status:
get:
tags:
- iso20022
summary: Get the ISO20022 XML status report (PAIN.002) for a specific payment instruction
description: The status report for the requested XML ISO20022 payment instruction (PAIN.002).
parameters:
- $ref: '#/components/parameters/path_submissionId'
- $ref: '#/components/parameters/authorization_in_header'
- $ref: '#/components/parameters/clientid_in_header'
- $ref: '#/components/parameters/correlation_in_header'
- $ref: '#/components/parameters/agent_in_header'
- $ref: '#/components/parameters/optional_targetid_in_header'
- $ref: '#/components/parameters/optional_psu_ip_in_header'
- $ref: '#/components/parameters/optional_psu_user_agent_in_header'
responses:
'200':
description: Returns the requested ISO20022 XML pain.002 message.
headers:
X-Correlation-ID:
$ref: '#/components/headers/X-Correlation-ID'
content:
application/xml:
schema:
type: string
'400':
$ref: '#/components/responses/standard400'
'401':
$ref: '#/components/responses/standard401'
'403':
$ref: '#/components/responses/standard403'
'404':
$ref: '#/components/responses/standard404'
'405':
$ref: '#/components/responses/standard405'
'500':
$ref: '#/components/responses/standard500'
'501':
$ref: '#/components/responses/standard501'
'503':
$ref: '#/components/responses/standard503'
# -------------------------
# -------- Models ---------
# -------------------------
components:
schemas:
Amount:
type: string
pattern: '^[0-9]{1,12}([.][0-9]{1,5})?$'
maxLength: 18
description: An amount. Corresponds to the attribute _Amt_ in SPS/ISO-20022.
example: '10.25'
CommonClearingSystemMemberIdentification:
title: Common Clearing System Member Identification
type: object
description: Specifies the Information used to identify a member within a clearing system.
required:
- code
- memberId
properties:
code:
type: string
maxLength: 5
description: >
Identification code of a clearing system. Only "CHBCC" is permitted in Switzerland. Corresponds to the attribute _ClrSysId ⇾ Cd_
in SPS/ISO-20022.
example: CHBCC
memberId:
type: string
maxLength: 35
description: >
The identification of a clearing system member. Clearing ID (Bank Code, "National Identifier") of the financial institution.
Corresponds to the attribute _ClrSysId ⇾ MmbId_ in SPS/ISO-20022.
example: '00230'
CommonErrorResponse:
title: Common Error Response
type: object
description: The common error response object.
properties:
type:
$ref: '#/components/schemas/CommonErrorType'
title:
type: string
description: The title of the common error response.
example: This is the general problem description
detail:
type: string
description: The details about the common error response.
example: Detailed problem description with respect to the current request
instance:
type: string
description: The path to the corresponding resource.
example: path/to/corresponding/resource
CommonErrorType:
title: Common Error Type
description: Error Types for CommonErrorResponse.
type: string
enum:
- /problems/INVALID_PAYLOAD
- /problems/MALFORMED_PAYLOAD
- /problems/INVALID_TOKEN
- /problems/EXPIRED_TOKEN
- /problems/INSUFFICIENT_PRIVILEGES
- /problems/NO_ACCESS_TO_RESOURCE
- /problems/RESOURCE_DOES_NOT_EXIST
- /problems/RESOURCE_NOT_READY
- /problems/RESOURCE_TOO_LARGE
- /problems/WRONG_METHOD
- /problems/OPERATION_NOT_ALLOWED
- /problems/TECHNICAL_ERROR
- /problems/NOT_IMPLEMENTED
- /problems/SERVICE_UNAVAILABLE
example: /problems/TECHNICAL_ERROR
Currency:
type: string
maxLength: 3
minLength: 3
description: The ISO currency three-letter code. Corresponds to the attribute _Ccy_ in SPS/ISO-20022.
example: CHF
Date:
type: string
description: The date.
format: date
example: 2018-04-13
DayOfExecution:
title: Day of Execution
description: |
Day of execution as integer.
This integer consists of up two characters. Leading zeroes are not allowed.
type: string
maxLength: 2
enum:
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '10'
- '11'
- '12'
- '13'
- '14'
- '15'
- '16'
- '17'
- '18'
- '19'
- '20'
- '21'
- '22'
- '23'
- '24'
- '25'
- '26'
- '27'
- '28'
- '29'
- '30'
- '31'
example: '1'
EndDate:
title: End Date
description: The last applicable day of execution. If not given, it is an infinite standing order.
type: string
format: date
example: 2018-04-13
EndToEndId:
type: string
description: The endToEndId of the instruction item. Corresponds to the attribute _EndToEndId_ in SPS/ISO-20022.
maxLength: 35
example: ENDTOENDID-001
ExecutionRule:
title: Execution Rule