forked from paypal/paypal-rest-api-specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reporting_transactions_v1.json
1737 lines (1737 loc) · 73.6 KB
/
reporting_transactions_v1.json
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.3",
"info": {
"title": "Transaction Search",
"description": "Use the Transaction Search API to get the history of transactions for a PayPal account. To use the API on behalf of third parties, you must be part of the PayPal partner network. Reach out to your partner manager for the next steps. To enroll in the partner program, see <a href=\"https://www.paypal.com/my/webapps/mpp/partner-program/global-programs\">Partner with PayPal</a>. For more information about the API, see the <a href=\"/docs/transaction-search/\">Transaction Search API Integration Guide</a>.<blockquote><strong>Note:</strong> To use the API on behalf of third parties, you must be part of the PayPal partner network. Reach out to your partner manager for the next steps. To enroll in the partner program, see <a href=\"https://www.paypal.com/my/webapps/mpp/partner-program/global-programs\">Partner with PayPal</a>.</blockquote>",
"version": "1.9"
},
"paths": {
"/v1/reporting/transactions": {
"get": {
"summary": "List transactions",
"description": "Lists transactions. Specify one or more query parameters to filter the transaction that appear in the response.<blockquote><strong>Notes:</strong> <ul><li>If you specify one or more optional query parameters, the <code>ending_balance</code> response field is empty.</li><li>It takes a maximum of three hours for executed transactions to appear in the list transactions call.</li><li>This call lists transaction for the previous three years.</li></ul></blockquote>",
"operationId": "search.get",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists transactions .",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/search_response"
}
}
}
},
"default": {
"$ref": "#/components/responses/default"
}
},
"parameters": [
{
"$ref": "#/components/parameters/transaction_id"
},
{
"$ref": "#/components/parameters/transaction_type"
},
{
"$ref": "#/components/parameters/transaction_status"
},
{
"$ref": "#/components/parameters/transaction_amount"
},
{
"$ref": "#/components/parameters/transaction_currency"
},
{
"$ref": "#/components/parameters/start_date"
},
{
"$ref": "#/components/parameters/end_date"
},
{
"$ref": "#/components/parameters/payment_instrument_type"
},
{
"$ref": "#/components/parameters/store_id"
},
{
"$ref": "#/components/parameters/terminal_id"
},
{
"$ref": "#/components/parameters/fields"
},
{
"$ref": "#/components/parameters/balance_affecting_records_only"
},
{
"$ref": "#/components/parameters/page_size"
},
{
"$ref": "#/components/parameters/page"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/reporting/search/read"
]
}
],
"tags": [
"transactions"
]
}
},
"/v1/reporting/balances": {
"get": {
"summary": "List all balances",
"description": "List all balances. Specify date time to list balances for that time that appear in the response.<blockquote><strong>Notes:</strong> <ul><li>It takes a maximum of three hours for balances to appear in the list balances call.</li><li>This call lists balances upto the previous three years.</li></ul></blockquote>",
"operationId": "balances.get",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists balances .",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/balances_response"
}
}
}
},
"400": {
"description": "The request is not well-formed, is syntactically incorrect, or violates schema.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_400"
}
}
}
},
"403": {
"description": "Authorization failed due to insufficient permissions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_403"
}
}
}
},
"500": {
"description": "An internal server error occurred.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_500"
}
}
}
},
"default": {
"$ref": "#/components/responses/default"
}
},
"parameters": [
{
"$ref": "#/components/parameters/as_of_time"
},
{
"$ref": "#/components/parameters/currency_code"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/reporting/balances/read"
]
}
],
"tags": [
"balances"
]
}
}
},
"tags": [
{
"name": "transactions",
"description": "Use the `/transactions` resource to list transactions."
},
{
"name": "partner-transactions",
"description": "Use the `/partner-transactions` resource to list transactions."
},
{
"name": "balances",
"description": "Use the `/balances` resource to list balances."
}
],
"externalDocs": {
"url": "https://developer.paypal.com/docs/integration/direct/transaction-search/"
},
"servers": [
{
"url": "https://api-m.sandbox.paypal.com",
"description": "PayPal Sandbox Environment"
},
{
"url": "https://api-m.paypal.com",
"description": "PayPal Live Environment"
}
],
"components": {
"securitySchemes": {
"Oauth2": {
"type": "oauth2",
"description": "Oauth 2.0 authentication",
"flows": {
"clientCredentials": {
"tokenUrl": "/v1/oauth2/token",
"scopes": {
"https://uri.paypal.com/services/reporting/search/read": "Transactions Search",
"https://uri.paypal.com/services/reporting/balances/read": "List Balances"
}
}
}
}
},
"parameters": {
"transaction_id": {
"name": "transaction_id",
"in": "query",
"description": "Filters the transactions in the response by a PayPal transaction ID. A valid transaction ID is 17 characters long, except for an <a href=\"/docs/api/payments/v1/#definition-order\">order ID</a>, which is 19 characters long.<blockquote><strong>Note:</strong> A transaction ID is not unique in the reporting system. The response can list two transactions with the same ID. One transaction can be balance affecting while the other is non-balance affecting.</blockquote>",
"schema": {
"type": "string",
"minLength": 17,
"maxLength": 19
}
},
"transaction_type": {
"name": "transaction_type",
"in": "query",
"description": "Filters the transactions in the response by a PayPal transaction event code. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/).",
"schema": {
"type": "string"
}
},
"transaction_status": {
"name": "transaction_status",
"in": "query",
"description": "Filters the transactions in the response by a PayPal transaction status code. Value is:<table><thead><tr><th>Status code</th><th>Description</th></tr></thead><tbody><tr><td><code>D</code></td><td>PayPal or merchant rules denied the transaction.</td></tr><tr><td><code>P</code></td><td>The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to <code>S</code>.</td></tr><tr><td><code>S</code></td><td>The transaction successfully completed without a denial and after any pending statuses.</td></tr><tr><td><code>V</code></td><td>A successful transaction was reversed and funds were refunded to the original sender.</td></tr></tbody></table>",
"schema": {
"type": "string"
}
},
"transaction_amount": {
"name": "transaction_amount",
"in": "query",
"description": "Filters the transactions in the response by a gross transaction amount range. Specify the range as `<start-range> TO <end-range>`, where `<start-range>` is the lower limit of the gross PayPal transaction amount and `<end-range>` is the upper limit of the gross transaction amount. Specify the amounts in lower denominations. For example, to search for transactions from $5.00 to $10.05, specify `[500 TO 1005]`.<blockquote><strong>Note:</strong>The values must be URL encoded.</blockquote>",
"schema": {
"type": "string"
}
},
"transaction_currency": {
"name": "transaction_currency",
"in": "query",
"description": "Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency.",
"schema": {
"type": "string"
}
},
"start_date": {
"name": "start_date",
"in": "query",
"description": "Filters the transactions in the response by a start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional.",
"required": true,
"schema": {
"type": "string",
"minLength": 20,
"maxLength": 64,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
}
},
"end_date": {
"name": "end_date",
"in": "query",
"description": "Filters the transactions in the response by an end date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional. The maximum supported range is 31 days.",
"required": true,
"schema": {
"type": "string",
"minLength": 20,
"maxLength": 64,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
}
},
"payment_instrument_type": {
"name": "payment_instrument_type",
"in": "query",
"description": "Filters the transactions in the response by a payment instrument type. Value is either:<ul><li><code>CREDITCARD</code>. Returns a direct credit card transaction with a corresponding value.</li><li><code>DEBITCARD</code>. Returns a debit card transaction with a corresponding value.</li></ul>If you omit this parameter, the API does not apply this filter.",
"required": false,
"schema": {
"type": "string"
}
},
"store_id": {
"name": "store_id",
"in": "query",
"description": "Filters the transactions in the response by a store ID.",
"schema": {
"type": "string"
}
},
"terminal_id": {
"name": "terminal_id",
"in": "query",
"description": "Filters the transactions in the response by a terminal ID.",
"schema": {
"type": "string"
}
},
"fields": {
"name": "fields",
"in": "query",
"description": "Indicates which fields appear in the response. Value is a single field or a comma-separated list of fields. The <code>transaction_info</code> value returns only the transaction details in the response. To include all fields in the response, specify <code>fields=all</code>. Valid fields are:<ul><li><a href=\"/docs/api/transaction-search/v1/#definition-transaction_info\"><code>transaction_info</code></a>. The transaction information. Includes the ID of the PayPal account of the payee, the PayPal-generated transaction ID, the PayPal-generated base ID, the PayPal reference ID type, the transaction event code, the date and time when the transaction was initiated and was last updated, the transaction amounts including the PayPal fee, any discounts, insurance, the transaction status, and other information about the transaction.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-payer_info\"><code>payer_info</code></a>. The payer information. Includes the PayPal customer account ID and the payer's email address, primary phone number, name, country code, address, and whether the payer is verified or unverified.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-shipping_info\"><code>shipping_info</code></a>. The shipping information. Includes the recipient's name, the shipping method for this order, the shipping address for this order, and the secondary address associated with this order.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-auction_info\"><code>auction_info</code></a>. The auction information. Includes the name of the auction site, the auction site URL, the ID of the customer who makes the purchase in the auction, and the date and time when the auction closes.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-cart_info\"><code>cart_info</code></a>. The cart information. Includes an array of item details, whether the item amount or the shipping amount already includes tax, and the ID of the invoice for PayPal-generated invoices.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-incentive_info\"><code>incentive_info</code></a>. An array of incentive detail objects. Each object includes the incentive, such as a special offer or coupon, the incentive amount, and the incentive program code that identifies a merchant loyalty or incentive program.</li><li><a href=\"/docs/api/transaction-search/v1/#definition-store_info\"><code>store_info</code></a>. The store information. Includes the ID of the merchant store and the terminal ID for the checkout stand in the merchant store.</li></ul>",
"schema": {
"type": "string",
"default": "transaction_info"
}
},
"balance_affecting_records_only": {
"name": "balance_affecting_records_only",
"in": "query",
"description": "Indicates whether the response includes only balance-impacting transactions or all transactions. Value is either:<ul><li><code>Y</code>. The default. The response includes only balance transactions.</li><li><code>N</code>. The response includes all transactions.</li></ul>",
"schema": {
"type": "string",
"default": "Y"
}
},
"page_size": {
"name": "page_size",
"in": "query",
"description": "The number of items to return in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"default": 100
}
},
"page": {
"name": "page",
"in": "query",
"description": "The zero-relative start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"default": 1
}
},
"as_of_time": {
"name": "as_of_time",
"in": "query",
"description": "List balances in the response at the date time provided, will return the last refreshed balance in the system when not provided.",
"schema": {
"type": "string",
"minLength": 20,
"maxLength": 64,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
}
},
"currency_code": {
"name": "currency_code",
"in": "query",
"description": "Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency.",
"schema": {
"type": "string",
"format": "ppaas_common_currency_code_v2",
"minLength": 3,
"maxLength": 3
}
}
},
"responses": {
"default": {
"description": "The default response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error_default"
}
}
}
}
},
"schemas": {
"error_details": {
"title": "Error Details",
"type": "object",
"description": "The error details. Required for client-side `4XX` errors.",
"properties": {
"field": {
"type": "string",
"description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors."
},
"value": {
"type": "string",
"description": "The value of the field that caused the error."
},
"location": {
"type": "string",
"description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
"default": "body"
},
"issue": {
"type": "string",
"description": "The unique, fine-grained application-level error code."
},
"description": {
"type": "string",
"description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value."
}
},
"required": [
"issue"
]
},
"error_default": {
"description": "The default error response.",
"oneOf": [
{
"$ref": "#/components/schemas/error_400"
},
{
"$ref": "#/components/schemas/error_401"
},
{
"$ref": "#/components/schemas/error_403"
},
{
"$ref": "#/components/schemas/error_404"
},
{
"$ref": "#/components/schemas/error_409"
},
{
"$ref": "#/components/schemas/error_415"
},
{
"$ref": "#/components/schemas/error_422"
},
{
"$ref": "#/components/schemas/error_500"
},
{
"$ref": "#/components/schemas/error_503"
}
]
},
"error_link_description": {
"title": "Link Description",
"description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.",
"type": "object",
"required": [
"href",
"rel"
],
"properties": {
"href": {
"description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.",
"type": "string",
"minLength": 0,
"maxLength": 20000,
"pattern": "^.*$"
},
"rel": {
"description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).",
"type": "string",
"minLength": 0,
"maxLength": 100,
"pattern": "^.*$"
},
"method": {
"description": "The HTTP method required to make the related call.",
"type": "string",
"minLength": 3,
"maxLength": 7,
"pattern": "^[A-Z]*$",
"enum": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT"
]
}
}
},
"error_400": {
"type": "object",
"title": "Bad Request Error",
"description": "Request is not well-formed, syntactically incorrect, or violates schema.",
"properties": {
"name": {
"type": "string",
"enum": [
"INVALID_REQUEST"
]
},
"message": {
"type": "string",
"enum": [
"Request is not well-formed, syntactically incorrect, or violates schema."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_401": {
"type": "object",
"title": "Unauthorized Error",
"description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.",
"properties": {
"name": {
"type": "string",
"enum": [
"AUTHENTICATION_FAILURE"
]
},
"message": {
"type": "string",
"enum": [
"Authentication failed due to missing authorization header, or invalid authentication credentials."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_403": {
"type": "object",
"title": "Not Authorized Error",
"description": "The client is not authorized to access this resource, although it may have valid credentials. ",
"properties": {
"name": {
"type": "string",
"enum": [
"NOT_AUTHORIZED"
]
},
"message": {
"type": "string",
"enum": [
"Authorization failed due to insufficient permissions."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_404": {
"type": "object",
"title": "Not found Error",
"description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.",
"properties": {
"name": {
"type": "string",
"enum": [
"RESOURCE_NOT_FOUND"
]
},
"message": {
"type": "string",
"enum": [
"The specified resource does not exist."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_409": {
"type": "object",
"title": "Resource Conflict Error",
"description": "The server has detected a conflict while processing this request.",
"properties": {
"name": {
"type": "string",
"enum": [
"RESOURCE_CONFLICT"
]
},
"message": {
"type": "string",
"enum": [
"The server has detected a conflict while processing this request."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_415": {
"type": "object",
"title": "Unsupported Media Type Error",
"description": "The server does not support the request payload's media type.",
"properties": {
"name": {
"type": "string",
"enum": [
"UNSUPPORTED_MEDIA_TYPE"
]
},
"message": {
"type": "string",
"enum": [
"The server does not support the request payload's media type."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_422": {
"type": "object",
"title": "Unprocessable Entity Error",
"description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.",
"properties": {
"name": {
"type": "string",
"enum": [
"UNPROCESSABLE_ENTITY"
]
},
"message": {
"type": "string",
"enum": [
"The requested action could not be performed, semantically incorrect, or failed business validation."
]
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error_details"
}
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
}
},
"error_500": {
"type": "object",
"title": "Internal Server Error",
"description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.",
"properties": {
"name": {
"type": "string",
"enum": [
"INTERNAL_SERVER_ERROR"
]
},
"message": {
"type": "string",
"enum": [
"An internal server error occurred."
]
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
},
"example": {
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"debug_id": "90957fca61718",
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR",
"rel": "information_link"
}
]
}
},
"error_503": {
"type": "object",
"title": "Service Unavailable Error",
"description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.",
"properties": {
"name": {
"type": "string",
"enum": [
"SERVICE_UNAVAILABLE"
]
},
"message": {
"type": "string",
"enum": [
"Service Unavailable."
]
},
"debug_id": {
"type": "string",
"description": "The PayPal internal ID. Used for correlation purposes."
},
"links": {
"description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).",
"type": "array",
"minItems": 0,
"maxItems": 10000,
"items": {
"$ref": "#/components/schemas/error_link_description"
}
}
},
"example": {
"name": "SERVICE_UNAVAILABLE",
"message": "Service Unavailable.",
"debug_id": "90957fca61718",
"information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE"
}
},
"date_time": {
"type": "string",
"description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>",
"format": "ppaas_date_time_v3",
"minLength": 20,
"maxLength": 64,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
},
"currency_code": {
"description": "The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency.",
"type": "string",
"format": "ppaas_common_currency_code_v2",
"minLength": 3,
"maxLength": 3
},
"money": {
"type": "object",
"title": "Money",
"description": "The currency and amount for a financial transaction, such as a balance or payment due.",
"properties": {
"currency_code": {
"$ref": "#/components/schemas/currency_code"
},
"value": {
"type": "string",
"description": "The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency Codes](/docs/integration/direct/rest/currency-codes/).",
"maxLength": 32,
"pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$"
}
},
"required": [
"currency_code",
"value"
]
},
"percentage": {
"type": "string",
"description": "The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99`.",
"format": "ppaas_common_percentage_v2",
"pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$"
},
"transaction_info": {
"type": "object",
"title": "Transaction Information",
"description": "The transaction information.",
"properties": {
"paypal_account_id": {
"type": "string",
"description": "The ID of the PayPal account of the counterparty.",
"minLength": 1,
"maxLength": 24,
"pattern": "^[a-zA-Z0-9]*$"
},
"transaction_id": {
"type": "string",
"description": "The PayPal-generated transaction ID.",
"readOnly": true,
"minLength": 1,
"maxLength": 24,
"pattern": "^[a-zA-Z0-9]*$"
},
"paypal_reference_id": {
"type": "string",
"description": "The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-existing transaction or event.",
"minLength": 1,
"maxLength": 24,
"pattern": "^[a-zA-Z0-9]*$"
},
"paypal_reference_id_type": {
"type": "string",
"description": "The PayPal reference ID type.",
"minLength": 3,
"maxLength": 3,
"pattern": "^[a-zA-Z0-9]*$",
"enum": [
"ODR",
"TXN",
"SUB",
"PAP"
]
},
"transaction_event_code": {
"type": "string",
"minLength": 1,
"maxLength": 5,
"pattern": "^[a-zA-Z0-9]*$",
"description": "A five-digit transaction event code that classifies the transaction type based on money movement and debit or credit. For example, <code>T0001</code>. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/)."
},
"transaction_initiation_date": {
"description": "The date and time when work on a transaction began in the PayPal system, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
"$ref": "#/components/schemas/date_time"
},
"transaction_updated_date": {
"description": "The date and time when the transaction was last changed, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
"$ref": "#/components/schemas/date_time"
},
"transaction_amount": {
"$ref": "#/components/schemas/money",
"description": "The all-inclusive gross transaction amount that was transferred between the sender and receiver through PayPal."
},
"fee_amount": {
"$ref": "#/components/schemas/money",
"description": "The PayPal fee amount. All transaction fees are included in this amount, which is the record of fee associated with the transaction.<blockquote><strong>Note:</strong> This field contains a value only when a transaction fee is applied and processed for this transaction.</blockquote>"
},
"discount_amount": {
"$ref": "#/components/schemas/money",
"description": "The reduction in price offered for goods or services purchased.<blockquote><strong>Note:</strong> This discount is for a price reduction that is offered for other than that at a individual item level.</blockquote>"
},
"insurance_amount": {
"$ref": "#/components/schemas/money",
"description": "An insurance charge. Guarantees the quality or delivery of a product."
},
"sales_tax_amount": {
"$ref": "#/components/schemas/money",
"description": "The PayPal- or merchant-reported sales tax amount for the transaction."
},
"shipping_amount": {
"$ref": "#/components/schemas/money",
"description": "The PayPal- or merchant-reported shipping amount for the transaction."
},
"shipping_discount_amount": {
"$ref": "#/components/schemas/money",
"description": "The discount on the shipping amount."
},
"shipping_tax_amount": {
"$ref": "#/components/schemas/money",
"description": "The tax on the shipping service."
},
"other_amount": {
"$ref": "#/components/schemas/money",
"description": "The special amount that is added to the transaction."
},
"tip_amount": {
"$ref": "#/components/schemas/money",
"description": "The tip."
},
"transaction_status": {
"type": "string",
"description": "A code that indicates the transaction status. Value is:<table><thead><tr><th>Status code</th><th>Description</th></tr></thead><tbody><tr><td><code>D</code></td><td>PayPal or merchant rules denied the transaction.</td></tr><tr><td><code>P</code></td><td>The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to <code>S</code>.</td></tr><tr><td><code>S</code></td><td>The transaction successfully completed without a denial and after any pending statuses.</td></tr><tr><td><code>V</code></td><td>A successful transaction was fully reversed and funds were refunded to the original sender.</td></tr></tbody></table>",
"minLength": 1,
"maxLength": 1,
"pattern": "^[a-zA-Z0-9]*$"
},
"transaction_subject": {
"type": "string",
"description": "The subject of payment. The payer passes this value to the payee. The payer controls this data through the interface through which he or she sends the data.",
"minLength": 1,
"maxLength": 256,
"pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$"
},
"transaction_note": {
"type": "string",
"description": "A special note that the payer passes to the payee. Might contain special customer requests, such as shipping instructions.",
"minLength": 1,
"maxLength": 4000,
"pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$"
},
"payment_tracking_id": {
"type": "string",
"description": "The payment tracking ID, which is a unique ID that partners specify to either get information about a payment or request a refund.",
"minLength": 1,
"maxLength": 127,
"pattern": "^[a-zA-Z0-9]*$"
},
"bank_reference_id": {
"type": "string",
"description": "The bank reference ID. The bank provides this value for an ACH transaction.",
"minLength": 1,
"maxLength": 127,
"pattern": "^[a-zA-Z0-9]*$"
},
"ending_balance": {
"$ref": "#/components/schemas/money",
"description": "The ending balance.<blockquote><strong>Note:</strong> If you specify one or more optional query parameters, the <code>ending_balance</code> response field is empty.</blockquote>"
},
"available_balance": {
"$ref": "#/components/schemas/money",
"description": "The available amount of transaction currency during the completion of this transaction."
},
"invoice_id": {
"type": "string",
"description": "The invoice ID that is sent by the merchant with the transaction.<blockquote><strong>Note:</strong> If an invoice ID was sent with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing transaction is reported.</blockquote>",