diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0094d8b..071dc41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm i - - run: find openapi -name '*.json' -exec npm run-script bundle-deref -- {} \; - - run: find openapi -name '*.json' -exec npm run-script lint-redocly -- {} \; - - run: find openapi -name '*.json' -exec npm run-script lint-spectral -- {} \; - - run: find openapi -name '*.json' -exec npm run-script lint-openapi -- {} \; - - run: find openapi -name '*.json' -exec npm run-script codegen-java -- {} \; -exec rm -rf generated/java \; - - run: find openapi -name '*.json' -exec npm run-script codegen-typescript-node -- {} \; -exec rm -rf generated/typescript-node \; + - run: find openapi -name '*.json' -exec npm run bundle-deref -- {} \; + - run: find openapi -name '*.json' -exec npm run lint-redocly -- {} \; + - run: find openapi -name '*.json' -exec npm run lint-spectral -- {} \; + - run: find openapi -name '*.json' -exec npm run lint-openapi -- {} \; + - run: find openapi -name '*.json' -exec npm run codegen-java -- {} \; -exec rm -rf generated/java \; + - run: find openapi -name '*.json' -exec npm run codegen-typescript-node -- {} \; -exec rm -rf generated/typescript-node \; diff --git a/README.md b/README.md index dfd7211..9a23b83 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,23 @@ # PayPal REST API Specifications -This repository contains the specification files for [PayPal's REST APIs](https://developer.paypal.com/api/rest/). +This repository contains the specification files for [PayPal REST APIs](https://developer.paypal.com/api/rest/). You can try our REST APIs in Postman without a PayPal Developer account. Learn more in our [Postman guide](https://developer.paypal.com/api/rest/postman/). [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/19024122-92a85d0e-51e7-47da-9f83-c45dcb1cdf24?action=collection%2Ffork&collection-url=entityId%3D19024122-92a85d0e-51e7-47da-9f83-c45dcb1cdf24%26entityType%3Dcollection%26workspaceId%3D345300e6-346e-42e0-aed1-53717919aef0) -## Usage +## Steps to generate code from the specification -Available scripts can be executed against the required API by using the following command: ->`npm run-script -- []` +> _Note: Spec file used: openapi/checkout_orders_v2.json_ -Example: -> `npm run-script codegen-java -- openapi/checkout_orders_v2.json` +### Java + 1. `npm run codegen-java -- openapi/checkout_orders_v2.json --artifact-id orders` + 2. `cd generated/java` + 3. `mvn clean install` + +The above will install the `orders` artifact to the local maven repository + +## Available scripts ``` npm run diff --git a/openapi/billing_subscriptions_v1.json b/openapi/billing_subscriptions_v1.json index ab5e8b5..af25b04 100644 --- a/openapi/billing_subscriptions_v1.json +++ b/openapi/billing_subscriptions_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Subscriptions", "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 Subscriptions Overview.", @@ -120,9 +120,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -147,13 +144,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -249,9 +239,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -277,13 +264,6 @@ "$ref": "#/components/parameters/statuses" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -371,9 +351,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -384,13 +361,6 @@ "$ref": "#/components/parameters/fields" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -503,9 +473,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -516,13 +483,6 @@ "requestBody": { "$ref": "#/components/requestBodies/patch_request" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -620,9 +580,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -630,13 +587,6 @@ "$ref": "#/components/parameters/id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -734,9 +684,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -744,13 +691,6 @@ "$ref": "#/components/parameters/id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -865,9 +805,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -889,13 +826,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "plans" ] @@ -1020,9 +950,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1047,13 +974,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1141,9 +1061,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1154,13 +1071,6 @@ "$ref": "#/components/parameters/fields" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1273,9 +1183,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1286,13 +1193,6 @@ "requestBody": { "$ref": "#/components/requestBodies/patch_request" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1419,9 +1319,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1443,13 +1340,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1564,9 +1454,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1588,13 +1475,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1709,9 +1589,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1733,13 +1610,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -1854,9 +1724,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1878,13 +1745,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -2009,9 +1869,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -2036,13 +1893,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -2147,9 +1997,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -2163,13 +2010,6 @@ "$ref": "#/components/parameters/end_time" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "subscriptions" ] @@ -2187,11 +2027,28 @@ } ], "externalDocs": { - "url": "../doc/USERGUIDE.md" + "url": "https://developer.paypal.com/docs/api/subscriptions/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/billing" + "url": "https://api-m.sandbox.paypal.com/v1/billing", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/billing", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/subscriptions" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/subscriptions" + ] } ], "components": { @@ -2212,7 +2069,19 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/subscriptions": "Manage plan & subscription" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -2226,22 +2095,14 @@ } }, "parameters": { - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in the Authorization header with the Bearer authentication scheme. The value is Bearer <Access-Token> or Basic <client_id>:<secret>.", - "required": true, - "schema": { - "type": "string" - } - }, "content_type": { "name": "Content-Type", "in": "header", "description": "The media type. Required for operations with a request body. The value is `application/`, where the `format` is `json`.", "required": true, "schema": { - "type": "string" + "type": "string", + "default": "application/json" } }, "prefer": { diff --git a/openapi/catalogs_products_v1.json b/openapi/catalogs_products_v1.json index 1f6acea..6418a6b 100644 --- a/openapi/catalogs_products_v1.json +++ b/openapi/catalogs_products_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Catalog Products", "description": "Merchants can use the Catalog Products API to create products, which are goods and services.", @@ -115,9 +115,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -142,13 +139,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "products" ] @@ -234,9 +224,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -250,13 +237,6 @@ "$ref": "#/components/parameters/total_required" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "products" ] @@ -344,9 +324,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -354,13 +331,6 @@ "$ref": "#/components/parameters/product_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "products" ] @@ -473,9 +443,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -497,13 +464,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/subscriptions" - ] - } - ], "tags": [ "products" ] @@ -517,16 +477,45 @@ } ], "externalDocs": { - "url": "/docs/api/overview/" + "url": "https://developer.paypal.com/docs/api/catalog-products/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/catalogs" + "url": "https://api-m.sandbox.paypal.com/v1/catalogs", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/catalogs", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/subscriptions" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/subscriptions" + ] } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/subscriptions": "Create and manage products" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -540,22 +529,14 @@ } }, "parameters": { - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in the Authorization header with the Bearer authentication scheme. The value is Bearer <Access-Token> or Basic <client_id>:<secret>.", - "required": true, - "schema": { - "type": "string" - } - }, "content_type": { "name": "Content-Type", "in": "header", "description": "The media type. Required for operations with a request body. The value is `application/`, where `format` is `json`.", "required": true, "schema": { - "type": "string" + "type": "string", + "default": "application/json" } }, "prefer": { diff --git a/openapi/checkout_orders_v1.json b/openapi/checkout_orders_v1.json index 3b8ba72..4a5b354 100644 --- a/openapi/checkout_orders_v1.json +++ b/openapi/checkout_orders_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Orders", "description": "Partners can use the Orders API to create, show details for, authorize, and capture payment for orders.
Orders API integration note: The PayPal Commerce Platform is a limited-release solution aimed at partners, crowd funding, and multi-party commerce platforms. To use Orders API for Partners, see Multiparty Payments. v1 of the API will be deprecated soon. A new version is available at Orders API v2.
", @@ -48,7 +48,15 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/channelpartner", + "https://uri.paypal.com/services/payments/partnerfee", + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment", "https://uri.paypal.com/services/payments/channelpartner", "https://uri.paypal.com/services/payments/partnerfee", @@ -88,7 +96,15 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/channelpartner", + "https://uri.paypal.com/services/payments/partnerfee", + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment", "https://uri.paypal.com/services/payments/channelpartner", "https://uri.paypal.com/services/payments/partnerfee", @@ -117,14 +133,6 @@ "$ref": "#/components/parameters/order_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "orders" ] @@ -191,14 +199,6 @@ }, "required": true }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "orders-payment-actions" ] @@ -216,16 +216,52 @@ } ], "externalDocs": { - "url": "/docs/api/orders/v1" + "url": "https://developer.paypal.com/docs/api/orders/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/checkout" + "url": "https://api-m.sandbox.paypal.com/v1/checkout", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/checkout", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/realtimepayment" + ] } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/payments/payment": "Manage payments and checkout workflow.", + "https://uri.paypal.com/services/payments/unilateralrefund": "This scope enables partners/facilitators to perform unilateralrefund and also refund.", + "https://uri.paypal.com/services/payments/funding-options": "Access payer's funding options available for the payment.", + "https://uri.paypal.com/services/payments/channelpartner": "Permission to explicitly specify the receiver of a payment on request payload.", + "https://uri.paypal.com/services/payments/partnerfee": "Permission to partners to withdraw partner fee as part of the payment.", + "https://uri.paypal.com/services/payments/realtimepayment": "Permission to do any real time payment, with support for sale/authorize/order intents" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/checkout_orders_v2.json b/openapi/checkout_orders_v2.json index a65783a..77bccf4 100644 --- a/openapi/checkout_orders_v2.json +++ b/openapi/checkout_orders_v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Orders", "description": "An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders.", @@ -28,6 +28,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/order" + }, + "examples": { + "0": { + "$ref": "#/components/examples/order_request_create" + } } } } @@ -100,9 +105,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -122,14 +124,6 @@ }, "required": true }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/orders/client-side-integration" - ] - } - ], "tags": [ "orders" ] @@ -193,9 +187,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -203,14 +194,6 @@ "$ref": "#/components/parameters/fields" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/orders/client-side-integration" - ] - } - ], "tags": [ "orders" ] @@ -299,9 +282,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -309,14 +289,6 @@ "requestBody": { "$ref": "#/components/requestBodies/patch_request" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/orders/client-side-integration" - ] - } - ], "tags": [ "orders" ] @@ -410,9 +382,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -434,14 +403,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/initiatepayment" - ] - } - ], "tags": [ "orders" ] @@ -585,9 +546,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -604,14 +562,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/orders/client-side-integration" - ] - } - ], "tags": [ "orders" ] @@ -755,9 +705,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -774,14 +721,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment", - "https://uri.paypal.com/services/payments/orders/client-side-integration" - ] - } - ], "tags": [ "orders" ] @@ -899,9 +838,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -919,13 +855,6 @@ }, "required": true }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - } - ], "tags": [ "orders" ] @@ -1029,9 +958,6 @@ { "$ref": "#/components/parameters/tracker_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -1039,13 +965,6 @@ "requestBody": { "$ref": "#/components/requestBodies/patch_request" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - } - ], "tags": [ "trackers" ] @@ -1063,11 +982,30 @@ } ], "externalDocs": { - "url": "../doc/USERGUIDE.md" + "url": "https://developer.paypal.com/docs/api/orders/v2/" }, "servers": [ { - "url": "https://api-m.paypal.com/v2/checkout" + "url": "https://api-m.sandbox.paypal.com/v2/checkout", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v2/checkout", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] } ], "components": { @@ -1088,9 +1026,24 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication (sandbox environment)", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/payments/payment": "Manage payments and checkout workflow.", + "https://uri.paypal.com/services/payments/payment/reference-transaction": "Permission to initiate reference transaction", + "https://uri.paypal.com/services/payments/initiatepayment": "Initiates payments and checkout workflows.", + "https://uri.paypal.com/services/payments/orders/client-side-integration": "Allows client-side integration on Create, Get, Patch, Authorize & Capture Order endpoints." + } + } + } + }, + "production": { "type": "oauth2", - "description": "Oauth 2.0 authentication", + "description": "Oauth 2.0 authentication (production environment)", "flows": { "clientCredentials": { "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", @@ -1149,15 +1102,6 @@ "default": "return=minimal" } }, - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in this header with the `Bearer` authentication scheme. The value is `Bearer ` or `Basic `.", - "required": true, - "schema": { - "type": "string" - } - }, "content_type": { "name": "Content-Type", "in": "header", @@ -1166,7 +1110,8 @@ "schema": { "type": "string", "minLength": 1, - "maxLength": 255 + "maxLength": 255, + "default": "application/json" } }, "id": { @@ -14169,6 +14114,20 @@ } } }, + "order_request_create": { + "value": { + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", + "amount": { + "currency_code": "USD", + "value": "100.00" + } + } + ] + } + }, "order_request": { "value": { "intent": "CAPTURE", @@ -14189,7 +14148,6 @@ "brand_name": "EXAMPLE INC", "locale": "en-US", "landing_page": "LOGIN", - "shipping_preference": "SET_PROVIDED_ADDRESS", "user_action": "PAY_NOW", "return_url": "https://example.com/returnUrl", "cancel_url": "https://example.com/cancelUrl" diff --git a/openapi/customer_disputes_v1.json b/openapi/customer_disputes_v1.json index 8e9fbad..4db4ee4 100644 --- a/openapi/customer_disputes_v1.json +++ b/openapi/customer_disputes_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Disputes", "description": "Occasionally, something goes wrong with a customer's order. To dispute a charge, a customer can create a dispute with PayPal. PayPal merchants, partners, and external developers can use the PayPal Disputes API to manage customer disputes.
Note: In the live environment, merchants cannot create disputes but can only respond to customer-created disputes. However, merchants can create disputes in the sandbox environment. When you create an app, enable Disputes in the App feature options section.
A customer can also ask his or her bank or credit card company to dispute and reverse a charge, which is known as a chargeback. For more information, see Disputes, claims, chargebacks, and bank reversals.

