-
Notifications
You must be signed in to change notification settings - Fork 1
/
Transfers-2021-03-22.v1.yaml
695 lines (693 loc) · 26.1 KB
/
Transfers-2021-03-22.v1.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
openapi: 3.0.3
info:
version: 2021 03 22
title: Transfers
description: Transfers represent the movement of funds from one Global Merchant Account to another.
contact:
name: API Integrations
url: 'https://developer.globalpay.com/?gp-api=true'
email: [email protected]
servers:
- url: 'https://apis.sandbox.globalpay.com/ucp'
description: Sandbox Environment
- url: 'https://apis.globalpay.com/ucp'
description: Production Environment
paths:
'/merchants/{id}/transfers':
post:
tags:
- Transfer Funds
summary: Move funds from one merchant's fund management account to another merchant's fund management account.
description: Move funds from one merchant's fund management account to another merchant's fund management account.
operationId: post-transfers-pushfund
parameters:
- name: id
in: path
required: true
schema:
$ref: '#/components/schemas/merchant_id_TRANSFERS.merchant_id'
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/X-GP-Idempotency'
- $ref: '#/components/parameters/X-GP-Version'
- $ref: '#/components/parameters/Content-type'
requestBody:
description: ''
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/create_request'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/create_response_updated'
headers:
Content-Type:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
Content-Encoding:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
X-GP-Idempotency:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
X-GP-Version:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
'400':
$ref: '#/components/responses/RequestInvalid_400'
'401':
$ref: '#/components/responses/AuthenticationInvalid_401'
'403':
$ref: '#/components/responses/NotAuthorized_403'
'404':
description: Resource Not Found
'500':
$ref: '#/components/responses/ServerError_500'
'501':
$ref: '#/components/responses/UnknownServerError_501'
'502':
$ref: '#/components/responses/UnknownPlatformError_502'
'504':
$ref: '#/components/responses/ServerTimeout_504'
servers:
- url: 'https://apis.sandbox.globalpay.com/ucp'
description: Sandbox Environment
- url: 'https://apis.globalpay.com/ucp'
description: Production Environment
'/transfers/{id}/reversal':
post:
tags:
- Reverse A Transfer
summary: Reverse a Transfer
description: This will reverse a Transfer. The funds from the transfer will be returned to the initiating merchant.
operationId: reverseExistingSplit
parameters:
- name: id
in: path
required: true
schema:
$ref: '#/components/schemas/merchant_id_TRANSFERS.merchant_id'
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/X-GP-Idempotency'
- $ref: '#/components/parameters/X-GP-Version'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/Content-type'
requestBody:
description: ''
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/split_amount_request'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/split_amount_response'
headers:
Content-Type:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
Content-Encoding:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
X-GP-Idempotency:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
X-GP-Version:
schema:
$ref: ../Data-Dict/Shared/Parameters.yaml#/components/parameters/Content-type
'400':
$ref: '#/components/responses/RequestInvalid_400'
'401':
$ref: '#/components/responses/AuthenticationInvalid_401'
'403':
$ref: '#/components/responses/NotAuthorized_403'
'404':
description: Resource Not Found
'500':
$ref: '#/components/responses/ServerError_500'
'501':
$ref: '#/components/responses/UnknownServerError_501'
'502':
$ref: '#/components/responses/UnknownPlatformError_502'
'504':
$ref: '#/components/responses/ServerTimeout_504'
servers:
- url: 'https://apis.sandbox.globalpay.com/ucp'
description: Sandbox Environment
- url: 'https://apis.globalpay.com/ucp'
description: Production Environment
tags:
- name: Transfer Funds
description: Move funds from one merchant's account to another.
- name: Reverse a Split
description: Reverse a split transaction.
components:
parameters:
Authorization:
name: Authorization
in: header
description: Bearer access token value used to authorize and access the API. Must always begin with the string "Bearer".
required: true
schema:
type: string
default: Bearer 0RLg8ukYnucjHgHcKRDxvlq6uUEx
example: Bearer 0RLg8ukYnucjHgHcKRDxvlq6uUEx
X-GP-Idempotency:
name: X-GP-Idempotency
in: header
description: Integrator generated value submitted in the request header that is checked to ensure the same value has not been seen in the last 24 hours. It is used to ensure idempotency is maintained with this action.
required: false
schema:
type: string
minLength: 1
maxLength: 50
X-GP-Version:
name: X-GP-Version
in: header
description: The version of the API to execute the request.
required: true
schema:
type: string
minLength: 1
maxLength: 50
default: '2021-03-22'
example: '2021-03-22'
Content-type:
name: Content-type
in: header
description: Format of the message body.
required: true
schema:
type: string
default: application/json
example: application/json
Accept:
name: Accept
in: header
description: Indicates the expected format of the message response.
required: false
schema:
type: string
default: application/json
responses:
RequestInvalid_400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/objRequestInvalid_400'
AuthenticationInvalid_401:
description: Not Authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationInvalid_401'
NotAuthorized_403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/NotAuthorized_403'
ServerError_500:
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError_500'
UnknownServerError_501:
description: Not implemented
content:
application/json:
schema:
$ref: '#/components/schemas/UnknownServerError_501'
UnknownPlatformError_502:
description: Bad Gateway
content:
application/json:
schema:
$ref: '#/components/schemas/UnknownPlatformError_502'
ServerTimeout_504:
description: Timeout
content:
application/json:
schema:
$ref: '#/components/schemas/ServerTimeout_504'
schemas:
merchant_id_TRANSFERS.merchant_id:
type: string
description: A unique identifier for the merchant set by Global Payments.
example: MER_880c34767b184d5e82b10e767201e648
create_request:
type: object
title: create_request
properties:
account_id:
$ref: '#/components/schemas/account_id_TRANSFERS.account_id'
account_name:
$ref: '#/components/schemas/account_name_TRANSFERS.account_name'
recipient_account_id:
$ref: '#/components/schemas/recipient_account_id_TRANSFERS.recipient_account_id'
recipient_account_name:
$ref: '#/components/schemas/recipient_account_name_TRANSFERS.recipient_account_name'
reference:
$ref: '#/components/schemas/reference_TRANSFERS.reference'
amount:
$ref: '#/components/schemas/amount_TRANSFERS.amount'
description:
$ref: '#/components/schemas/description_TRANSFERS.description'
usable_balance_mode:
$ref: '#/components/schemas/usable_balance_mode_TRANSFERS.usable_balance_mode'
required:
- recipient_account_id
- reference
- amount
- description
- usable_balance_mode
account_id_TRANSFERS.account_id:
type: string
description: The account identifier for the account that sent a transfer.
maxLength: 50
example: FMA_bde109d70fb24d78b25fd364317dd9dc
account_name_TRANSFERS.account_name:
type: string
description: The account name for the account that sent a transfer.
maxLength: 50
example: '718556837_989567'
recipient_account_id_TRANSFERS.recipient_account_id:
type: string
description: The account identifier for the account that recieved a transfer.
maxLength: 50
example: FMA_b29c209e25db47ea8d9ef9f24ef29254
recipient_account_name_TRANSFERS.recipient_account_name:
type: string
description: The account identifier for the account that recieved a transfer.
example: '718556837_989567'
reference_TRANSFERS.reference:
type: string
description: A label on the GP API platform that further identifies the instance fo the resource. This is intended to be unique but GP API does not polic its uniqueness.
maxLength: 50
example: '1234'
amount_TRANSFERS.amount:
type: string
description: The amount that is being transferred. Represented in the lowest denomination of the currency (i.e. $100.00 = 10000
maxLength: 50
example: '10000'
description_TRANSFERS.description:
type: string
description: The description of the transfer
maxLength: 50
example: Transfer 1
usable_balance_mode_TRANSFERS.usable_balance_mode:
type: string
enum:
- AVAILABLE_BALANCE
- AVAILABLE_AND_PENDING_BALANCE
description: |
The balance from which the transfer should pull. The transfer will always use avaialble funds first, and may, as directed by this field, pull from the pending balance.
* `AVAILABLE_BALANCE` - indicates that a transfer will pull only from available funds in the funds management account.
* `AVAILABLE_AND_PENDING_BALANCE` - indicates the transfer will pull first from the available balance, and then from the pending balance of the funds management account, if needed.
maxLength: 50
default: AVAILABLE_BALANCE
example: AVAILABLE_BALANCE
create_response_updated:
type: object
title: create_response_updated
properties:
id:
$ref: '#/components/schemas/id_TRANSFERS.id'
time_created:
$ref: '#/components/schemas/time_created_TRANSFERS.time_created'
time_last_updated:
$ref: '#/components/schemas/time_last_updated_TRANSFERS.time_last_updated'
type:
$ref: '#/components/schemas/type_TRANSFERS.type'
status:
$ref: '#/components/schemas/status_TRANSFERS.status'
amount:
$ref: '#/components/schemas/amount_TRANSFERS.amount'
usable_balance_mode:
$ref: '#/components/schemas/usable_balance_mode_TRANSFERS.usable_balance_mode'
merchant_id:
$ref: '#/components/schemas/merchant_id_TRANSFERS.merchant_id'
merchant_name:
$ref: '#/components/schemas/merchant_name_TRANSFERS.merchant_name'
account_id:
$ref: '#/components/schemas/account_id_TRANSFERS.account_id'
account_name:
$ref: '#/components/schemas/account_name_TRANSFERS.account_name'
recipient_merchant_id:
$ref: '#/components/schemas/recipient_merchant_id_TRANSFERS.recipient_merchant_id'
recipient_merchant_name:
$ref: '#/components/schemas/recipient_merchant_name_TRANSFERS.recipient_merchant_name'
recipient_account_id:
$ref: '#/components/schemas/recipient_account_id_TRANSFERS.recipient_account_id'
reecipient_account_name:
$ref: '#/components/schemas/recipient_account_name_TRANSFERS.recipient_account_name'
reference:
$ref: '#/components/schemas/reference_TRANSFERS.reference'
description:
$ref: '#/components/schemas/description_TRANSFERS.description'
provider:
type: object
properties:
result:
$ref: '#/components/schemas/result_TRANSFERS.provider.result'
message:
$ref: '#/components/schemas/message_TRANSFERS.provider.message'
action:
type: object
properties:
id:
$ref: '#/components/schemas/id_TRANSFERS.action.id'
type:
$ref: '#/components/schemas/type_TRANSFERS.action.type'
time_created:
$ref: '#/components/schemas/time_created_TRANSFERS.action.time_created'
result_code:
$ref: '#/components/schemas/result_code_TRANSFERS.action.result_code'
app_id:
$ref: '#/components/schemas/app_id_TRANSFERS.action.app_id'
app_name:
$ref: '#/components/schemas/app_name_TRANSFERS.action.app_name'
id_TRANSFERS.id:
type: string
description: A unique identifier that is used to identify and reference an instance of this resource. It is generated by Global Payments to identify the transaction and must be used to action that transaction in future.
example: TRF_U3bZFd2jL98L0XacplaUvPSSDhFI2J
time_created_TRANSFERS.time_created:
type: string
description: GP API specific created time indicating when the instance of the resource was created.
example: '2023-03-10T13:14:48.386Z'
time_last_updated_TRANSFERS.time_last_updated:
type: string
description: GP API specific last updated time when the instance of the resource was last updated.
example: '2023-03-10T13:14:48.386Z'
type_TRANSFERS.type:
type: string
enum:
- TRANSFER
- REVERSAL
description: GP API specific label that indicates the type resource an instance is.
example: TRANSFER
status_TRANSFERS.status:
type: string
enum:
- SUCCESS
- FAILED
description: |
The overall status of the resource.
* `SUCCESS` - indicates the instant success of of a standalone transfer.
* `FAILED` - indicates the failure of an instant standalone transfer.
example: SUCCESS
merchant_name_TRANSFERS.merchant_name:
type: string
description: The merchant name of the account that sent the transfer.
example: Curtis_Douglas49
recipient_merchant_id_TRANSFERS.recipient_merchant_id:
type: string
description: The merchant identifier of the account that received the transfer.
example: MER_880c34767b184d5e82b10e767201e648
recipient_merchant_name_TRANSFERS.recipient_merchant_name:
type: string
description: The merchant name of the account that received the transfer.
example: Curtis_Douglas49
result_TRANSFERS.provider.result:
type: string
description: The gateway provider response code for the requested transfer
example: '0'
message_TRANSFERS.provider.message:
type: string
description: The gateway provider textual response for the requested transfer
example: SUCCESS
id_TRANSFERS.action.id:
type: string
description: A unique identifier generated by Global Payments to identify an action.
example: ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d
type_TRANSFERS.action.type:
type: string
enum:
- TRANSFER
description: |
Indicates the specific action taken.
* `TRANSFER` - indicates the action perfomred was a transfer.
example: TRANSFER
time_created_TRANSFERS.action.time_created:
type: string
description: Global Payments time indicating when the object was created in ISO-8601 format.
example: '2021-05-03T21:23:39.718Z'
result_code_TRANSFERS.action.result_code:
type: string
enum:
- SUCCESS
- DECLINED
description: The result of the action executed.
example: SUCCESS
app_id_TRANSFERS.action.app_id:
type: string
description: The id of the app that was used to create the token.
example: uzFr7t4VOqxdLDI44hHmXIjHtOOE8d
app_name_TRANSFERS.action.app_name:
type: string
description: The name of the app the user gave to the application.
example: my_lovely_app
split_amount_request:
type: object
properties:
amount:
$ref: '#/components/schemas/amount_TRANSFERS.amount'
split_amount_response:
type: object
properties:
id:
$ref: '#/components/schemas/id_TRANSFERS.id'
time_created:
$ref: '#/components/schemas/time_created_TRANSFERS.time_created'
time_last_updated:
$ref: '#/components/schemas/time_last_updated_TRANSFERS.time_last_updated'
type:
$ref: '#/components/schemas/type_TRANSFERS.type'
status:
$ref: '#/components/schemas/status_TRANSFERS.status'
amount:
$ref: '#/components/schemas/amount_TRANSFERS.amount'
usable_balance_mode:
$ref: '#/components/schemas/usable_balance_mode_TRANSFERS.usable_balance_mode'
country:
$ref: '#/components/schemas/country_TRANSFERS.country'
currency:
$ref: '#/components/schemas/currency_TRANSFERS.currency'
merchant_id:
$ref: '#/components/schemas/merchant_id_TRANSFERS.merchant_id'
merchant_name:
$ref: '#/components/schemas/merchant_name_TRANSFERS.merchant_name'
account_name:
$ref: '#/components/schemas/account_name_TRANSFERS.account_name'
account_id:
$ref: '#/components/schemas/account_id_TRANSFERS.account_id'
recipient_merchant_id:
$ref: '#/components/schemas/recipient_merchant_id_TRANSFERS.recipient_merchant_id'
recipient_merchant_name:
$ref: '#/components/schemas/recipient_merchant_name_TRANSFERS.recipient_merchant_name'
recipient_account_id:
$ref: '#/components/schemas/recipient_account_id_TRANSFERS.recipient_account_id'
recipient_account_name:
$ref: '#/components/schemas/recipient_account_name_TRANSFERS.recipient_account_name'
reference:
$ref: '#/components/schemas/reference_TRANSFERS.reference'
payment_method:
type: object
properties:
result:
$ref: '#/components/schemas/result_TRANSFERS.payment_method.result'
message:
$ref: '#/components/schemas/message_TRANSFERS.payment_method.message'
action:
type: object
properties:
id:
$ref: '#/components/schemas/id_TRANSFERS.action.id'
type:
$ref: '#/components/schemas/type_TRANSFERS.action.type'
time_created:
$ref: '#/components/schemas/time_created_TRANSFERS.action.time_created'
result_code:
$ref: '#/components/schemas/result_code_TRANSFERS.action.result_code'
app_id:
$ref: '#/components/schemas/app_id_TRANSFERS.action.app_id'
app_name:
$ref: '#/components/schemas/app_name_TRANSFERS.action.app_name'
country_TRANSFERS.country:
type: string
title: country_TRANSFERS.country
description: The country in ISO-3166-1(alpha-2 code) format.
minLength: 1
maxLength: 255
example: US
currency_TRANSFERS.currency:
type: string
title: currency_TRANSFERS.currency
description: The currency of the amount in ISO-4217(alpha-3)
minLength: 3
maxLength: 3
example: USD
result_TRANSFERS.payment_method.result:
type: string
title: result_TRANSFERS.payment_method.result
description: Result code from the payment method provider.
example: '0'
message_TRANSFERS.payment_method.message:
type: string
title: message_TRANSFERS.payment_method.message
description: Result message from the payment method provider corresponding to the result code.
example: Succesful
objRequestInvalid_400:
type: object
description: Bad Request
properties:
error_code:
type: string
enum:
- DUPLICATE_TRANSACTION
- INVALID_BATCH_ACTION
- INVALID_REQUEST_DATA
- INVALID_TRANSACTION_ACTION
- MANDATORY_DATA_MISSING
- TRANSACTION_NOT_FOUND
description: This indicates an issue with the API request.
example: MANDATORY_DATA_MISSING
detailed_error_code:
type: string
enum:
- '40016'
description: Unique reference to identify the error.
example: '40016'
detailed_error_description:
type: string
description: Unique Text describing the specific error.
example: Bad track data
AuthenticationInvalid_401:
type: object
description: Not Authenticated
properties:
error_code:
type: string
enum:
- NOT_AUTHENTICATED
description: This action failed as token in the request is not valid.
example: NOT_AUTHENTICATED
detailed_error_code:
type: string
enum:
- '40001'
- '40002'
description: Unique reference to identify the error.
example: '40001'
detailed_error_description:
type: string
description: Unique Text describing the specific error.
example: Invalid Access Token
NotAuthorized_403:
type: object
description: Forbidden
properties:
error_code:
type: string
enum:
- ACTION_NOT_AUTHORIZED
description: This action is not authorized with the credentials being used.
example: ACTION_NOT_AUTHORIZED
detailed_error_code:
type: string
enum:
- '40003'
- '40004'
description: Unique reference to identify the error.
example: '40003'
detailed_error_description:
type: string
description: Unique Text describing the specific error.
example: Permission not enabled to execute action
ServerError_500:
type: object
description: Internal Server Error
properties:
error_code:
type: string
enum:
- SYSTEM_ERROR_DOWNSTREAM
description: This indicates an unexpected issue occurred on the Global Payments system.
example: SYSTEM_ERROR_DOWNSTREAM
detailed_error_code:
type: string
enum:
- '50011'
description: Unique reference to identify the error.
example: '50011'
detailed_error_description:
type: string
description: Unique Text describing the specific error.
example: Processor Configuration error
UnknownServerError_501:
type: object
description: Not implemented
properties:
error_code:
type: string
enum:
- UNKNOWN_RESPONSE
description: This is an error not yet handled or mapped properly.
example: UNKNOWN_RESPONSE
detailed_error_code:
type: string
enum:
- '50012'
description: Unique reference to identify the error.
example: '50012'
detailed_error_description:
type: string
description: 'Unique Text describing the specific error not yet handled. '
UnknownPlatformError_502:
type: object
description: Bad Gateway
properties:
error_code:
type: string
enum:
- UNAUTHORIZED_DOWNSTREAM
description: This is an error indicating there was an issue connecting to a partner system..
example: UNAUTHORIZED_DOWNSTREAM
detailed_error_code:
type: string
enum:
- '50002'
description: Unique reference to identify the error.
example: '50002'
detailed_error_description:
type: string
description: Authentication error—Verify and correct credentials.
ServerTimeout_504:
type: object
description: Timeout
properties:
error_code:
type: string
enum:
- TIMEOUT_DOWNSTREAM
description: This is an error indicating there was a timeout issue to another system.
example: TIMEOUT_DOWNSTREAM
detailed_error_code:
type: string
enum:
- '50008'
description: Unique reference to identify the error.
example: '50008'
detailed_error_description:
type: string
description: No response from payment method provider.