|
1 | 1 | {
|
2 |
| - "openapi": "3.0.0", |
| 2 | + "openapi": "3.0.3", |
3 | 3 | "info": {
|
4 | 4 | "title": "Subscriptions",
|
5 | 5 | "description": "You can use billing plans and subscriptions to create subscriptions that process recurring PayPal payments for physical or digital goods, or services. A plan includes pricing and billing cycle information that defines the amount and frequency of charge for a subscription. You can also define a fixed plan, such as a $5 basic plan or a volume- or graduated-based plan with pricing tiers based on the quantity purchased. For more information, see <a href=\"/docs/subscriptions/\">Subscriptions Overview</a>.",
|
6 | 6 | "version": "1.6"
|
7 | 7 | },
|
8 | 8 | "paths": {
|
9 |
| - "/plans": { |
| 9 | + "/v1/billing/plans": { |
10 | 10 | "post": {
|
11 | 11 | "summary": "Create plan",
|
12 | 12 | "description": "Creates a plan that defines pricing and billing cycle details for subscriptions.",
|
|
120 | 120 | }
|
121 | 121 | },
|
122 | 122 | "parameters": [
|
123 |
| - { |
124 |
| - "$ref": "#/components/parameters/authorization" |
125 |
| - }, |
126 | 123 | {
|
127 | 124 | "$ref": "#/components/parameters/content_type"
|
128 | 125 | },
|
|
249 | 246 | }
|
250 | 247 | },
|
251 | 248 | "parameters": [
|
252 |
| - { |
253 |
| - "$ref": "#/components/parameters/authorization" |
254 |
| - }, |
255 | 249 | {
|
256 | 250 | "$ref": "#/components/parameters/content_type"
|
257 | 251 | },
|
|
289 | 283 | ]
|
290 | 284 | }
|
291 | 285 | },
|
292 |
| - "/plans/{id}": { |
| 286 | + "/v1/billing/plans/{id}": { |
293 | 287 | "get": {
|
294 | 288 | "summary": "Show plan details",
|
295 | 289 | "description": "Shows details for a plan, by ID.",
|
|
371 | 365 | }
|
372 | 366 | },
|
373 | 367 | "parameters": [
|
374 |
| - { |
375 |
| - "$ref": "#/components/parameters/authorization" |
376 |
| - }, |
377 | 368 | {
|
378 | 369 | "$ref": "#/components/parameters/content_type"
|
379 | 370 | },
|
|
503 | 494 | }
|
504 | 495 | },
|
505 | 496 | "parameters": [
|
506 |
| - { |
507 |
| - "$ref": "#/components/parameters/authorization" |
508 |
| - }, |
509 | 497 | {
|
510 | 498 | "$ref": "#/components/parameters/content_type"
|
511 | 499 | },
|
|
528 | 516 | ]
|
529 | 517 | }
|
530 | 518 | },
|
531 |
| - "/plans/{id}/activate": { |
| 519 | + "/v1/billing/plans/{id}/activate": { |
532 | 520 | "post": {
|
533 | 521 | "summary": "Activate plan",
|
534 | 522 | "description": "Activates a plan, by ID.",
|
|
620 | 608 | }
|
621 | 609 | },
|
622 | 610 | "parameters": [
|
623 |
| - { |
624 |
| - "$ref": "#/components/parameters/authorization" |
625 |
| - }, |
626 | 611 | {
|
627 | 612 | "$ref": "#/components/parameters/content_type"
|
628 | 613 | },
|
|
642 | 627 | ]
|
643 | 628 | }
|
644 | 629 | },
|
645 |
| - "/plans/{id}/deactivate": { |
| 630 | + "/v1/billing/plans/{id}/deactivate": { |
646 | 631 | "post": {
|
647 | 632 | "summary": "Deactivate plan",
|
648 | 633 | "description": "Deactivates a plan, by ID.",
|
|
734 | 719 | }
|
735 | 720 | },
|
736 | 721 | "parameters": [
|
737 |
| - { |
738 |
| - "$ref": "#/components/parameters/authorization" |
739 |
| - }, |
740 | 722 | {
|
741 | 723 | "$ref": "#/components/parameters/content_type"
|
742 | 724 | },
|
|
756 | 738 | ]
|
757 | 739 | }
|
758 | 740 | },
|
759 |
| - "/plans/{id}/update-pricing-schemes": { |
| 741 | + "/v1/billing/plans/{id}/update-pricing-schemes": { |
760 | 742 | "post": {
|
761 | 743 | "summary": "Update pricing",
|
762 | 744 | "description": "Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month.",
|
|
865 | 847 | }
|
866 | 848 | },
|
867 | 849 | "parameters": [
|
868 |
| - { |
869 |
| - "$ref": "#/components/parameters/authorization" |
870 |
| - }, |
871 | 850 | {
|
872 | 851 | "$ref": "#/components/parameters/content_type"
|
873 | 852 | },
|
|
901 | 880 | ]
|
902 | 881 | }
|
903 | 882 | },
|
904 |
| - "/subscriptions": { |
| 883 | + "/v1/billing/subscriptions": { |
905 | 884 | "post": {
|
906 | 885 | "summary": "Create subscription",
|
907 | 886 | "description": "Creates a subscription.",
|
|
1020 | 999 | }
|
1021 | 1000 | },
|
1022 | 1001 | "parameters": [
|
1023 |
| - { |
1024 |
| - "$ref": "#/components/parameters/authorization" |
1025 |
| - }, |
1026 | 1002 | {
|
1027 | 1003 | "$ref": "#/components/parameters/content_type"
|
1028 | 1004 | },
|
|
1059 | 1035 | ]
|
1060 | 1036 | }
|
1061 | 1037 | },
|
1062 |
| - "/subscriptions/{id}": { |
| 1038 | + "/v1/billing/subscriptions/{id}": { |
1063 | 1039 | "get": {
|
1064 | 1040 | "summary": "Show subscription details",
|
1065 | 1041 | "description": "Shows details for a subscription, by ID.",
|
|
1141 | 1117 | }
|
1142 | 1118 | },
|
1143 | 1119 | "parameters": [
|
1144 |
| - { |
1145 |
| - "$ref": "#/components/parameters/authorization" |
1146 |
| - }, |
1147 | 1120 | {
|
1148 | 1121 | "$ref": "#/components/parameters/content_type"
|
1149 | 1122 | },
|
|
1273 | 1246 | }
|
1274 | 1247 | },
|
1275 | 1248 | "parameters": [
|
1276 |
| - { |
1277 |
| - "$ref": "#/components/parameters/authorization" |
1278 |
| - }, |
1279 | 1249 | {
|
1280 | 1250 | "$ref": "#/components/parameters/content_type"
|
1281 | 1251 | },
|
|
1298 | 1268 | ]
|
1299 | 1269 | }
|
1300 | 1270 | },
|
1301 |
| - "/subscriptions/{id}/revise": { |
| 1271 | + "/v1/billing/subscriptions/{id}/revise": { |
1302 | 1272 | "post": {
|
1303 | 1273 | "summary": "Revise plan or quantity of subscription",
|
1304 | 1274 | "description": "Updates the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount`, `shipping_address` values for the subscription. This type of update requires the buyer's consent.",
|
|
1419 | 1389 | }
|
1420 | 1390 | },
|
1421 | 1391 | "parameters": [
|
1422 |
| - { |
1423 |
| - "$ref": "#/components/parameters/authorization" |
1424 |
| - }, |
1425 | 1392 | {
|
1426 | 1393 | "$ref": "#/components/parameters/content_type"
|
1427 | 1394 | },
|
|
1455 | 1422 | ]
|
1456 | 1423 | }
|
1457 | 1424 | },
|
1458 |
| - "/subscriptions/{id}/suspend": { |
| 1425 | + "/v1/billing/subscriptions/{id}/suspend": { |
1459 | 1426 | "post": {
|
1460 | 1427 | "summary": "Suspend subscription",
|
1461 | 1428 | "description": "Suspends the subscription.",
|
|
1564 | 1531 | }
|
1565 | 1532 | },
|
1566 | 1533 | "parameters": [
|
1567 |
| - { |
1568 |
| - "$ref": "#/components/parameters/authorization" |
1569 |
| - }, |
1570 | 1534 | {
|
1571 | 1535 | "$ref": "#/components/parameters/content_type"
|
1572 | 1536 | },
|
|
1600 | 1564 | ]
|
1601 | 1565 | }
|
1602 | 1566 | },
|
1603 |
| - "/subscriptions/{id}/cancel": { |
| 1567 | + "/v1/billing/subscriptions/{id}/cancel": { |
1604 | 1568 | "post": {
|
1605 | 1569 | "summary": "Cancel subscription",
|
1606 | 1570 | "description": "Cancels the subscription.",
|
|
1709 | 1673 | }
|
1710 | 1674 | },
|
1711 | 1675 | "parameters": [
|
1712 |
| - { |
1713 |
| - "$ref": "#/components/parameters/authorization" |
1714 |
| - }, |
1715 | 1676 | {
|
1716 | 1677 | "$ref": "#/components/parameters/content_type"
|
1717 | 1678 | },
|
|
1745 | 1706 | ]
|
1746 | 1707 | }
|
1747 | 1708 | },
|
1748 |
| - "/subscriptions/{id}/activate": { |
| 1709 | + "/v1/billing/subscriptions/{id}/activate": { |
1749 | 1710 | "post": {
|
1750 | 1711 | "summary": "Activate subscription",
|
1751 | 1712 | "description": "Activates the subscription.",
|
|
1854 | 1815 | }
|
1855 | 1816 | },
|
1856 | 1817 | "parameters": [
|
1857 |
| - { |
1858 |
| - "$ref": "#/components/parameters/authorization" |
1859 |
| - }, |
1860 | 1818 | {
|
1861 | 1819 | "$ref": "#/components/parameters/content_type"
|
1862 | 1820 | },
|
|
1890 | 1848 | ]
|
1891 | 1849 | }
|
1892 | 1850 | },
|
1893 |
| - "/subscriptions/{id}/capture": { |
| 1851 | + "/v1/billing/subscriptions/{id}/capture": { |
1894 | 1852 | "post": {
|
1895 | 1853 | "summary": "Capture authorized payment on subscription",
|
1896 | 1854 | "description": "Captures an authorized payment from the subscriber on the subscription.",
|
|
2009 | 1967 | }
|
2010 | 1968 | },
|
2011 | 1969 | "parameters": [
|
2012 |
| - { |
2013 |
| - "$ref": "#/components/parameters/authorization" |
2014 |
| - }, |
2015 | 1970 | {
|
2016 | 1971 | "$ref": "#/components/parameters/content_type"
|
2017 | 1972 | },
|
|
2048 | 2003 | ]
|
2049 | 2004 | }
|
2050 | 2005 | },
|
2051 |
| - "/subscriptions/{id}/transactions": { |
| 2006 | + "/v1/billing/subscriptions/{id}/transactions": { |
2052 | 2007 | "get": {
|
2053 | 2008 | "summary": "List transactions for subscription",
|
2054 | 2009 | "description": "Lists transactions for a subscription.",
|
|
2147 | 2102 | }
|
2148 | 2103 | },
|
2149 | 2104 | "parameters": [
|
2150 |
| - { |
2151 |
| - "$ref": "#/components/parameters/authorization" |
2152 |
| - }, |
2153 | 2105 | {
|
2154 | 2106 | "$ref": "#/components/parameters/content_type"
|
2155 | 2107 | },
|
|
2187 | 2139 | }
|
2188 | 2140 | ],
|
2189 | 2141 | "externalDocs": {
|
2190 |
| - "url": "../doc/USERGUIDE.md" |
| 2142 | + "url": "https://developer.paypal.com/docs/api/subscriptions/v1/" |
2191 | 2143 | },
|
2192 | 2144 | "servers": [
|
2193 | 2145 | {
|
2194 |
| - "url": "https://api-m.paypal.com/v1/billing" |
| 2146 | + "url": "https://api-m.sandbox.paypal.com", |
| 2147 | + "description": "PayPal Sandbox Environment" |
| 2148 | + }, |
| 2149 | + { |
| 2150 | + "url": "https://api-m.paypal.com", |
| 2151 | + "description": "PayPal Live Environment" |
2195 | 2152 | }
|
2196 | 2153 | ],
|
2197 | 2154 | "components": {
|
|
2217 | 2174 | "description": "Oauth 2.0 authentication",
|
2218 | 2175 | "flows": {
|
2219 | 2176 | "clientCredentials": {
|
2220 |
| - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", |
| 2177 | + "tokenUrl": "/v1/oauth2/token", |
2221 | 2178 | "scopes": {
|
2222 | 2179 | "https://uri.paypal.com/services/subscriptions": "Manage plan & subscription"
|
2223 | 2180 | }
|
|
2226 | 2183 | }
|
2227 | 2184 | },
|
2228 | 2185 | "parameters": {
|
2229 |
| - "authorization": { |
2230 |
| - "name": "Authorization", |
2231 |
| - "in": "header", |
2232 |
| - "description": "To make REST API calls, include the bearer token in the <code>Authorization</code> header with the <code>Bearer</code> authentication scheme. The value is <code>Bearer <Access-Token></code> or <code>Basic <client_id>:<secret></code>.", |
2233 |
| - "required": true, |
2234 |
| - "schema": { |
2235 |
| - "type": "string" |
2236 |
| - } |
2237 |
| - }, |
2238 | 2186 | "content_type": {
|
2239 | 2187 | "name": "Content-Type",
|
2240 | 2188 | "in": "header",
|
2241 | 2189 | "description": "The media type. Required for operations with a request body. The value is `application/<format>`, where the `format` is `json`.",
|
2242 | 2190 | "required": true,
|
2243 | 2191 | "schema": {
|
2244 |
| - "type": "string" |
| 2192 | + "type": "string", |
| 2193 | + "default": "application/json" |
2245 | 2194 | }
|
2246 | 2195 | },
|
2247 | 2196 | "prefer": {
|
|
0 commit comments