-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yml
707 lines (707 loc) · 18.8 KB
/
swagger.yml
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
swagger: "2.0"
info:
title: Payneteasy Android Transfer DAPI
version: "0.2"
paths:
/auth/{bank_id}/request-access-token:
get:
summary: Generate access token for transfer operation
parameters:
- name: bank_id
in: path
type: string
description: Bank identifier
required: true
produces:
- application/json
responses:
'200':
description: Randomly generated access token
schema:
$ref: '#/definitions/AccessTokenResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/config/get-rate:
post:
summary: Get transfer rates and limits configuration
consumes:
- application/json
produces:
- application/json
parameters:
- name: sessionData
in: body
required: true
description: Session info
schema:
$ref: '#/definitions/RatesRequest'
responses:
'200':
description: Rates and limits data
schema:
$ref: '#/definitions/RatesResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/config/get-commission:
post:
summary: Get transaction commission
consumes:
- application/json
produces:
- application/json
parameters:
- name: sessionData
description: Session info
in: body
required: true
schema:
$ref: '#/definitions/CommissionRequest'
responses:
'200':
description: Commission
schema:
$ref: '#/definitions/CommissionResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/transfer/initiate-transfer:
post:
consumes:
- application/json
produces:
- application/json
summary: Initiate transfer request
parameters:
- name: initiateTransferData
in: body
description: Device info, location data, session info, amount
required: true
schema:
$ref: '#/definitions/InitiateTransferRequest'
responses:
'200':
description: Enpoint config, rates, session tokens to perform transfer request
schema:
$ref: '#/definitions/InitiateTransferResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/cardrefs/{invoiceId}/get-client-ids:
post:
consumes:
- application/json
produces:
- application/json
summary: Fetch source and destination cards ids
parameters:
- name: invoiceId
in: path
type: string
description: Transfer transaction identifier
required: true
- name: performTransferRequestData
in: body
description: transfer data
required: true
schema:
$ref: '#/definitions/CardsIdsRequest'
responses:
'200':
description: Fetch Cards Ids response
schema:
$ref: '#/definitions/CardsIdsResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/transfer/{endpointId}/{invoiceId}:
post:
consumes:
- application/json
produces:
- application/json
summary: Perform transfer request
parameters:
- name: endpointId
in: path
type: string
description: Entry point identifier for transfer transaction
required: true
- name: invoiceId
in: path
type: string
description: Transfer transaction identifier
required: true
- name: performTransferRequestData
in: body
description: transfer data
required: true
schema:
$ref: '#/definitions/PerformTransferRequest'
responses:
'200':
description: Perform transfer response
schema:
$ref: '#/definitions/PerformTransferResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/transfer/{endpointId}/{invoiceId}/status:
post:
consumes:
- application/json
produces:
- application/json
summary: Get funds transfer status
parameters:
- name: endpointId
in: path
type: string
description: Entry point identifier for transfer transaction
required: true
- name: invoiceId
in: path
type: string
description: Transfer transaction identifier
required: true
- name: transferStatusRequest
in: body
description: Transfer data to check
required: true
schema:
$ref: '#/definitions/TransferStatusRequest'
responses:
'200':
description: Transfer status response
schema:
$ref: '#/definitions/TransferStatusResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/support/send-message:
post:
consumes:
- application/json
produces:
- application/json
summary: send feedback to support
parameters:
- name: sendFeedbackRequest
in: body
description: Transfer data to check
required: true
schema:
$ref: '#/definitions/SendFeedbackRequest'
responses:
'200':
description: Send feedback response
schema:
$ref: '#/definitions/SendFeedbackResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
/contacts/status:
post:
consumes:
- application/json
produces:
- application/json
summary: send feedback to support
parameters:
- name: contactsStatusRequest
in: body
description: Account data to check
required: true
schema:
$ref: '#/definitions/ContactsStatusRequest'
responses:
'200':
description: Contacts sync status response
schema:
$ref: '#/definitions/ContactsStatusResponse'
'400':
description: Request data is invalid
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Server error
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
Session:
type: object
properties:
accessToken:
type: string
description: The consumer’s access token key
nonce:
type: string
description: Random string, uniquely generated by the proxy
signature:
type: string
description: Checksum generated by hmac-sha1 of accessToken + device.serialNumber + endpointId + nonce + invoiceId + amountCentis + currency
token:
type: string
description: The session token of transfer transaction
Consumer:
type: object
properties:
device:
type: object
required:
- serialNumber
properties:
imei:
type: string
description: The consumer’s device international mobile equipment identity
serialNumber:
type: string
description: The consumer's device serial number
ipAddresses:
type: array
description: Consumer's IP addresses
items:
type: string
minLength: 7
maxLength: 15
email:
type: string
description: The consumer’s email address
Transaction:
type: object
properties:
type:
type: string
description: Transaction type
enum:
- internal
- international
fromBin:
type: integer
format: int32
description: The Source card BIN
toBin:
type: integer
format: int32
description: The Destination card BIN
endpointId:
type: string
description: Entry point identifier for transfer transaction
invoiceId:
type: string
description: Transfer transaction identifier
amountCentis:
type: integer
format: int64
description: Transaction amount, 1.00 EUR = 100 centis
commissionCentis:
type: integer
format: int64
description: Amount of commission held in centis
currency:
type: string
pattern: ^[A-Z]{3}$
description: Transaction currency, upper case letters (ISO 4217 alpha code)
orderCreatedDate:
type: string
description: Order creation date in payment processing system
transactionCreatedDate:
type: string
description: Transaction creation date in payment processing system
SourceOfFunds:
type: object
required:
- card
description: Only one of these subtypes (card, reference) should be used
properties:
card:
$ref: '#/definitions/SourceOfFundsCard'
reference:
$ref: '#/definitions/SourceOfFundsReference'
SourceOfFundsCard:
type: object
required:
- number
- expiry
- holder
- securityCode
properties:
number:
type: string
description: Source card number (PAN)
expiry:
$ref: '#/definitions/SourceOfFundsCardExpiry'
holder:
$ref: '#/definitions/SourceOfFundsCardHolder'
securityCode:
type: string
description: Source card security code (CVV)
SourceOfFundsCardExpiry:
type: object
required:
- month
- year
properties:
month:
type: integer
format: int32
description: Source Card expiration month
year:
type: integer
format: int32
description: Source Card expiration year
SourceOfFundsCardHolder:
type: object
required:
- firstName
- lastName
properties:
firstName:
type: string
description: Cardholder’s first name
lastName:
type: string
description: Cardholder’s last name
SourceOfFundsReference:
type: object
required:
- clientCardId
- securityCode
properties:
clientCardId:
type: string
description: Source card reference identifier (on client side)
securityCode:
type: string
description: Source card security code (CVV)
DestinationOfFunds:
type: object
required:
- card
description: Only one of these subtypes (card, reference) should be used
properties:
card:
$ref: '#/definitions/DestinationOfFundsCard'
reference:
$ref: '#/definitions/DestinationOfFundsReference'
DestinationOfFundsCard:
type: object
required:
- number
properties:
number:
type: string
description: Destination card number (PAN)
DestinationOfFundsReference:
type: object
properties:
clientCardId:
type: string
description: The destination card reference identifier (on client side)
Error:
type: object
properties:
cause:
type: string
description: 'The cause of the error'
enum:
- FILTERED
- DECLINED
- INVALID_CONFIGURATION
- INVALID_REQUEST
- INTERNAL_ERROR
- PROCESSING_FAILED
- SERVER_FAILED
- SERVER_UNAVAILABLE
- ORDER_NOT_FOUND
code:
type: string
description: The unique error code
message:
type: string
description: the description of the error
AccessTokenResponse:
type: object
properties:
session:
$ref: '#/definitions/Session'
RatesRequest:
type: object
required:
- consumer
- session
properties:
consumer:
$ref: '#/definitions/Consumer'
session:
$ref: '#/definitions/Session'
RatesResponse:
type: object
properties:
rateInterest:
type: number
format: double
description: Transfer rate interest (percent)
rateMin:
type: number
format: double
description: Minimum commission amount
rateMax:
type: number
format: double
description: Maximum commission amount
limitMin:
type: number
format: double
description: Minimum transfer amount
limitMax:
type: number
format: double
description: Maximum transfer amount
error:
$ref: '#/definitions/Error'
CommissionRequest:
type: object
required:
- session
- consumer
properties:
session:
$ref: '#/definitions/Session'
consumer:
$ref: '#/definitions/Consumer'
transaction:
$ref: '#/definitions/Transaction'
CommissionResponse:
type: object
properties:
commissionCentis:
type: integer
format: int64
description: Commission amount, 1.00 EUR = 100 centis
currency:
type: string
pattern: ^[A-Z]{3}$
description: Transaction currency, upper case letters (ISO 4217 alpha code)
error:
$ref: '#/definitions/Error'
InitiateTransferRequest:
type: object
required:
- consumer
- transaction
properties:
consumer:
$ref: '#/definitions/Consumer'
location:
type: object
properties:
lat:
type: number
format: double
description: The latitude specified in the range of -90.0 through +90.0, both inclusive
lng:
type: number
format: double
description: The longitude specified in the range -180.0 through +180.0, both inclusive
session:
$ref: '#/definitions/Session'
transaction:
$ref: '#/definitions/Transaction'
InitiateTransferResponse:
type: object
properties:
endpointId:
type: string
description: Entry point identifier for transfer transaction
invoiceId:
type: string
description: Transfer transaction identifier
rates:
type: object
properties:
min:
type: string
description: Possible minimum commission amount
max:
type: string
description: Possible maximum commission amount
session:
$ref: '#/definitions/Session'
error:
$ref: '#/definitions/Error'
PerformTransferRequest:
type: object
required:
- consumer
- destinationOfFunds
- sourceOfFunds
- session
- transaction
properties:
consumer:
$ref: '#/definitions/Consumer'
sourceOfFunds:
$ref: '#/definitions/SourceOfFunds'
destinationOfFunds:
$ref: '#/definitions/DestinationOfFunds'
transaction:
$ref: '#/definitions/Transaction'
session:
$ref: '#/definitions/Session'
PerformTransferResponse:
type: object
properties:
invoiceId:
type: string
session:
$ref: '#/definitions/Session'
error:
$ref: '#/definitions/Error'
TransferStatusRequest:
type: object
required:
- session
properties:
session:
$ref: '#/definitions/Session'
TransferStatusResponse:
type: object
properties:
bankOrderId:
type: string
description: Required if state is APPROVED or DECLINED
orderId:
type: string
description: Order identifier in payment processing system
invoiceId:
type: string
description: Transfer transaction identifier
redirectUrl:
type: string
description: Required if state is REDIRECT_REQUEST
session:
$ref: '#/definitions/Session'
state:
type: string
description: 'The state of the transfer'
enum:
- PROCESSING
- REDIRECT_REQUEST
- APPROVED
- DECLINED
transaction:
$ref: '#/definitions/Transaction'
error:
$ref: '#/definitions/Error'
errorCode:
type: integer
format: int32
description: Decline reason code, may present if state is DECLINED
errorMessage:
type: string
description: Decline reason message, may present if state is DECLINED
secure3DAuthStatus:
type: string
description: '3D authentication status'
enum:
- AUTHENTICATED
- NOT_AUTHENTICATED
- UNSUPPORTED
- DECLINED
randomSumAuthStatus:
type: string
description: 'Random sum authentication status'
enum:
- AUTHENTICATED
- NOT_AUTHENTICATED
CardsIdsRequest:
type: object
required:
- consumer
- session
properties:
consumer:
$ref: '#/definitions/Consumer'
session:
$ref: '#/definitions/Session'
CardsIdsResponse:
type: object
properties:
sourceCardRefId:
type: string
description: The source card reference identifier (on client side)
destinationCardRefId:
type: string
description: The destination card reference identifier (on client side)
error:
$ref: '#/definitions/Error'
SendFeedbackRequest:
type: object
properties:
message:
type: string
email:
type: string
orderId:
type: string
session:
$ref: '#/definitions/Session'
SendFeedbackResponse:
type: object
properties:
error:
$ref: '#/definitions/Error'
ContactsStatusRequest:
type: object
properties:
account:
type: string
ContactsStatusResponse:
type: object
properties:
status:
type: string
enum:
- SYNCED
- SYNC_NEEDED
- ACCOUNT_NOT_FOUND
error:
$ref: '#/definitions/Error'
ErrorResponse:
type: object
properties:
error:
$ref: '#/definitions/Error'
invoiceId:
type: string
description: Transfer transaction identifier