When a customer disputes a charge, you can use this API to provide evidence that the charge is legitimate. To provide evidence or appeal a dispute, you submit a proof of delivery or proof of refund document or notes, which can include logs.

Normally, an agent at PayPal creates a dispute, updates the dispute status, and settles disputes, but now you can run test cases in the sandbox that complete these operations.

Important: The create, cancel, compute metrics, change reason, and validate eligibility methods are available as a limited-release solution at this time. For more information, reach out to your PayPal account manager.

For details, see Disputes Overview documentation.", @@ -37,9 +37,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/start_time" }, @@ -76,27 +73,52 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/read-buyer" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/read-seller" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/read-ebay" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/read" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/read-partner" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/read-buyer" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/read-seller" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/read-ebay" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/read" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/read-partner" ] } @@ -139,34 +161,56 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/authorization" } ], "security": [ { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/read-buyer" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/read-seller" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/read-ebay" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/read" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/read-partner" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/read-buyer" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/read-seller" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/read-ebay" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/read-partner" ] } @@ -233,9 +277,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -243,7 +284,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] } @@ -289,9 +335,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -299,17 +342,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/update-buyer" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-partner" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-partner" ] } @@ -355,9 +413,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -365,12 +420,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -416,9 +481,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -439,7 +501,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] } @@ -505,9 +572,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -541,12 +605,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -612,9 +686,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -649,12 +720,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -720,9 +801,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -756,12 +834,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -827,9 +915,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -850,12 +935,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -921,9 +1016,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -957,12 +1049,22 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/disputes/update-seller" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -1038,9 +1140,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1074,7 +1173,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -1140,9 +1244,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1176,7 +1277,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-buyer" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-buyer" ] } @@ -1242,9 +1348,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1265,7 +1368,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller" ] } @@ -1341,9 +1449,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1364,7 +1469,14 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/disputes/update-seller", + "https://uri.paypal.com/services/disputes/update-buyer", + "https://uri.paypal.com/services/disputes/update-partner" + ] + }, + { + "production": [ "https://uri.paypal.com/services/disputes/update-seller", "https://uri.paypal.com/services/disputes/update-buyer", "https://uri.paypal.com/services/disputes/update-partner" @@ -1428,11 +1540,16 @@ } ], "externalDocs": { - "url": "/docs/integration/direct/customer-disputes/" + "url": "https://developer.paypal.com/docs/api/customer-disputes/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/customer" + "url": "https://api-m.sandbox.paypal.com/v1/customer", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/customer", + "description": "PayPal Live Environment" } ], "components": { @@ -1484,7 +1601,29 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/disputes/read-seller": "This privilege allows client to read and search a disputes of a merchant but gets only a limited and allowed set of fields back .", + "https://uri.paypal.com/services/disputes/read-buyer": "This privilege allows client to read and search disputes but returns a limited and allowed set of fields back.", + "https://uri.paypal.com/services/disputes/read-ebay": "This privilege allows client to read and search a disputes of an user but gets only a limited and allowed set of fields back to ebay.", + "https://uri.paypal.com/services/disputes/read": "This privilege allows client to read and search a dispute of an user with all fields.", + "https://uri.paypal.com/services/disputes/webhooks": "This privilege allows webhook platform to read a dispute event", + "https://uri.paypal.com/services/disputes/create": "This privilege allows client to validate eligibility and create a dispute on his transaction(s).", + "https://uri.paypal.com/services/disputes/update-seller": "This privilege allows client to update a dispute (Merchant actions).", + "https://uri.paypal.com/services/disputes/update-buyer": "This privilege allows client to update a dispute (customer actions).", + "https://uri.paypal.com/services/referred-disputes/readwrite": "This privilege allows client to read and update a referred dispute.", + "https://uri.paypal.com/services/disputes/read-partner": "This privilege allows client to read and search disputes but returns a limited and allowed set of fields back.", + "https://uri.paypal.com/services/disputes/update-partner": "This privilege allows client to update a dispute (Partner actions)." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -1508,17 +1647,6 @@ } }, "parameters": { - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in the Authorization header with the Bearer authentication scheme.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255 - } - }, "start_time": { "name": "start_time", "in": "query", @@ -1679,7 +1807,8 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "\\w+\\/[-+.\\w]+" + "pattern": "\\w+\\/[-+.\\w]+", + "default": "application/json" } }, "id": { @@ -3068,7 +3197,7 @@ "description": "The cancellation details.", "properties": { "cancellation_date": { - "description": "The date and time of the cancellation, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6).", + "description": "The date and time of the cancellation, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", "$ref": "#/components/schemas/date_time" }, "cancellation_number": { @@ -3106,7 +3235,7 @@ "properties": { "return_time": { "$ref": "#/components/schemas/date_time", - "description": "The date and time when the product was returned, [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the product was returned, [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "mode": { "description": "The method that the customer used to return the product.", @@ -4972,7 +5101,7 @@ "date": { "readOnly": true, "$ref": "#/components/schemas/date_time", - "description": "The date and time when the evidence was received, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the evidence was received, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "item_id": { "type": "string", @@ -5019,7 +5148,7 @@ "properties": { "offer_time": { "$ref": "#/components/schemas/date_time", - "description": "The date and time when the event occurred, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the event occurred, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "actor": { "type": "string", @@ -5163,7 +5292,7 @@ "provided_time": { "readOnly": true, "$ref": "#/components/schemas/date_time", - "description": "The date and time when the information was received, in [Internet date and time format](http://tools.ietf.org/html/rfc3339#section-5.6)." + "description": "The date and time when the information was received, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)." }, "dispute_life_cycle_stage": { "readOnly": true, diff --git a/openapi/customer_partner_referrals_v1.json b/openapi/customer_partner_referrals_v1.json index 380ccbb..f167b1b 100644 --- a/openapi/customer_partner_referrals_v1.json +++ b/openapi/customer_partner_referrals_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Partner Referrals", "description": "
Deprecation notice: This integration method is deprecated. PayPal continues to support existing merchants using this method, but be advised that new features and enhancements will not be applied to these integrations. For details, see Onboard Sellers.
Partners can use the Partner Referrals API to add PayPal seller accounts using the before payment onboarding model. With this API, you collect seller data and pass it to the account creation and setup forms, reducing the burden on sellers during the signup and setup process.", @@ -43,7 +43,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/customer/partner-referrals/readwrite" ] } @@ -80,12 +85,22 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals/readwrite" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals" + ] + }, + { + "production": [ "https://uri.paypal.com/services/customer/partner-referrals/readwrite" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/customer/partner-referrals" ] } @@ -116,13 +131,6 @@ "$ref": "#/components/parameters/tracking_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/customer/partner" - ] - } - ], "tags": [ "merchant-integration" ] @@ -159,13 +167,6 @@ "$ref": "#/components/parameters/fields" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/customer/partner" - ] - } - ], "tags": [ "merchant-integration" ] @@ -196,13 +197,6 @@ "$ref": "#/components/parameters/partner_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/customer/partner" - ] - } - ], "tags": [ "merchant-integration" ] @@ -232,12 +226,43 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v1/customer" + "url": "https://api-m.sandbox.paypal.com/v1/customer", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/customer", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/customer/partner" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/customer/partner" + ] } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/customer/partner": "Manage seller resources.", + "https://uri.paypal.com/services/customer/partner-referrals/readwrite": "Manage external referral data with PayPal", + "https://uri.paypal.com/services/customer/partner-referrals": "Manage referral data shared by Partner with PayPal. To be used by only internal apps" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/customer_partner_referrals_v2.json b/openapi/customer_partner_referrals_v2.json index a85fb02..964884e 100644 --- a/openapi/customer_partner_referrals_v2.json +++ b/openapi/customer_partner_referrals_v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Partner Referrals", "description": "The Partner Referrals API enables a marketplace to add PayPal seller accounts. It supports the Connected Path marketplace models.
Important: PayPal for Marketplaces is a limited-release solution at this time. It is available to select partners for approved use cases. For more information, reach out to your PayPal account manager.
In the Connected Path, you host a button on your website that takes sellers to PayPal to create and configure a PayPal account. The Onboarding API enables you to collect seller data and pass it to the account creation and setup forms, reducing the burden on sellers during the signup and setup process. Call the create partner referral and show referral data methods for the Connected Path.", @@ -116,7 +116,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/customer/partner-referrals/readwrite" ] } @@ -202,12 +207,22 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals/readwrite" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/customer/partner-referrals" + ] + }, + { + "production": [ "https://uri.paypal.com/services/customer/partner-referrals/readwrite" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/customer/partner-referrals" ] } @@ -229,12 +244,31 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v2/customer" + "url": "https://api-m.sandbox.paypal.com/v2/customer", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v2/customer", + "description": "PayPal Live Environment" } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/customer/partner": "Manage seller resources.", + "https://uri.paypal.com/services/customer/partner-referrals/readwrite": "Manage external referral data with PayPal", + "https://uri.paypal.com/services/customer/partner-referrals": "Manage referral data shared by Partner with PayPal. To be used by only internal apps" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -2134,7 +2168,6 @@ "ROUTING_NUMBER_2", "ROUTING_NUMBER_3", "SWIFT_CODE", - "BRANCH_CODE", "INTERMEDIARY_SWIFT_CODE", "BBAN", "BBAN_ENCRYPTED", diff --git a/openapi/invoicing_v1.json b/openapi/invoicing_v1.json index f9af70c..7db6eec 100644 --- a/openapi/invoicing_v1.json +++ b/openapi/invoicing_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Invoicing", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
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 Invoicing Overview and the Invoicing Integration Guide.", @@ -29,13 +29,6 @@ "requestBody": { "$ref": "#/components/requestBodies/invoice" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -70,13 +63,6 @@ "$ref": "#/components/parameters/total_count_required" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -111,13 +97,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "search" ] @@ -144,13 +123,6 @@ "$ref": "#/components/parameters/notify_merchant" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -174,13 +146,6 @@ "$ref": "#/components/parameters/invoice_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -213,13 +178,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -252,13 +210,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -291,13 +242,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -330,13 +274,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -367,13 +304,6 @@ "$ref": "#/components/parameters/invoice_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -408,13 +338,6 @@ "requestBody": { "$ref": "#/components/requestBodies/invoice" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -436,13 +359,6 @@ "$ref": "#/components/parameters/invoice_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -469,13 +385,6 @@ "$ref": "#/components/parameters/transaction_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -502,13 +411,6 @@ "$ref": "#/components/parameters/transaction_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -545,13 +447,6 @@ "$ref": "#/components/parameters/height" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -577,13 +472,6 @@ "$ref": "#/components/responses/default" } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "invoices" ] @@ -612,13 +500,6 @@ "requestBody": { "$ref": "#/components/requestBodies/template" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "templates" ] @@ -647,13 +528,6 @@ "$ref": "#/components/parameters/fields" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "templates" ] @@ -684,13 +558,6 @@ "$ref": "#/components/parameters/template_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "templates" ] @@ -712,13 +579,6 @@ "$ref": "#/components/parameters/template_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "templates" ] @@ -750,13 +610,6 @@ "requestBody": { "$ref": "#/components/requestBodies/template" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/invoicing" - ] - } - ], "tags": [ "templates" ] @@ -790,11 +643,28 @@ } ], "externalDocs": { - "url": "/docs/invoicing/" + "url": "https://developer.paypal.com/docs/api/invoicing/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/invoicing" + "url": "https://api-m.sandbox.paypal.com/v1/invoicing", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/invoicing", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/invoicing" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/invoicing" + ] } ], "components": { @@ -819,7 +689,19 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/invoicing": "Manage invoice resource." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/invoicing_v2.json b/openapi/invoicing_v2.json index 75a7331..027b5c0 100644 --- a/openapi/invoicing_v2.json +++ b/openapi/invoicing_v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Invoices", "description": "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 the Invoicing Overview and the Invoicing Integration Guide.", @@ -127,7 +127,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -220,7 +225,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/read" ] } @@ -352,7 +362,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -499,7 +514,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -606,7 +626,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -766,7 +791,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -843,7 +873,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1003,7 +1038,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1080,7 +1120,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1169,7 +1214,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1211,7 +1261,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1295,7 +1350,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/read" ] } @@ -1454,7 +1514,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1519,7 +1584,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1626,7 +1696,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/read" ] } @@ -1718,7 +1793,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/read" ] } @@ -1821,7 +1901,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -1915,7 +2000,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/read" ] } @@ -2022,7 +2112,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -2124,7 +2219,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/invoicing/invoices/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/invoicing/invoices/readwrite" ] } @@ -2154,16 +2254,34 @@ } ], "externalDocs": { - "url": "/docs/invoicing/v2/" + "url": "https://developer.paypal.com/docs/api/invoicing/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v2/invoicing" + "url": "https://api-m.sandbox.paypal.com/v2/invoicing", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v2/invoicing", + "description": "PayPal Live Environment" } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/invoicing/invoices/read": "For Reading the invoice details.", + "https://uri.paypal.com/services/invoicing/invoices/readwrite": "For managing (Create, Update, Delete) invoice." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -2171,8 +2289,7 @@ "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/invoicing/invoices/read": "For Reading the invoice details.", - "https://uri.paypal.com/services/invoicing/invoices/readwrite": "For managing (Create, Update, Delete) invoice.", - "https://uri.paypal.com/services/invoicing/internal": "Manage invoice resource internal clients." + "https://uri.paypal.com/services/invoicing/invoices/readwrite": "For managing (Create, Update, Delete) invoice." } } } diff --git a/openapi/notifications_webhooks_v1.json b/openapi/notifications_webhooks_v1.json index bbf2ccc..10bd427 100644 --- a/openapi/notifications_webhooks_v1.json +++ b/openapi/notifications_webhooks_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Webhooks Management", "description": "The PayPal REST APIs use webhooks for event notification. Webhooks are HTTP callbacks that receive notification messages for events. After you configure a webhook listener for your app, you can create a webhook, which subscribes the webhook listener for your app to events. The notifications namespace contains resource collections for webhooks.", @@ -40,13 +40,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -75,13 +68,6 @@ "$ref": "#/components/parameters/anchor_type" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -112,13 +98,6 @@ "$ref": "#/components/parameters/webhook_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -150,13 +129,6 @@ "requestBody": { "$ref": "#/components/requestBodies/patch_request" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -178,13 +150,6 @@ "$ref": "#/components/parameters/webhook_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -215,13 +180,6 @@ "$ref": "#/components/parameters/webhook_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks" ] @@ -247,13 +205,6 @@ "$ref": "#/components/responses/default" } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-lookup" ] @@ -277,13 +228,6 @@ "$ref": "#/components/responses/default" } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-lookup" ] @@ -314,13 +258,6 @@ "$ref": "#/components/parameters/webhook_lookup_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-lookup" ] @@ -342,13 +279,6 @@ "$ref": "#/components/parameters/webhook_lookup_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-lookup" ] @@ -388,13 +318,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "verify-webhook-signature" ] @@ -420,13 +343,6 @@ "$ref": "#/components/responses/default" } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-event-types" ] @@ -469,13 +385,6 @@ "$ref": "#/components/parameters/event_type" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-events" ] @@ -506,13 +415,6 @@ "$ref": "#/components/parameters/event_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-events" ] @@ -557,13 +459,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "webhooks-events" ] @@ -603,13 +498,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/applications/webhooks" - ] - } - ], "tags": [ "simulate-event" ] @@ -667,11 +555,28 @@ } ], "externalDocs": { - "url": "/docs/api/notifications/webhooks/" + "url": "https://developer.paypal.com/docs/api/webhooks/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/notifications" + "url": "https://api-m.sandbox.paypal.com/v1/notifications", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/notifications", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/applications/webhooks" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/applications/webhooks" + ] } ], "components": { @@ -692,7 +597,19 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/applications/webhooks": "Access/update Webhooks." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/payment-experience_web_experience_profiles_v1.json b/openapi/payment-experience_web_experience_profiles_v1.json index 09bbc9e..9650474 100644 --- a/openapi/payment-experience_web_experience_profiles_v1.json +++ b/openapi/payment-experience_web_experience_profiles_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Payment Experience Web Profiles", "description": "Use the Payment Experience API to create seamless payment experience profiles. For information about how to create a PayPal payment with a web experience profile, see Web experience profiles.", @@ -50,9 +50,6 @@ { "$ref": "#/components/parameters/paypal_request_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -60,18 +57,6 @@ "requestBody": { "$ref": "#/components/requestBodies/web_profile" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "web-profiles" ] @@ -105,22 +90,7 @@ "$ref": "#/components/responses/default" } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -159,26 +129,11 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { "$ref": "#/components/requestBodies/web_profile" }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "web-profiles" ] @@ -209,9 +164,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -230,18 +182,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "web-profiles" ] @@ -279,25 +219,10 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "web-profiles" ] @@ -328,25 +253,10 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/payment" - ] - }, - { - "Oauth2": [ - "https://uri.paypal.com/services/payments/realtimepayment" - ] - } - ], "tags": [ "web-profiles" ] @@ -360,11 +270,38 @@ } ], "externalDocs": { - "url": "https://github.paypal.com/AppPlatform/payment-experience.WebExperienceProfilesSpecification/blob/master/v1/doc/USERGUIDE.md" + "url": "https://developer.paypal.com/docs/api/payment-experience/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/payment-experience" + "url": "https://api-m.sandbox.paypal.com/v1/payment-experience", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/notifications", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] } ], "components": { @@ -385,7 +322,20 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/payments/payment": "New special privileged scope available for payment and manage payment experience profiles. Available to internal clients only.", + "https://uri.paypal.com/services/payments/realtimepayment": "Permission to do any real-time payment and manage-payment experience profiles with support for sale, authorize, and order intents." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -409,22 +359,14 @@ "type": "string" } }, - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in the Authorization header with the Bearer authentication scheme. The value is Bearer <Access-Token> or Basic <client_id>:<secret>.", - "required": true, - "schema": { - "type": "string" - } - }, "content_type": { "name": "Content-Type", "in": "header", "description": "Required for operations with a request body. The value is application/. Where the 'format' is 'json'.", "required": true, "schema": { - "type": "string" + "type": "string", + "default": "application/json" } }, "id": { diff --git a/openapi/payments_payment_v1.json b/openapi/payments_payment_v1.json index e3cb6fe..cbc8dca 100644 --- a/openapi/payments_payment_v1.json +++ b/openapi/payments_payment_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Payments", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Use the Payments REST API to easily and securely accept online and mobile payments. The payments name space contains resource collections for payments, sales, refunds, authorizations, captures, and orders.
Important: The use of the PayPal REST /payments APIs to accept credit card payments is restricted. Instead, you can accept credit card payments with Braintree Direct.
You can enable customers to make PayPal and credit card payments with only a few clicks, depending on the country. You can accept an immediate payment or authorize a payment and capture it later. You can show details for completed payments, refunds, and authorizations. You can make full or partial refunds. You also can void or re-authorize authorizations. For more information, see the Payments overview.", @@ -47,27 +47,52 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/paymentcard" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/channelpartner" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/paymentcard" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/channelpartner" ] } @@ -123,27 +148,52 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/checkout/onetimepayment" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/checkout/onetimepayment" ] } @@ -180,22 +230,42 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -244,22 +314,42 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/channelpartner" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/channelpartner" ] } @@ -316,17 +406,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] } @@ -363,22 +468,42 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -441,22 +566,42 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/refund" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/unilateralrefund" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/refund" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/unilateralrefund" ] } @@ -498,22 +643,42 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -553,17 +718,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -613,17 +793,32 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -669,17 +864,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -721,22 +931,42 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -776,17 +1006,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -826,17 +1071,32 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -882,17 +1142,32 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -929,22 +1204,42 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/realtimepayment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/realtimepayment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -1007,22 +1302,42 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "sandbox": [ "https://uri.paypal.com/services/payments/refund" ] }, { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/unilateralrefund" + ] + }, + { + "production": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "production": [ + "https://uri.paypal.com/services/payments/refund" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/unilateralrefund" ] } @@ -1059,17 +1374,32 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://api.paypal.com/v1/payments/.*" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/payment" + ] + }, + { + "sandbox": [ + "https://uri.paypal.com/services/payments/refund" + ] + }, + { + "production": [ "https://api.paypal.com/v1/payments/.*" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/payment" ] }, { - "Oauth2": [ + "production": [ "https://uri.paypal.com/services/payments/refund" ] } @@ -1115,11 +1445,16 @@ } ], "externalDocs": { - "url": "/docs/checkout/" + "url": "https://developer.paypal.com/docs/api/payments/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/payments" + "url": "https://api-m.sandbox.paypal.com/v1/payments", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/payments", + "description": "PayPal Live Environment" } ], "components": { @@ -1154,7 +1489,28 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://api.paypal.com/v1/payments/.*": "Deprecated. Legacy payment scope. It will be replaced with new scopes", + "https://uri.paypal.com/services/payments/payment": "New special privileged scope available to do payment. This will be available to internal clients only", + "https://uri.paypal.com/services/payments/realtimepayment": "Permission to do any real time payment, with support for sale/authorize/order intents", + "https://uri.paypal.com/services/payments/payment/authcapture": "Permission to do non-real time payments like authorization on order or capture on authorization or an order ", + "https://uri.paypal.com/services/payments/refund": "Permission to initiate a refund/reversal on a sale or capture transaction", + "https://uri.paypal.com/services/payments/paymentcard": "Permission to do unbranded credit or debit card payments", + "https://uri.paypal.com/services/payments/futurepayments": "Permission for future or pre-approved payment.", + "https://uri.paypal.com/services/payments/channelpartner": "Permission to explicitly specify the receiver of a payment on request payload.", + "https://uri.paypal.com/services/payments/unilateralrefund": "This scope enables partners/facilitators to perform unilateralrefund and also refund.", + "https://uri.paypal.com/services/checkout/onetimepayment": "This scope enable buyer's checkout flow to load payment information." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/payments_payment_v2.json b/openapi/payments_payment_v2.json index 06d9c89..1211c77 100644 --- a/openapi/payments_payment_v2.json +++ b/openapi/payments_payment_v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Payments", "description": "Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview.", @@ -15,9 +15,6 @@ { "$ref": "#/components/parameters/authorization_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -89,7 +86,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -111,9 +113,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -233,7 +232,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -255,9 +259,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -377,7 +378,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -393,9 +399,6 @@ { "$ref": "#/components/parameters/authorization_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -527,7 +530,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -543,9 +551,6 @@ { "$ref": "#/components/parameters/capture_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -617,7 +622,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/payment/authcapture" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/payment/authcapture" ] } @@ -639,9 +649,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -788,7 +795,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/refund" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/refund" ] } @@ -804,9 +816,6 @@ { "$ref": "#/components/parameters/refund_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -885,7 +894,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/payments/refund" + ] + }, + { + "production": [ "https://uri.paypal.com/services/payments/refund" ] } @@ -924,16 +938,37 @@ } ], "externalDocs": { - "url": "/docs/checkout/" + "url": "https://developer.paypal.com/docs/api/payments/v2/" }, "servers": [ { - "url": "https://api-m.paypal.com/v2/payments" + "url": "https://api-m.sandbox.paypal.com/v2/payments", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v2/payments", + "description": "PayPal Live Environment" } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "OAuth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/payments/payment/authcapture": "Permission to do non-real time payments like capture on authorization", + "https://uri.paypal.com/services/payments/refund": "Permission to initiate a refund on a capture transaction", + "https://uri.paypal.com/services/payments/non-referenced-credit": "Permission to initiate non referenced credit", + "https://uri.paypal.com/services/payments/realtimepayment": "Permission to do any real time payment, with support for sale/authorize/order intents", + "https://uri.paypal.com/services/payments/reversepayment": "Permission to do any reverse payment" + } + } + } + }, + "production": { "type": "oauth2", "description": "OAuth 2.0 authentication", "flows": { @@ -973,15 +1008,6 @@ "default": "return=minimal" } }, - "authorization": { - "name": "Authorization", - "in": "header", - "description": "To make REST API calls, include the bearer token in the Authorization header with the Bearer authentication scheme. The value is Bearer <Access-Token> or Basic <client_id>:<secret>.", - "required": true, - "schema": { - "type": "string" - } - }, "content_type": { "name": "Content-Type", "in": "header", @@ -991,7 +1017,8 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$" + "pattern": "^[A-Za-z0-9/+-]+$", + "default": "application/json" } }, "authorization_id": { diff --git a/openapi/payments_payouts_batch_v1.json b/openapi/payments_payouts_batch_v1.json index 8231622..cf7bbbf 100644 --- a/openapi/payments_payouts_batch_v1.json +++ b/openapi/payments_payouts_batch_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Payouts", "description": "Use the Payouts API to make payments to multiple PayPal or Venmo recipients. The Payouts API is a fast, convenient way to send commissions, rebates, rewards, and general disbursements. You can send up to 15,000 payments per call. If you integrated the Payouts API before September 1, 2017, you receive transaction reports through Mass Payments Reporting. Otherwise, view reports from your PayPal Business account. The Payouts API uses the ISO 8601 Internet date and time format.", @@ -45,13 +45,6 @@ } } }, - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/payments/payouts" - ] - } - ], "tags": [ "payouts" ] @@ -94,13 +87,6 @@ "$ref": "#/components/parameters/total_required" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/payments/payouts" - ] - } - ], "tags": [ "payouts" ] @@ -131,13 +117,6 @@ "$ref": "#/components/parameters/payout_item_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/payments/payouts" - ] - } - ], "tags": [ "payouts-item" ] @@ -168,13 +147,6 @@ "$ref": "#/components/parameters/payout_item_id" } ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/payments/payouts" - ] - } - ], "tags": [ "payouts-item" ] @@ -200,16 +172,45 @@ } ], "externalDocs": { - "url": "/docs/payouts/" + "url": "https://developer.paypal.com/docs/api/payments.payouts-batch/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/payments" + "url": "https://api-m.sandbox.paypal.com/v1/payments", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/payments", + "description": "PayPal Live Environment" + } + ], + "security": [ + { + "sandbox": [ + "https://uri.paypal.com/payments/payouts" + ] + }, + { + "production": [ + "https://uri.paypal.com/payments/payouts" + ] } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/payments/payouts": "Payout to a list of recipients." + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/reporting_transactions_v1.json b/openapi/reporting_transactions_v1.json index fc82590..88d18b0 100644 --- a/openapi/reporting_transactions_v1.json +++ b/openapi/reporting_transactions_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "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 Partner with PayPal. For more information about the API, see the Transaction Search API Integration Guide.
Note: 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 Partner with PayPal.
", @@ -72,7 +72,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/reporting/search/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/reporting/search/read" ] } @@ -142,7 +147,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/reporting/balances/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/reporting/balances/read" ] } @@ -172,12 +182,30 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v1/reporting" + "url": "https://api-m.sandbox.paypal.com/v1/reporting", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/reporting", + "description": "PayPal Live Environment" } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/reporting/search/read": "Transactions Search", + "https://uri.paypal.com/services/reporting/balances/read": "List Balances" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { diff --git a/openapi/shipping_shipment_tracking_v1.json b/openapi/shipping_shipment_tracking_v1.json index 0b10151..6c396b0 100644 --- a/openapi/shipping_shipment_tracking_v1.json +++ b/openapi/shipping_shipment_tracking_v1.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Shipment Tracking", "description": "Merchants can use the PayPal Add Tracking API to manage tracking information. Merchants can add tracking numbers and associated information to PayPal. After adding these details to PayPal, merchants can:
  • Update tracking details.
  • Show tracking details.
  • Cancel tracking numbers.
For more information, see the Add Tracking API Overview and Add Tracking API Integration Guide.", @@ -38,17 +38,17 @@ "$ref": "#/components/responses/default" } }, - "parameters": [ - { - "$ref": "#/components/parameters/authorization" - } - ], "requestBody": { "$ref": "#/components/requestBodies/tracker_collection" }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/shipping/trackers/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/shipping/trackers/readwrite" ] } @@ -78,17 +78,17 @@ "$ref": "#/components/responses/default" } }, - "parameters": [ - { - "$ref": "#/components/parameters/authorization" - } - ], "requestBody": { "$ref": "#/components/requestBodies/tracker_collection" }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/shipping/trackers/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/shipping/trackers/readwrite" ] } @@ -117,9 +117,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/transaction_id" }, @@ -129,7 +126,12 @@ ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/shipping/trackers/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/shipping/trackers/read" ] } @@ -153,9 +155,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/id" } @@ -171,7 +170,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/shipping/trackers/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/shipping/trackers/readwrite" ] } @@ -205,16 +209,18 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/id" } ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/shipping/trackers/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/shipping/trackers/read" ] } @@ -248,11 +254,16 @@ } ], "externalDocs": { - "url": "/docs/tracking/" + "url": "https://developer.paypal.com/docs/api/tracking/v1/" }, "servers": [ { - "url": "https://api-m.paypal.com/v1/shipping" + "url": "https://api-m.sandbox.paypal.com/v1/shipping", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v1/shipping", + "description": "PayPal Production Environment" } ], "components": { @@ -273,7 +284,7 @@ } }, "securitySchemes": { - "Oauth2": { + "sandbox": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -285,17 +296,22 @@ } } } + }, + "production": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/shipping/trackers/readwrite": "Create or update tracking information", + "https://uri.paypal.com/services/shipping/trackers/read": "Retrieve tracking information" + } + } + } } }, "parameters": { - "authorization": { - "name": "Authorization", - "in": "header", - "description": "Bearer access token for authorization purpose.", - "schema": { - "type": "string" - } - }, "transaction_id": { "name": "transaction_id", "in": "query", diff --git a/openapi/vault_payment_tokens_v3.json b/openapi/vault_payment_tokens_v3.json index 53a4005..1261f3f 100644 --- a/openapi/vault_payment_tokens_v3.json +++ b/openapi/vault_payment_tokens_v3.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Payment Method Tokens", "description": "The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token.

The permanent token represents a payment method that's saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.

The Payment Method Tokens API is available in the US only.", @@ -97,9 +97,6 @@ { "$ref": "#/components/parameters/content_type" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -122,7 +119,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/readwrite" ] } @@ -198,16 +200,18 @@ { "$ref": "#/components/parameters/payment_source" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/readwrite" ] } @@ -278,16 +282,18 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/readwrite" ] } @@ -341,14 +347,16 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/readwrite" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/readwrite" ] } @@ -439,9 +447,6 @@ { "$ref": "#/components/parameters/content_type" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -464,7 +469,12 @@ }, "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/read" ] } @@ -535,16 +545,18 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } ], "security": [ { - "Oauth2": [ + "sandbox": [ + "https://uri.paypal.com/services/vault/payment-tokens/read" + ] + }, + { + "production": [ "https://uri.paypal.com/services/vault/payment-tokens/read" ] } @@ -574,12 +586,30 @@ }, "servers": [ { - "url": "https://api.paypal.com/v3/vault" + "url": "https://api.sandbox.paypal.com/v3/vault", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api.paypal.com/v3/vault", + "description": "PayPal Live Environment" } ], "components": { "securitySchemes": { - "Oauth2": { + "sandbox": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/vault/payment-tokens/readwrite": "Manage payment instruments", + "https://uri.paypal.com/services/vault/payment-tokens/read": "Permission to only read from vault" + } + } + } + }, + "production": { "type": "oauth2", "description": "Oauth 2.0 authentication", "flows": { @@ -603,16 +633,8 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$" - } - }, - "authorization": { - "name": "Authorization", - "description": "Contains the credentials to authenticate a user agent with a server.", - "in": "header", - "required": true, - "schema": { - "type": "string" + "pattern": "^[A-Za-z0-9/+-]+$", + "default": "application/json" } }, "paypal_request_id": { @@ -2518,7 +2540,7 @@ "payment_source": { "token": { "id": "5C991763VB2781612", - "type": "SETUP_TOKEN" + "type": "BILLING_AGREEMENT" } } }