forked from paypal/paypal-rest-api-specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
invoicing_v1.json
2914 lines (2914 loc) · 120 KB
/
invoicing_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": "Invoicing",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a customer, the invoice moves from draft to payable state. PayPal then emails the customer a link to the invoice on the PayPal website. Customers with a PayPal account can log in and pay the invoice with PayPal. Alternatively, customers can pay as a guest with a debit card or credit card. For more information, see <a href=\"/docs/invoicing/\">Invoicing Overview</a> and the <a href=\"docs/archive/invoicing/integrate/\">Invoicing Integration Guide</a>.",
"version": "1.13",
"contact": {}
},
"deprecated": true,
"paths": {
"/v1/invoicing/invoices": {
"post": {
"summary": "Create draft invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Creates a draft invoice. To move the invoice from a draft to payable state, you must <a href=\"/docs/api/invoicing/v1/#invoices_send\">send the invoice</a>.<br/><br/>In the JSON request body, include invoice details including merchant information. The <code>invoice</code> object must include an <code>items</code> array.<blockquote><strong>Note:</strong> The merchant that you specify in an invoice must have a PayPal account in good standing.</blockquote>.",
"operationId": "invoice.create",
"responses": {
"201": {
"description": "A successful request returns the HTTP `201 Created` status code and a JSON response body that shows invoice details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoice"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"requestBody": {
"$ref": "#/components/requestBodies/invoice"
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
},
"get": {
"summary": "List invoices",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.",
"operationId": "invoice.get_all",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices with details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoices"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/page_size"
},
{
"$ref": "#/components/parameters/total_count_required"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/search": {
"post": {
"summary": "Search for invoices",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Searches for invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria.",
"operationId": "invoice.search",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists the invoices that match the search criteria.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoices"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/search"
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"search"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/send": {
"post": {
"summary": "Send invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Sends an invoice, by ID, to a customer. To suppress the merchant's email notification, set the `notify_merchant` query parameter to `false`.<blockquote><strong>Note:</strong> After you send an invoice, you cannot resend it.</blockquote>",
"operationId": "invoice.send",
"responses": {
"202": {
"description": "A successful request returns the HTTP `202 Accepted` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
},
{
"$ref": "#/components/parameters/notify_merchant"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/schedule": {
"post": {
"summary": "Schedule invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Schedules an invoice, by ID, to send on a future date. At 07:00 on that date in the preferred time zone of the merchant's PayPal account profile, PayPal emails an invoice notification to the merchant and the customer, adds an online payment button to the customer’s view of the invoice, and updates the invoice status to <code>SENT</code>.<blockquote><strong>Note:</strong> To change the scheduled date, adjust the invoice date and <a href=\"/docs/api/invoicing/v1/#invoices_update\">update invoice</a>. To send the invoice immediately, update the invoice date to today or to a date in the past.</blockquote>",
"operationId": "invoice.schedule",
"responses": {
"202": {
"description": "A successful request returns the HTTP `202 Accepted` status code and a JSON response body with a link to the invoice ."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/remind": {
"post": {
"summary": "Send invoice reminder",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a `notification` object that defines the subject of the reminder and other details.",
"operationId": "invoice.remind",
"responses": {
"202": {
"description": "A successful request returns the HTTP `202 Accepted` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/notification"
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/cancel": {
"post": {
"summary": "Cancel sent invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.",
"operationId": "invoice.cancel",
"responses": {
"204": {
"description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/cancel-notification"
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/record-payment": {
"post": {
"summary": "Mark invoice as paid",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Marks the status of an invoice, by ID, as paid.",
"operationId": "invoice.record-payment",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/payment-detail"
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/record-refund": {
"post": {
"summary": "Mark invoice as refunded",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Marks the status of an invoice, by ID, as refunded.",
"operationId": "invoice.record-refund",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/refund-detail"
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}": {
"get": {
"summary": "Show invoice details",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Shows details for an invoice, by ID.",
"operationId": "invoice.get",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows invoice details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoice"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
},
"put": {
"summary": "Update invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Fully updates an invoice, by ID. In the JSON request body, include a complete `invoice` object. This call does not support partial updates.",
"operationId": "invoice.update",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows invoice details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoice"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
},
{
"$ref": "#/components/parameters/notify_merchant"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/invoice"
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
},
"delete": {
"summary": "Delete draft invoice",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Deletes invoices in the <code>DRAFT</code> or <code>SCHEDULED</code> state, by ID. For invoices that have already been sent, you can <a href=\"/docs/api/invoicing/v1/#invoices_cancel\">cancel the invoice</a>. After you delete a draft or scheduled invoice, you can no longer use it or show its details. However, you can reuse its invoice number.",
"operationId": "invoice.delete",
"responses": {
"204": {
"description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/payment-records/{transaction_id}": {
"delete": {
"summary": "Delete external payment",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Deletes an external payment, by invoice ID and transaction ID.",
"operationId": "invoice.delete_external_payment",
"responses": {
"204": {
"description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
},
{
"$ref": "#/components/parameters/transaction_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/refund-records/{transaction_id}": {
"delete": {
"summary": "Delete external refund",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Deletes an external refund, by invoice ID and transaction ID.",
"operationId": "invoice.delete_external_refund",
"responses": {
"204": {
"description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
},
{
"$ref": "#/components/parameters/transaction_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/{invoice_id}/qr-code": {
"get": {
"summary": "Generate QR code",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Generates a QR code for an invoice, by ID. The QR code is a PNG image in <a href=\"https://www.base64encode.org/\">Base64-encoded</a> format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must <a href=\"#invoices_create\">create an invoice</a> and <a href=\"#invoices_send\">send an invoice</a> to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.",
"operationId": "invoice.qr_code",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the QR code as a PNG image.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/qr_code"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/invoice_id"
},
{
"$ref": "#/components/parameters/width"
},
{
"$ref": "#/components/parameters/height"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/invoices/next-invoice-number": {
"post": {
"summary": "Generate invoice number",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after `INVOICE-1234` is `INVOICE-1235`.",
"operationId": "invoice.next_invoice_number",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the next invoice number.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoice_number"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"invoices"
]
}
},
"/v1/invoicing/templates": {
"post": {
"summary": "Create template",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Creates an invoice template. You can use details from this template to create an invoice. You can create up to 50 templates.<blockquote><strong>Note:</strong> Every merchant starts with three PayPal system templates that are optimized for the unit type billed. The template includes `Quantity`, `Hours`, and `Amount`.</blockquote>",
"operationId": "template.create",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows template details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/template"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"requestBody": {
"$ref": "#/components/requestBodies/template"
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"templates"
]
},
"get": {
"summary": "List templates",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Lists merchant-created templates with associated details. The associated details include the email addresses, postal addresses, and phone numbers from the user's PayPal profile.<br/>The user can select which values to show in the business information section of their template.",
"operationId": "template.get_templates",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/templates"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/fields"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"templates"
]
}
},
"/v1/invoicing/templates/{template_id}": {
"get": {
"summary": "Show template details",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Shows details for a template, by ID.",
"operationId": "template.get",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows template details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/template"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/template_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"templates"
]
},
"delete": {
"summary": "Delete template",
"description": "Deletes a template, by ID.",
"operationId": "template.delete",
"responses": {
"204": {
"description": "A successful request returns the HTTP `204 No Content` status code with no JSON response body."
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/template_id"
}
],
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"templates"
]
},
"put": {
"summary": "Update template",
"description": "<blockquote><strong>Deprecation notice:</strong> The <code>/v1/invoices</code> endpoint is deprecated. Use the <code>/v2/invoices</code> endpoint instead. For details, see <a href=\"/docs/invoicing/basic-integration/\">PayPal Invoicing Basic Integration</a>.</blockquote>Updates a template, by ID. In the JSON request body, specify a complete `template` object. The update method does not support partial updates.",
"operationId": "template.update",
"responses": {
"200": {
"description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows template details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/template"
}
}
}
},
"default": {
"description": "The error response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"parameters": [
{
"$ref": "#/components/parameters/template_id"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/template"
},
"security": [
{
"Oauth2": [
"https://uri.paypal.com/services/invoicing"
]
}
],
"tags": [
"templates"
]
}
}
},
"tags": [
{
"name": "invoices",
"description": "Use the `/invoices` resource to create, update, and send invoices and invoice reminders. To manage invoices, you can also list invoices, show details for invoices, delete draft invoices, and cancel sent invoices. You can also mark invoices as fully or partially paid, or as refunded. Lastly, you can create QR codes for invoices that can be scanned, viewed, and paid by a mobile phone."
},
{
"name": "templates",
"description": "Use the `/templates` resource to create, list, show details for, update, and delete invoice templates. The template API is useful when creating a third-party invoicing application. For instance, a business can create a template with predefined invoice data. Later, the business can select the template to populate the invoice data.<blockquote><strong>Note:</strong> To upload a logo to display on an invoice, you can use the <strong>Template Settings</strong> dashboard to <a href=\"https://www.paypal.com/invoice/settings/templates\">create a template</a>. Then, use the URI of that logo when you create an invoice.</blockquote>"
},
{
"name": "files",
"description": "Use the `/files` resource to upload a file attachment for an invoice."
},
{
"name": "group-invoices",
"description": "Use the `/group-invoices` resource to create a batch, or group of, invoices."
},
{
"name": "search",
"description": "Use the `/search` resource to search for invoices."
},
{
"name": "summaries",
"description": "Use the `/summaries` resource to list invoice summary information, including counts. The list is grouped by invoice status."
}
],
"externalDocs": {
"url": "https://developer.paypal.com/docs/api/invoicing/v1/"
},
"servers": [
{
"url": "https://api-m.sandbox.paypal.com",
"description": "PayPal Sandbox Environment"
},
{
"url": "https://api-m.paypal.com",
"description": "PayPal Live Environment"
}
],
"components": {
"requestBodies": {
"invoice": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/invoice"
}
}
}
},
"template": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/template"
}
}
}
}
},
"securitySchemes": {
"Oauth2": {
"type": "oauth2",
"description": "Oauth 2.0 authentication",
"flows": {
"clientCredentials": {
"tokenUrl": "/v1/oauth2/token",
"scopes": {
"https://uri.paypal.com/services/invoicing": "Manage invoice resource."
}
}
}
}
},
"parameters": {
"page": {
"name": "page",
"in": "query",
"description": "The *zero-relative* start index of the entire list of merchant invoices that are returned in the response. So, the combination of `page=0` and `page_size=20` returns the first 20 invoices. The combination of `page=20` and `page_size=20` returns the next 20 invoices.",
"schema": {
"type": "integer",
"default": 1
}
},
"page_size": {
"name": "page_size",