forked from yinchanted/gpi-prevalidation-connector-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
1182 lines (1182 loc) · 53.6 KB
/
swagger.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:
description: Move your app forward with the Account Pre-Validation API
version: "1.0.7-oas3"
title: Beneficiary account pre-validation
license:
name: API Restricted License
url: 'https://www.swift.com/file/56776/download?token=8w8DC4eF'
paths:
/v1/accounts/verification:
post:
tags:
- Verify Account
summary: >-
Verify that a beneficiary account could be able to receive incoming
funds.
description: >
The service verifies that an account exists at the beneficiary bank and
is capable of receiving incoming funds. This usually implies that the
account is open, properly identified by the given number and, depending
on the jurisdiction and the market practices in use where the account
is held, that the creditor name matches the name of the account holder.
The service provider does not take liability for the response and does
not provide any guarantee on the outcome of an actual transaction being
sent to this account. The information provided is meant to be as
accurate as possible at the time that the request was processed. The
requester must pass the creditor name and the service provider can use
this information as part of the verification or not.
operationId: VerifyAccount
parameters:
- name: LAUApplicationID
in: header
description: >-
ID that identifies the application generating the API and used by
the gpi Connector to retrieve the related LAU keys, required for
consumers using gpi connector only
required: true
schema:
type: string
pattern: '^(?:[a-zA-Z0-9]{1,16})$'
default: '001'
- name: LAUVersion
in: header
description: >-
version of the LAUSigned header. Mandatory. "1.0" for this first
release, required for consumers using gpi connector only
required: true
schema:
type: string
pattern: '^(?:[1][\.][0])$'
default: '1.0'
- name: LAUCallTime
in: header
description: >-
timestamp in UTC of the API call in the format
YYYY-MM-DDTHH:MM:SS.sssZ, required for consumers using gpi connector
only
required: true
schema:
type: string
pattern: >-
^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.[0-9]+)?(?:Z|[+-][01]\d:[0-5]\d)?$
default: '2018-03-23T15:56:26.728Z'
- name: LAURequestNonce
in: header
description: >-
a random value generated by the client consumer. Provided with the
request and copied by the gpi Connector on the response, required
for consumers using gpi connector only
required: true
schema:
type: string
pattern: >-
^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
default: e802ab96-bb3a-4965-9139-5214b9f0f074
- name: LAUSigned
in: header
description: >-
service specific HTTP headers composed of apiKey, rbac role and bic
to route the request, required for consumers using gpi connector
only
required: true
schema:
type: string
pattern: >-
^(?:\(ApplAPIKey=.{1,40}\),\(RBACRole=\[(Update|StandardViewer|FullViewer)\/Scope(\/[a-z]{6,6}[a-z2-9][a-np-z0-9])+\],\(x-bic=[a-z]{6,6}[a-z2-9][a-np-z0-9]\)\))?$
default: >-
(ApplAPIKey=yVGhKiV5z1ZGdaqFXoZ8AiSA9n5CrY6B),(RBACRole=[Update/Scope/cclabeb0],(x-bic=cclabeb0))
- name: LAUSignature
in: header
description: >-
contains the LAU (SHA256) signature, base64 encoded, required for
consumers using gpi connector only
required: true
x-swift-lau-request:
cryptography: hmac-sha256
sigBytes: 16
inputDataPrefix: ':'
inputDataDelimiter: CRLF
inputData:
type: object
properties:
LAUApplicationID:
type: string
LAUCallTime:
type: string
LAURequestNonce:
type: string
LAUSigned:
type: string
LAUVersion:
type: string
absPath:
type: string
requestBody:
type: string
required:
- LAUApplicationID
- LAUCallTime
- LAURequestNonce
- LAUSigned
- LAUVersion
- absPath
- requestBody
schema:
type: string
pattern: >-
^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$
default: U1khA8h9Lm1PqzB99fG6uw==
- name: x-bic
in: header
description: >-
describe the BIC for SWIFT to route the request, providers get the
value and consumers are not required to fill it in
required: false
schema:
type: string
pattern: '^[a-z]{6,6}[a-z2-9][a-np-z0-9]$'
default: cclabeb0
- name: SubjectDN
in: header
description: >-
describe the distinguish name of the consumer, providers get the
value and consumers are not required to fill it in
required: false
schema:
type: string
default: 'o=cclausb0,o=swift'
- name: Institution
in: header
description: >-
describe the BIC of the consumer, providers get the value and
consumers are not required to fill it in
required: false
schema:
type: string
default: cclausb0
responses:
'200':
description: Get Account Details Response
headers:
LAUApplicationID:
description: >-
ID that identifies the application generationg the API and used
by the gpi Connector to retrieve the related LAU keys
schema:
type: string
default: '001'
LAUVersion:
description: >-
version of the LAUSigned header. Mandatory. "1.0" for this first
release
schema:
type: string
default: '1.0'
LAUCallTime:
description: >-
timestamp in UTC of the API call in the format
YYYY-MM-DDTHH:MM:SS.sssZ
schema:
type: string
default: '2018-03-23T15:56:27.728Z'
LAURequestNonce:
description: >-
a random value generated by the client. Provided with the
request and copied by the gpi Connector on the response
schema:
type: string
default: e802ab96-bb3a-4965-9139-5214b9f0f074
LAUResponseNonce:
description: a random value generated by the gpi Connector on the response
schema:
type: string
default: 5f1fdf6c-9bbb-4707-bf9e-776e9be878b3
LAUSignature:
description: 'contains the LAU signature, base64 ecoded'
x-swift-lau-response:
cryptography: hmac-sha256
sigBytes: 16
inputDataPrefix: ':'
inputDataDelimiter: CRLF
inputData:
type: object
properties:
LAUApplicationID:
type: string
LAUCallTime:
type: string
LAURequestNonce:
type: string
LAUResponseNonce:
type: string
LAUVersion:
type: string
responseBody:
type: string
required:
- LAUApplicationID
- LAUCallTime
- LAURequestNonce
- LAUResponseNonce
- LAUVersion
- responseBody
schema:
type: string
default: U1khA8h9Lm1PqzB99fG6uw==
content:
application/json:
schema:
$ref: '#/components/schemas/AccountVerificationResponse1'
examples:
scenario1_success:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). There is
an account in the beneficiary bank’s books that is
identified by the account identifier (number) passed in the
request and the holder of which corresponds to the given
creditor name. This account is open and capable of
receiving funds.
value:
correlation_identifier: SCENARIO1-CORRID-001
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario1_failure_account_does_match:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). The
account number provided in the request is not in the
beneficiary bank’s books, and thus cannot receive incoming
funds.
value:
correlation_identifier: SCENARIO1-CORRID-002
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario1_account_match_but_blocked_for_compliance_reason:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books. However the account is blocked for compliance
reasons. The beneficiary bank cannot disclose any
information about this state (‘no tipping off’).
value:
correlation_identifier: SCENARIO1-CORRID-003
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario1_account_exists_but_type_does_not_allow_incoming_funds:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books. However this type of account does not allow
incoming funds (eg. mortgage account).
value:
correlation_identifier: SCENARIO1-CORRID-004
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario1_account_exists_but_closed:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books but classified as closed and thus cannot
receive incoming funds.
value:
correlation_identifier: SCENARIO1-CORRID-005
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario1_account_matches_but_name_does_match:
description: >-
The service provider is in 'scenario 1' (its jurisdiction
does not require to verify the creditor name and its
implementation does not verify the creditor name). The
account number provided in the request identifies an account
in the beneficiary bank’s books and is in a state to be the
target account of a payment transaction. However the name of
the account holder doesn’t match the one provided in the
request.
value:
correlation_identifier: SCENARIO1-CORRID-006
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_success_name_and_account_match:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
There is an account in the beneficiary bank’s books that is
identified by the account identifier (number) passed in the
request and the holder of which corresponds to the given
creditor name. This account is open and capable of
receiving funds.
value:
correlation_identifier: SCENARIO2-CORRID-001
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: MTCH
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_failure_account_does_not_match:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
The account number provided in the request is not in the
beneficiary bank’s books, and thus cannot receive incoming
funds.
value:
correlation_identifier: SCENARIO2-CORRID-002
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_account_match_but_blocked_for_compliance_reason:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
The account number provided in the request is in the
beneficiary bank’s books. However the account is blocked
for compliance reasons. The beneficiary bank cannot disclose
any information about this state (‘no tipping off’).
value:
correlation_identifier: SCENARIO2-CORRID-003
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: MTCH
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_account_exists_but_type_does_not_allow_incoming_funds:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
The account number provided in the request is in the
beneficiary bank’s books. However this type of account does
not allow incoming funds (eg. mortgage account).
value:
correlation_identifier: SCENARIO2-CORRID-004
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_account_exists_but_closed:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
The account number provided in the request is in the
beneficiary bank’s books but classified as closed and thus
cannot receive incoming funds.
value:
correlation_identifier: SCENARIO2-CORRID-005
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario2_account_matches_but_name_does_match:
description: >-
The service provider is in 'scenario 2' (its jurisdiction
does not require to verify the creditor name but its
pre-validation implementation verifies the creditor name).
The account number provided in the request identifies an
account in the beneficiary bank’s books and is in a state
to be the target account of a payment transaction. However
the name of the account holder doesn’t match the one
provided in the request.
value:
correlation_identifier: SCENARIO2-CORRID-006
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_success_name_and_account_match:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name and its pre-validation
implementation verifies the creditor name). There is an
account in the beneficiary bank’s books that is identified
by the account identifier (number) passed in the request
and the holder of which corresponds to the given creditor
name. This account is open and capable of receiving funds.
value:
correlation_identifier: SCENARIO3-CORRID-001
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: MTCH
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_failure_account_does_not_match:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name and its pre-validation
implementation verifies the creditor name). The account
number provided in the request is not in the beneficiary
bank’s books, and thus cannot receive incoming funds.
value:
correlation_identifier: SCENARIO3-CORRID-002
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_account_match_but_blocked_for_compliance_reason:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name and its pre-validation
implementation verifies the creditor name). The account
number provided in the request is in the beneficiary bank’s
books. However the account is blocked for compliance
reasons. The beneficiary bank cannot disclose any
information about this state (‘no tipping off’).
value:
correlation_identifier: SCENARIO3-CORRID-003
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: MTCH
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_account_exists_but_type_does_not_allow_incoming_funds:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name
and its pre-validation implementation verifies the creditor name).
The account number provided in the request is in the beneficiary bank’s books. However this type of
account does not allow incoming funds (eg. mortgage account).
value:
correlation_identifier: SCENARIO3-CORRID-004
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_account_exists_but_closed:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name and its pre-validation
implementation verifies the creditor name). The account
number provided in the request is in the beneficiary bank’s
books but classified as closed and thus cannot receive
incoming funds.
value:
correlation_identifier: SCENARIO3-CORRID-005
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario3_account_matches_but_name_does_match:
description: >-
The service provider is in 'scenario 3' (its jurisdiction
requires to verify the creditor name and its pre-validation
implementation verifies the creditor name). The account
number provided in the request identifies an account in the
beneficiary bank’s books and is in a state to be the target
account of a payment transaction. However the name of the
account holder doesn’t match the one provided in the
request.
value:
correlation_identifier: SCENARIO3-CORRID-006
response:
account_validation_status: PASS
creditor_account_match: MTCH
creditor_name_match: NOAP
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_success_name_and_account_match:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). There is
an account in the beneficiary bank’s books that is
identified by the account identifier (number) passed in the
request and the holder of which corresponds to the given
creditor name. This account is open and capable of
receiving funds.
value:
correlation_identifier: SCENARIO4-CORRID-001
response:
account_validation_status: INCO
creditor_account_match: MTCH
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_failure_account_does_not_match:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). The
account number provided in the request is not in the
beneficiary bank’s books, and thus cannot receive incoming
funds.
value:
correlation_identifier: SCENARIO4-CORRID-002
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_account_match_but_blocked_for_compliance_reason:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books. However the account is blocked for compliance
reasons. The beneficiary bank cannot disclose any
information about this state (‘no tipping off’).
value:
correlation_identifier: SCENARIO4-CORRID-003
response:
account_validation_status: INCO
creditor_account_match: MTCH
creditor_name_match: NOTCH
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_account_exists_but_type_does_not_allow_incoming_funds:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books. However this type of account does not allow
incoming funds (eg. mortgage account).
value:
correlation_identifier: SCENARIO4-CORRID-004
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_account_exists_but_closed:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). The
account number provided in the request is in the beneficiary
bank’s books but classified as closed and thus cannot
receive incoming funds.
value:
correlation_identifier: SCENARIO4-CORRID-005
response:
account_validation_status: FAIL
creditor_account_match: NMTC
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
scenario4_account_matches_but_name_does_match:
description: >-
The service provider is in 'scenario 4' (its jurisdiction
requires to verify the creditor name but its pre-validation
implementation does not verify the creditor name). The
account number provided in the request identifies an account
in the beneficiary bank’s books and is in a state to be the
target account of a payment transaction. However the name of
the account holder doesn’t match the one provided in the
request.
value:
correlation_identifier: SCENARIO4-CORRID-006
response:
account_validation_status: INCO
creditor_account_match: MTCH
creditor_name_match: NOTC
creditor_address_match: NOAP
creditor_organisation_identification_match: NOAP
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
examples:
scenario_not_allowed:
value:
status:
severity: Fatal
code: CANT
text: >-
service provider is not allowed to provide an answer for
this specific account
scenario_no_integration:
value:
status:
severity: Fatal
code: CANT
text: >-
account requested cannot be verified because unexisting
integration with the book system where this account is
maintained
scenario_bad_request:
value:
status:
severity: Fatal
code: SwAP501
text: API request is malformed
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
examples:
scenario_invalid_token:
value:
status:
severity: Fatal
code: SwAP002
text: Invalid OAuth Token
scenario_bad_request:
value:
status:
severity: Fatal
code: SwAP501
text: API request is malformed
scenario_insufficient_scope:
value:
status:
severity: Fatal
code: SwAP003
text: >-
OAuth access token has insufficient scope for the
requested service.
scenario_service_not_provisioned:
value:
status:
severity: Fatal
code: SwAP001
text: API service not provisioned
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Fatal
code: SwAP506
text: Invalid Request. Resource does not exist.
'429':
description: Too many requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Transient
code: SwAP507
text: >-
Request cannot be processed at this time. Please try later.
(header Retry-After indicates how long to wait before making
a follow-up request)
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Fatal
code: InternalError
text: |-
Server encountered an unexpected condition and cannot
fulfill the request
'502':
description: Bad Gateway
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Transient
code: SwAP508
text: Invalid response received from Service Provider
'503':
description: Service Unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Transient
code: SwAP590
text: >-
Service is temporary unavailable (header Retry-After
indicates how long to wait before making a follow-up
request)
'504':
description: Gateway Timeout
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorCodeConsumer'
example:
status:
severity: Transient
code: SwAP509
text: Service Provider time out
security:
- SwiftLAU: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountVerificationRequest'
description: Verify Account Details Request.
required: true
servers:
- url: https://apigtw-test.swiftnet.sipn.swift.com/swift-preval-pilot
description: Pilot environment
- url: https://apigtw.swiftnet.sipn.swift.com/swift-preval
description: Production environment
components:
securitySchemes:
SwiftLAU:
type: apiKey
name: LAUSignature
in: header
schemas:
PostalAddress26:
type: object
description: >-
Information that locates and identifies a specific address, as defined
by postal services.
additionalProperties: false
properties:
country:
description: Nation with its own government.
$ref: '#/components/schemas/CountryCode'
address_line:
type: array
maxItems: 7
description: >-
Information that locates and identifies a specific address, as
defined by postal services, presented in free format text.
items:
$ref: '#/components/schemas/Max70Text'
post_code:
description: >-
Identifier consisting of a group of letters and/or numbers that is
added to a postal address to assist the sorting of mail.
$ref: '#/components/schemas/Max16Text'
town_name:
description: >-
Name of a built-up area, with defined boundaries, and a local
government.
$ref: '#/components/schemas/Max35Text'
UUIDv4Identifier:
type: string
description: >-
Universally Unique IDentifier (UUID) version 4, as described in IETC RFC
4122 "Universally Unique IDentifier (UUID) URN Namespace".
pattern: '^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$'
GenericOrganisationIdentification1:
type: object
description: Information related to an identification of an organisation.
additionalProperties: false
properties:
identification:
description: Identification assigned by an institution.
$ref: '#/components/schemas/Max35Text'
scheme_name:
description: Name of the identification scheme.
$ref: '#/components/schemas/OrganisationIdentificationSchemeName1Choice'
issuer:
description: Entity that assigns the identification.
$ref: '#/components/schemas/Max35Text'
required:
- identification
example:
identification: AA1234567890
AccountValidationCheckContext1Code:
type: string
enum:
- BENR
- PAYM
- RFPP
ExternalClearingSystemIdentification1Code:
type: string
description: "Specifies the clearing system identification code, as published in an external clearing system identification code list.\r\nExternal code sets can be downloaded from www.iso20022.org."
ExternalOrganisationIdentification1Code:
type: string
description: "Specifies the external organisation identification scheme name code in the format of character string with a maximum length of 4 characters.\r\nThe list of valid codes is an external code list published separately.\r\nExternal code sets can be downloaded from www.iso20022.org."
AnyBICIdentifier:
type: string
description: >-
Code allocated to a financial or non-financial institution by the ISO
9362 Registration Authority, as described in ISO 9362 "Banking - Banking
telecommunication messages - Business identifier code (BIC)".
pattern: '^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$'
Max70Text:
type: string
description: Specifies a character string with a maximum length of 70characters.
minLength: 1
maxLength: 70
AccountValidationResponse1Code:
type: string
enum:
- NOTC
- NOAP
- NMTC
- MTCH
AccountValidationResponse2Code:
type: string
enum:
- NMTC
- MTCH
AccountValidationResponse3Code:
type: string
enum:
- PASS
- INCO
- FAIL
ValidationCheckReponse1:
type: object
additionalProperties: false
properties:
account_validation_status:
description: Overall status of the account verification.
$ref: '#/components/schemas/AccountValidationResponse3Code'
creditor_account_match:
description: >-
Whether an account was found in the banks books identified by the
provided creditor account identification (number) that can receive
incoming funds.
$ref: '#/components/schemas/AccountValidationResponse2Code'
creditor_name_match:
description: >-
Result of matching the provided creditor name with the account
holder name. The matching logic used must follow the same rules as
the ones that would be apply when the transaction will be processed.
$ref: '#/components/schemas/AccountValidationResponse1Code'
creditor_address_match:
description: >-
Result of matching the provided creditor address with the account
holder address. The matching logic used must follow the same rules
as the ones that would be apply when the transaction will be
processed.
$ref: '#/components/schemas/AccountValidationResponse1Code'
creditor_organisation_identification_match:
description: >-
Result of matching the provided creditor organization identification
with the account holder name. The matching logic used must follow
the same rules as the ones that would be apply when the transaction
will be processed.
$ref: '#/components/schemas/AccountValidationResponse1Code'
required:
- account_validation_status
- creditor_name_match
- creditor_address_match
- creditor_organisation_identification_match
ClearingSystemMemberIdentification2:
type: object
description: >-
Unique identification, as assigned by a clearing system, to
unambiguously identify a member of the clearing system.
additionalProperties: false
properties:
clearing_system_identification:
description: >-
Specification of a pre-agreed offering between clearing agents or
the channel through which the payment instruction is processed.
$ref: '#/components/schemas/ClearingSystemIdentification2Choice'
member_identification:
description: Identification of a member of a clearing system.
$ref: '#/components/schemas/Max35Text'
required:
- member_identification
FinancialInstitutionIdentification20:
type: object
description: Set of elements used to identify a financial institution.
additionalProperties: false
properties:
bicfi:
description: >-
Code allocated to a financial institution by the ISO 9362
Registration Authority as described in ISO 9362 "Banking - Banking
telecommunication messages - Business identifier code (BIC)".
$ref: '#/components/schemas/BICFIIdentifier'
clearing_system_member_identification:
description: Information used to identify a member within a clearing system.
$ref: '#/components/schemas/ClearingSystemMemberIdentification2'
BICFIIdentifier:
type: string
description: >-
Code allocated to a financial institution by the ISO 9362 Registration
Authority as described in ISO 9362 "Banking - Banking telecommunication
messages - Business identifier code (BIC)".
pattern: '^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$'
AccountVerificationRequest:
type: object
description: Beneficiary account verification request.
additionalProperties: false
properties:
correlation_identifier:
description: >-
Identifier of the request, assigned by the sender of the request. It
will allow the requestor to correlate the request and the response.
$ref: '#/components/schemas/Max50Text'
context:
description: Context in which this transaction is performed.
$ref: '#/components/schemas/AccountValidationCheckContext1Code'
uetr:
description: UETR of the transaction that is going to be sent to this account.
$ref: '#/components/schemas/UUIDv4Identifier'
creditor_account:
description: Identifies the account targeted by the transaction.
$ref: '#/components/schemas/Max34Text'
creditor_name:
description: Name by which the creditor is known.
$ref: '#/components/schemas/Max140Text'
creditor_address:
description: >-
Information that locates and identifies the address of the creditor,
as defined by postal services.
$ref: '#/components/schemas/PostalAddress26'
creditor_organisation_identification:
description: Unique and unambiguous way to identify a creditor.
$ref: '#/components/schemas/OrganisationIdentification8'
creditor_agent:
description: Financial institution servicing an account for the creditor.
$ref: '#/components/schemas/FinancialInstitutionIdentification20'
creditor_agent_branch_identification:
description: Identifies a specific branch of the creditor.
$ref: '#/components/schemas/Max35Text'
required:
- context
- creditor_account
- creditor_name