From 6f8a0f13ff2aca372ec1087352e5a13eb5060600 Mon Sep 17 00:00:00 2001 From: sraj Date: Tue, 8 Aug 2023 16:20:22 -0700 Subject: [PATCH] Fixing schema for authentication issues in codegen (#5) --- .github/workflows/ci.yml | 12 +- README.md | 17 ++- openapi/billing_subscriptions_v1.json | 99 ++++------------ openapi/catalogs_products_v1.json | 41 +++---- openapi/checkout_orders_v1.json | 19 +-- openapi/checkout_orders_v2.json | 83 ++++++------- openapi/customer_disputes_v1.json | 110 +++++------------- openapi/customer_partner_referrals_v1.json | 21 ++-- openapi/customer_partner_referrals_v2.json | 16 ++- openapi/invoicing_v1.json | 43 ++++--- openapi/invoicing_v2.json | 41 ++++--- openapi/notifications_webhooks_v1.json | 35 +++--- ...experience_web_experience_profiles_v1.json | 47 +++----- openapi/payments_payment_v1.json | 45 +++---- openapi/payments_payment_v2.json | 60 +++------- openapi/payments_payouts_batch_v1.json | 21 ++-- openapi/reporting_transactions_v1.json | 15 ++- openapi/shipping_shipment_tracking_v1.json | 46 ++------ openapi/vault_payment_tokens_v3.json | 51 +++----- package.json | 2 +- 20 files changed, 330 insertions(+), 494 deletions(-) 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..73d8922 100644 --- a/openapi/billing_subscriptions_v1.json +++ b/openapi/billing_subscriptions_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.6" }, "paths": { - "/plans": { + "/v1/billing/plans": { "post": { "summary": "Create plan", "description": "Creates a plan that defines pricing and billing cycle details for subscriptions.", @@ -120,9 +120,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -249,9 +246,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -289,7 +283,7 @@ ] } }, - "/plans/{id}": { + "/v1/billing/plans/{id}": { "get": { "summary": "Show plan details", "description": "Shows details for a plan, by ID.", @@ -371,9 +365,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -503,9 +494,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -528,7 +516,7 @@ ] } }, - "/plans/{id}/activate": { + "/v1/billing/plans/{id}/activate": { "post": { "summary": "Activate plan", "description": "Activates a plan, by ID.", @@ -620,9 +608,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -642,7 +627,7 @@ ] } }, - "/plans/{id}/deactivate": { + "/v1/billing/plans/{id}/deactivate": { "post": { "summary": "Deactivate plan", "description": "Deactivates a plan, by ID.", @@ -734,9 +719,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -756,7 +738,7 @@ ] } }, - "/plans/{id}/update-pricing-schemes": { + "/v1/billing/plans/{id}/update-pricing-schemes": { "post": { "summary": "Update pricing", "description": "Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month.", @@ -865,9 +847,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -901,7 +880,7 @@ ] } }, - "/subscriptions": { + "/v1/billing/subscriptions": { "post": { "summary": "Create subscription", "description": "Creates a subscription.", @@ -1020,9 +999,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1059,7 +1035,7 @@ ] } }, - "/subscriptions/{id}": { + "/v1/billing/subscriptions/{id}": { "get": { "summary": "Show subscription details", "description": "Shows details for a subscription, by ID.", @@ -1141,9 +1117,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1273,9 +1246,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1298,7 +1268,7 @@ ] } }, - "/subscriptions/{id}/revise": { + "/v1/billing/subscriptions/{id}/revise": { "post": { "summary": "Revise plan or quantity of subscription", "description": "Updates the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount`, `shipping_address` values for the subscription. This type of update requires the buyer's consent.", @@ -1419,9 +1389,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1455,7 +1422,7 @@ ] } }, - "/subscriptions/{id}/suspend": { + "/v1/billing/subscriptions/{id}/suspend": { "post": { "summary": "Suspend subscription", "description": "Suspends the subscription.", @@ -1564,9 +1531,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1600,7 +1564,7 @@ ] } }, - "/subscriptions/{id}/cancel": { + "/v1/billing/subscriptions/{id}/cancel": { "post": { "summary": "Cancel subscription", "description": "Cancels the subscription.", @@ -1709,9 +1673,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1745,7 +1706,7 @@ ] } }, - "/subscriptions/{id}/activate": { + "/v1/billing/subscriptions/{id}/activate": { "post": { "summary": "Activate subscription", "description": "Activates the subscription.", @@ -1854,9 +1815,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -1890,7 +1848,7 @@ ] } }, - "/subscriptions/{id}/capture": { + "/v1/billing/subscriptions/{id}/capture": { "post": { "summary": "Capture authorized payment on subscription", "description": "Captures an authorized payment from the subscriber on the subscription.", @@ -2009,9 +1967,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -2048,7 +2003,7 @@ ] } }, - "/subscriptions/{id}/transactions": { + "/v1/billing/subscriptions/{id}/transactions": { "get": { "summary": "List transactions for subscription", "description": "Lists transactions for a subscription.", @@ -2147,9 +2102,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -2187,11 +2139,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -2217,7 +2174,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/subscriptions": "Manage plan & subscription" } @@ -2226,22 +2183,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..1cc3abb 100644 --- a/openapi/catalogs_products_v1.json +++ b/openapi/catalogs_products_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.0" }, "paths": { - "/products": { + "/v1/catalogs/products": { "post": { "summary": "Create product", "description": "Creates a product.", @@ -115,9 +115,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -234,9 +231,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -262,7 +256,7 @@ ] } }, - "/products/{product_id}": { + "/v1/catalogs/products/{product_id}": { "get": { "summary": "Show product details", "description": "Shows details for a product, by ID.", @@ -344,9 +338,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -473,9 +464,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -517,11 +505,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -531,7 +524,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/subscriptions": "Create and manage products" } @@ -540,22 +533,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..5d2846c 100644 --- a/openapi/checkout_orders_v1.json +++ b/openapi/checkout_orders_v1.json @@ -1,12 +1,12 @@ { - "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.
", "version": "1.1" }, "paths": { - "/orders": { + "/v1/checkout/orders": { "post": { "summary": "Create order", "description": "Creates an order.", @@ -61,7 +61,7 @@ ] } }, - "/orders/{order_id}": { + "/v1/checkout/orders/{order_id}": { "get": { "summary": "Show order details", "description": "Shows details for an order, by ID.", @@ -130,7 +130,7 @@ ] } }, - "/orders/{order_id}/pay": { + "/v1/checkout/orders/{order_id}/pay": { "post": { "summary": "Pay for order", "description": "Initiates a PayPal payment that a buyer has approved.
Note: For Partner use cases, use the disbursement_mode to indicate whether to disburse funds to the seller and partner accounts immediately or later. If you delay disbursement, you must call disburse funds to disburse funds to the merchant and partner.
", @@ -216,11 +216,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -230,7 +235,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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.", diff --git a/openapi/checkout_orders_v2.json b/openapi/checkout_orders_v2.json index a65783a..5158f43 100644 --- a/openapi/checkout_orders_v2.json +++ b/openapi/checkout_orders_v2.json @@ -1,12 +1,12 @@ { - "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.", "version": "2.13" }, "paths": { - "/orders": { + "/v2/checkout/orders": { "post": { "summary": "Create order", "description": "Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
", @@ -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" } @@ -135,7 +137,7 @@ ] } }, - "/orders/{id}": { + "/v2/checkout/orders/{id}": { "get": { "summary": "Show order details", "description": "Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
", @@ -193,9 +195,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -299,9 +298,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -322,7 +318,7 @@ ] } }, - "/orders/{id}/confirm-payment-source": { + "/v2/checkout/orders/{id}/confirm-payment-source": { "post": { "summary": "Confirm the Order", "description": "Payer confirms their intent to pay for the the Order with the given payment source.", @@ -410,9 +406,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -447,7 +440,7 @@ ] } }, - "/orders/{id}/authorize": { + "/v2/checkout/orders/{id}/authorize": { "post": { "summary": "Authorize payment for order", "description": "Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
", @@ -585,9 +578,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -617,7 +607,7 @@ ] } }, - "/orders/{id}/capture": { + "/v2/checkout/orders/{id}/capture": { "post": { "summary": "Capture payment for order", "description": "Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
", @@ -755,9 +745,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -787,7 +774,7 @@ ] } }, - "/orders/{id}/track": { + "/v2/checkout/orders/{id}/track": { "post": { "summary": "Add tracking information for an Order.", "description": "Adds tracking information for an Order.", @@ -899,9 +886,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_auth_assertion" }, @@ -931,7 +915,7 @@ ] } }, - "/orders/{id}/trackers/{tracker_id}": { + "/v2/checkout/orders/{id}/trackers/{tracker_id}": { "patch": { "summary": "Update or cancel tracking information for a PayPal order", "description": "Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
", @@ -1029,9 +1013,6 @@ { "$ref": "#/components/parameters/tracker_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -1063,11 +1044,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -1093,7 +1079,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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", @@ -1149,15 +1135,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 +1143,8 @@ "schema": { "type": "string", "minLength": 1, - "maxLength": 255 + "maxLength": 255, + "default": "application/json" } }, "id": { @@ -14169,6 +14147,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 +14181,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..931f402 100644 --- a/openapi/customer_disputes_v1.json +++ b/openapi/customer_disputes_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.10" }, "paths": { - "/disputes": { + "/v1/customer/disputes": { "get": { "summary": "List disputes", "description": "Lists disputes with a summary set of details, which shows the dispute_id, reason, status, dispute_state, dispute_life_cycle_stage, dispute_channel, dispute_amount, create_time and update_time fields.

To filter the disputes in the response, specify one or more optional query parameters. To limit the number of disputes in the response, specify the page_size query parameter.

To list multiple disputes, set these query parameters in the request:
  • page_size=2
  • start_time instead of disputed_transaction_id

If the response contains more than two disputes, it lists two disputes and includes a HATEOAS link to the next page of results.", @@ -37,9 +37,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/start_time" }, @@ -106,7 +103,7 @@ ] } }, - "/disputes/{id}": { + "/v1/customer/disputes/{id}": { "get": { "summary": "Show dispute details", "description": "Shows details for a dispute, by ID.
Note: The fields that appear in the response depend on the access. For example, if the merchant requests shows dispute details, the customer's email ID does not appear.
", @@ -139,9 +136,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/authorization" } ], "security": [ @@ -233,9 +227,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -253,7 +244,7 @@ ] } }, - "/disputes/{id}/provide-evidence": { + "/v1/customer/disputes/{id}/provide-evidence": { "post": { "summary": "Provide evidence", "description": "Provides evidence for a dispute, by ID. A merchant can provide evidence for disputes with the WAITING_FOR_SELLER_RESPONSE status while customers can provide evidence for disputes with the WAITING_FOR_BUYER_RESPONSE status. Evidence can be a proof of delivery or proof of refund document or notes, which can include logs. A proof of delivery document includes a tracking number while a proof of refund document includes a refund ID. For other evidence type, notes and documents can be given. Evidences requested from you can be found by checking the type of evidence for the corresponding source under the evidence section of the show dispute details response. The source will be REQUESTED_FROM_SELLER for evidences requested from the merchant while it will be REQUESTED_FROM_BUYER for evidences requested from the customer. For constraints and rules regarding documents, see documents.
To make this request, specify the evidence in the JSON request body and use the provide-evidence link in the HATEOAS links of the show dispute details response. In case the link is not present in the response, you can't provide evidence for the dispute. For information about dispute reasons, see dispute reasons.", @@ -289,9 +280,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -319,7 +307,7 @@ ] } }, - "/disputes/{id}/appeal": { + "/v1/customer/disputes/{id}/appeal": { "post": { "summary": "Appeal dispute", "description": "Appeals a dispute, by ID. To appeal a dispute, use the appeal link in the HATEOAS links from the show dispute details response. If this link does not appear, you cannot appeal the dispute. Submit new evidence as a document or notes in the JSON request body. For constraints and rules regarding documents, see documents.
To make this request, specify the dispute ID in the URI and specify the evidence in the JSON request body. For information about dispute reasons, see dispute reasons.", @@ -355,9 +343,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -380,7 +365,7 @@ ] } }, - "/disputes/{id}/accept-claim": { + "/v1/customer/disputes/{id}/accept-claim": { "post": { "summary": "Accept claim", "description": "Accepts liability for a claim, by ID. When you accept liability for a claim, the dispute closes in the customer’s favor and PayPal automatically refunds money to the customer from the merchant's account. Allowed accept_claim_type values for the request is available in dispute details allowed response options object.", @@ -416,9 +401,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -449,7 +431,7 @@ ] } }, - "/disputes/{id}/adjudicate": { + "/v1/customer/disputes/{id}/adjudicate": { "post": { "summary": "Settle dispute", "description": "
Important: This method is for sandbox use only.
Settles a dispute in either the customer's or merchant's favor. Merchants can make this call in the sandbox to complete end-to-end dispute resolution testing, which mimics the dispute resolution that PayPal agents normally complete. To make this call, the dispute status must be UNDER_REVIEW and adjudicate link should be available in the HATEOAS links of the show dispute details response.", @@ -505,9 +487,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -556,7 +535,7 @@ ] } }, - "/disputes/{id}/require-evidence": { + "/v1/customer/disputes/{id}/require-evidence": { "post": { "summary": "Update dispute status", "description": "
Important: This method is for sandbox use only.
Updates the status of a dispute, by ID, from UNDER_REVIEW to either:
  • WAITING_FOR_BUYER_RESPONSE
  • WAITING_FOR_SELLER_RESPONSE
This status change enables either the customer or merchant to submit evidence for the dispute. To make this call, the dispute status must be UNDER_REVIEW and require-evidence link should be available in the HATEOAS links of the show dispute details response. Specify an action value in the JSON request body to indicate whether the status change enables the customer or merchant to submit evidence:
If action isThe status updates to
BUYER_EVIDENCE WAITING_FOR_BUYER_RESPONSE
SELLER_EVIDENCE WAITING_FOR_SELLER_RESPONSE
.", @@ -612,9 +591,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -664,7 +640,7 @@ ] } }, - "/disputes/{id}/escalate": { + "/v1/customer/disputes/{id}/escalate": { "post": { "summary": "Escalate dispute to claim", "description": "Escalates the dispute, by ID, to a PayPal claim. To make this call, the stage in the dispute lifecycle must be `INQUIRY`.", @@ -720,9 +696,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -771,7 +744,7 @@ ] } }, - "/disputes/{id}/send-message": { + "/v1/customer/disputes/{id}/send-message": { "post": { "summary": "Send message about dispute to other party", "description": "Sends a message about a dispute, by ID, to the other party in the dispute. Merchants and customers can only send messages if the `dispute_life_cycle_stage` value is `INQUIRY`. For constraints and rules regarding documents that can be attached as part of the message, see documents. To send a message, use the send-message link in the HATEOAS links of the show dispute details response and specify the message in the JSON request body. In case the link is not present in the response you can't send a message on the dispute.", @@ -827,9 +800,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -865,7 +835,7 @@ ] } }, - "/disputes/{id}/make-offer": { + "/v1/customer/disputes/{id}/make-offer": { "post": { "summary": "Make offer to resolve dispute", "description": "Makes an offer to the other party to resolve a dispute, by ID. To make this call, the stage in the dispute lifecycle must be `INQUIRY`. If the customer accepts the offer, PayPal automatically makes a refund. Allowed offer_type values for the request is available in dispute details allowed response options object.", @@ -921,9 +891,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -972,7 +939,7 @@ ] } }, - "/disputes/{id}/accept-offer": { + "/v1/customer/disputes/{id}/accept-offer": { "post": { "summary": "Accept offer to resolve dispute", "description": "The customer accepts the offer from merchant to resolve a dispute, by ID. PayPal automatically refunds the amount proposed by merchant to the customer.", @@ -1038,9 +1005,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1084,7 +1048,7 @@ ] } }, - "/disputes/{id}/deny-offer": { + "/v1/customer/disputes/{id}/deny-offer": { "post": { "summary": "Deny offer to resolve dispute", "description": "Denies an offer that the merchant proposes for a dispute, by ID.", @@ -1140,9 +1104,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1186,7 +1147,7 @@ ] } }, - "/disputes/{id}/acknowledge-return-item": { + "/v1/customer/disputes/{id}/acknowledge-return-item": { "post": { "summary": "Acknowledge returned item", "description": "Acknowledges that the customer returned an item for a dispute, by ID. A merchant can make this request for disputes with the `MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED` reason. Allowed acknowledgement_type values for the request is available in dispute details allowed response options object. For constraints and rules regarding documents, see documents.", @@ -1242,9 +1203,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1275,7 +1233,7 @@ ] } }, - "/disputes/{id}/provide-supporting-info": { + "/v1/customer/disputes/{id}/provide-supporting-info": { "post": { "summary": "Provide supporting information for dispute", "description": "Provides supporting information for a dispute, by ID. A merchant or buyer can make this request for disputes if they find the `provide-supporting-info` link in the HATEOAS links in the list disputes response. The party can provide the supporting information to PayPal to defend themselves only when the `dispute_life_cycle_stage` is `CHARGEBACK`, `PRE_ARBITRATION`, or `ARBITRATION`. They can provide a note that describes their part with details or upload any supporting documents to support their side. For constraints and rules regarding documents, see documents.
To make this request, specify the dispute ID in the URI and specify the notes in the JSON request body. This method differs from the provide evidence method which supports only multipart request, where PayPal asks the concerned party for evidence.", @@ -1341,9 +1299,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -1428,11 +1383,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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -1489,7 +1449,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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.", @@ -1508,17 +1468,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 +1628,8 @@ "type": "string", "minLength": 1, "maxLength": 255, - "pattern": "\\w+\\/[-+.\\w]+" + "pattern": "\\w+\\/[-+.\\w]+", + "default": "application/json" } }, "id": { @@ -3068,7 +3018,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 +3056,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 +4922,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 +4969,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 +5113,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..7e7c9ec 100644 --- a/openapi/customer_partner_referrals_v1.json +++ b/openapi/customer_partner_referrals_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.4" }, "paths": { - "/partner-referrals": { + "/v1/customer/partner-referrals": { "post": { "summary": "Create partner referral", "description": "Creates a partner referral that is shared by the API caller. The referrals contains the client's personal, business, and financial data.", @@ -53,7 +53,7 @@ ] } }, - "/partner-referrals/{partner_referral_id}": { + "/v1/customer/partner-referrals/{partner_referral_id}": { "get": { "summary": "Show referral data", "description": "Shows details for referral data, by ID, that was shared by the API caller.", @@ -95,7 +95,7 @@ ] } }, - "/partners/{partner_id}/merchant-integrations": { + "/v1/customer/partners/{partner_id}/merchant-integrations": { "get": { "summary": "List seller tracking information", "description": "Lists sellers that a partner onboarded, by partner ID.", @@ -128,7 +128,7 @@ ] } }, - "/partners/{partner_id}/merchant-integrations/{merchant_id}": { + "/v1/customer/partners/{partner_id}/merchant-integrations/{merchant_id}": { "get": { "summary": "Show seller status", "description": "Shows status information for sellers that the partner on-boards, by partner ID.", @@ -171,7 +171,7 @@ ] } }, - "/partners/{partner_id}/merchant-integrations/credentials": { + "/v1/customer/partners/{partner_id}/merchant-integrations/credentials": { "get": { "summary": "Fetch merchant credentials", "description": "Fetches merchant credentials for a merchant onboarded through downloadable cart flow.", @@ -232,7 +232,12 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v1/customer" + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -242,7 +247,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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", diff --git a/openapi/customer_partner_referrals_v2.json b/openapi/customer_partner_referrals_v2.json index a85fb02..c93c9f3 100644 --- a/openapi/customer_partner_referrals_v2.json +++ b/openapi/customer_partner_referrals_v2.json @@ -1,12 +1,12 @@ { - "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.", "version": "2.4" }, "paths": { - "/partner-referrals": { + "/v2/customer/partner-referrals": { "post": { "summary": "Create partner referral", "description": "Creates a partner referral that is shared by the API caller. The referrals contains the client's personal, business, financial and operations that the partner wants to onboard the client.", @@ -126,7 +126,7 @@ ] } }, - "/partner-referrals/{partner_referral_id}": { + "/v2/customer/partner-referrals/{partner_referral_id}": { "get": { "summary": "Show referral data", "description": "Shows details for referral data, by ID, that was shared by the API caller.", @@ -229,7 +229,12 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v2/customer" + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -239,7 +244,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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", @@ -2134,7 +2139,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..eb75cfe 100644 --- a/openapi/invoicing_v1.json +++ b/openapi/invoicing_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.11" }, "paths": { - "/invoices": { + "/v1/invoicing/invoices": { "post": { "summary": "Create draft invoice", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Creates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice.

In the JSON request body, include invoice details including merchant information. The invoice object must include an items array.
Note: The merchant that you specify in an invoice must have a PayPal account in good standing.
.", @@ -82,7 +82,7 @@ ] } }, - "/search": { + "/v1/invoicing/search": { "post": { "summary": "Search for invoices", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Searches for invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria.", @@ -123,7 +123,7 @@ ] } }, - "/invoices/{invoice_id}/send": { + "/v1/invoicing/invoices/{invoice_id}/send": { "post": { "summary": "Send invoice", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Sends an invoice, by ID, to a customer. To suppress the merchant's email notification, set the `notify_merchant` query parameter to `false`.
Note: After you send an invoice, you cannot resend it.
", @@ -156,7 +156,7 @@ ] } }, - "/invoices/{invoice_id}/schedule": { + "/v1/invoicing/invoices/{invoice_id}/schedule": { "post": { "summary": "Schedule invoice", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Schedules an invoice, by ID, to send on a future date. At 07:00 on that date in the preferred time zone of the merchant's PayPal account profile, PayPal emails an invoice notification to the merchant and the customer, adds an online payment button to the customer’s view of the invoice, and updates the invoice status to SENT.
Note: To change the scheduled date, adjust the invoice date and update invoice. To send the invoice immediately, update the invoice date to today or to a date in the past.
", @@ -186,7 +186,7 @@ ] } }, - "/invoices/{invoice_id}/remind": { + "/v1/invoicing/invoices/{invoice_id}/remind": { "post": { "summary": "Send invoice reminder", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a `notification` object that defines the subject of the reminder and other details.", @@ -225,7 +225,7 @@ ] } }, - "/invoices/{invoice_id}/cancel": { + "/v1/invoicing/invoices/{invoice_id}/cancel": { "post": { "summary": "Cancel sent invoice", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.", @@ -264,7 +264,7 @@ ] } }, - "/invoices/{invoice_id}/record-payment": { + "/v1/invoicing/invoices/{invoice_id}/record-payment": { "post": { "summary": "Mark invoice as paid", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Marks the status of an invoice, by ID, as paid.", @@ -303,7 +303,7 @@ ] } }, - "/invoices/{invoice_id}/record-refund": { + "/v1/invoicing/invoices/{invoice_id}/record-refund": { "post": { "summary": "Mark invoice as refunded", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Marks the status of an invoice, by ID, as refunded.", @@ -342,7 +342,7 @@ ] } }, - "/invoices/{invoice_id}": { + "/v1/invoicing/invoices/{invoice_id}": { "get": { "summary": "Show invoice details", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Shows details for an invoice, by ID.", @@ -448,7 +448,7 @@ ] } }, - "/invoices/{invoice_id}/payment-records/{transaction_id}": { + "/v1/invoicing/invoices/{invoice_id}/payment-records/{transaction_id}": { "delete": { "summary": "Delete external payment", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Deletes an external payment, by invoice ID and transaction ID.", @@ -481,7 +481,7 @@ ] } }, - "/invoices/{invoice_id}/refund-records/{transaction_id}": { + "/v1/invoicing/invoices/{invoice_id}/refund-records/{transaction_id}": { "delete": { "summary": "Delete external refund", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Deletes an external refund, by invoice ID and transaction ID.", @@ -514,7 +514,7 @@ ] } }, - "/invoices/{invoice_id}/qr-code": { + "/v1/invoicing/invoices/{invoice_id}/qr-code": { "get": { "summary": "Generate QR code", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Generates a QR code for an invoice, by ID. The QR code is a PNG image in Base64-encoded format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must create an invoice and send an invoice to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.", @@ -557,7 +557,7 @@ ] } }, - "/invoices/next-invoice-number": { + "/v1/invoicing/invoices/next-invoice-number": { "post": { "summary": "Generate invoice number", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after `INVOICE-1234` is `INVOICE-1235`.", @@ -589,7 +589,7 @@ ] } }, - "/templates": { + "/v1/invoicing/templates": { "post": { "summary": "Create template", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Creates an invoice template. You can use details from this template to create an invoice. You can create up to 50 templates.
Note: Every merchant starts with three PayPal system templates that are optimized for the unit type billed. The template includes `Quantity`, `Hours`, and `Amount`.
", @@ -659,7 +659,7 @@ ] } }, - "/templates/{template_id}": { + "/v1/invoicing/templates/{template_id}": { "get": { "summary": "Show template details", "description": "
Deprecation notice: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
Shows details for a template, by ID.", @@ -790,11 +790,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -824,7 +829,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/invoicing": "Manage invoice resource." } diff --git a/openapi/invoicing_v2.json b/openapi/invoicing_v2.json index 75a7331..cf5682d 100644 --- a/openapi/invoicing_v2.json +++ b/openapi/invoicing_v2.json @@ -1,12 +1,12 @@ { - "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.", "version": "2.3" }, "paths": { - "/invoices": { + "/v2/invoicing/invoices": { "post": { "summary": "Create draft invoice", "description": "Creates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice.

In the JSON request body, include invoice details including merchant information. The invoice object must include an items array.
Note: The merchant that you specify in an invoice must have a PayPal account in good standing.
.", @@ -230,7 +230,7 @@ ] } }, - "/invoices/{invoice_id}/send": { + "/v2/invoicing/invoices/{invoice_id}/send": { "post": { "summary": "Send invoice", "description": "Sends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:
  • If the invoice issue date is current or in the past, sends the invoice immediately.
  • If the invoice issue date is in the future, schedules the invoice to be sent on that date.
To suppress the merchant's email notification, set the `send_to_invoicer` body parameter to `false`. To send the invoice through a share link and not through PayPal, set the send_to_recipient parameter to false in the notification object. The send_to_recipient parameter does not apply to a future issue date because the invoice is scheduled to be sent through PayPal on that date.
Notes:
  • After you send an invoice, resending it has no effect.
  • To send a notification for updates, update the invoice and set the send_to_recipient body parameter to true.
", @@ -362,7 +362,7 @@ ] } }, - "/invoices/{invoice_id}/remind": { + "/v2/invoicing/invoices/{invoice_id}/remind": { "post": { "summary": "Send invoice reminder", "description": "Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a `notification` object that defines the subject of the reminder and other details.", @@ -509,7 +509,7 @@ ] } }, - "/invoices/{invoice_id}/cancel": { + "/v2/invoicing/invoices/{invoice_id}/cancel": { "post": { "summary": "Cancel sent invoice", "description": "Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.", @@ -616,7 +616,7 @@ ] } }, - "/invoices/{invoice_id}/payments": { + "/v2/invoicing/invoices/{invoice_id}/payments": { "post": { "summary": "Record payment for invoice", "description": "Records a payment for the invoice. If no payment is due, the invoice is marked as `PAID`. Otherwise, the invoice is marked as `PARTIALLY PAID`.", @@ -776,7 +776,7 @@ ] } }, - "/invoices/{invoice_id}/payments/{transaction_id}": { + "/v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}": { "delete": { "summary": "Delete external payment", "description": "Deletes an external payment, by invoice ID and transaction ID.", @@ -853,7 +853,7 @@ ] } }, - "/invoices/{invoice_id}/refunds": { + "/v2/invoicing/invoices/{invoice_id}/refunds": { "post": { "summary": "Record refund for invoice", "description": "Records a refund for the invoice. If all payments are refunded, the invoice is marked as `REFUNDED`. Otherwise, the invoice is marked as `PARTIALLY REFUNDED`.", @@ -1013,7 +1013,7 @@ ] } }, - "/invoices/{invoice_id}/refunds/{transaction_id}": { + "/v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}": { "delete": { "summary": "Delete external refund", "description": "Deletes an external refund, by invoice ID and transaction ID.", @@ -1090,7 +1090,7 @@ ] } }, - "/invoices/{invoice_id}/generate-qr-code": { + "/v2/invoicing/invoices/{invoice_id}/generate-qr-code": { "post": { "summary": "Generate QR code", "description": "Generates a QR code for an invoice, by ID. The QR code is a PNG image in Base64-encoded format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must create an invoice and send an invoice to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.", @@ -1179,7 +1179,7 @@ ] } }, - "/generate-next-invoice-number": { + "/v2/invoicing/generate-next-invoice-number": { "post": { "summary": "Generate invoice number", "description": "Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after `INVOICE-1234` is `INVOICE-1235`.", @@ -1221,7 +1221,7 @@ ] } }, - "/invoices/{invoice_id}": { + "/v2/invoicing/invoices/{invoice_id}": { "get": { "summary": "Show invoice details", "description": "Shows details for an invoice, by ID.", @@ -1529,7 +1529,7 @@ ] } }, - "/search-invoices": { + "/v2/invoicing/search-invoices": { "post": { "summary": "Search for invoices", "description": "Searches for and lists invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria.", @@ -1636,7 +1636,7 @@ ] } }, - "/templates": { + "/v2/invoicing/templates": { "get": { "summary": "List templates", "description": "Lists merchant-created templates with associated details. The associated details include the emails, addresses, and phone numbers from the user's PayPal profile.
The user can select which values to show in the business information section of their template.", @@ -1831,7 +1831,7 @@ ] } }, - "/templates/{template_id}": { + "/v2/invoicing/templates/{template_id}": { "get": { "summary": "Show template details", "description": "Shows details for a template, by ID.", @@ -2154,11 +2154,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -2168,7 +2173,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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.", diff --git a/openapi/notifications_webhooks_v1.json b/openapi/notifications_webhooks_v1.json index bbf2ccc..6408a91 100644 --- a/openapi/notifications_webhooks_v1.json +++ b/openapi/notifications_webhooks_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.11" }, "paths": { - "/webhooks": { + "/v1/notifications/webhooks": { "post": { "summary": "Create webhook", "description": "Subscribes your webhook listener to events.", @@ -87,7 +87,7 @@ ] } }, - "/webhooks/{webhook_id}": { + "/v1/notifications/webhooks/{webhook_id}": { "get": { "summary": "Show webhook details", "description": "Shows details for a webhook, by ID.", @@ -190,7 +190,7 @@ ] } }, - "/webhooks/{webhook_id}/event-types": { + "/v1/notifications/webhooks/{webhook_id}/event-types": { "get": { "summary": "List event subscriptions for webhook", "description": "Lists event subscriptions for a webhook, by ID.", @@ -227,7 +227,7 @@ ] } }, - "/webhooks-lookup": { + "/v1/notifications/webhooks-lookup": { "post": { "summary": "Create webhook lookup", "description": "Creates a webhook lookup.", @@ -289,7 +289,7 @@ ] } }, - "/webhooks-lookup/{webhook_lookup_id}": { + "/v1/notifications/webhooks-lookup/{webhook_lookup_id}": { "get": { "summary": "Show webhook lookup details", "description": "Shows details for a webhook lookup, by ID.", @@ -354,7 +354,7 @@ ] } }, - "/verify-webhook-signature": { + "/v1/notifications/verify-webhook-signature": { "post": { "summary": "Verify webhook signature", "description": "Verifies a webhook signature.", @@ -400,7 +400,7 @@ ] } }, - "/webhooks-event-types": { + "/v1/notifications/webhooks-event-types": { "get": { "summary": "List available events", "description": "Lists available events to which any webhook can subscribe. For a list of supported events, see [Webhook event names](/docs/api/notifications/webhooks/event-names/).", @@ -432,7 +432,7 @@ ] } }, - "/webhooks-events": { + "/v1/notifications/webhooks-events": { "get": { "summary": "List event notifications", "description": "Lists webhooks event notifications. Use query parameters to filter the response.", @@ -481,7 +481,7 @@ ] } }, - "/webhooks-events/{event_id}": { + "/v1/notifications/webhooks-events/{event_id}": { "get": { "summary": "Show event notification details", "description": "Shows details for a webhooks event notification, by ID.", @@ -518,7 +518,7 @@ ] } }, - "/webhooks-events/{event_id}/resend": { + "/v1/notifications/webhooks-events/{event_id}/resend": { "post": { "summary": "Resend event notification", "description": "Resends a webhook event notification, by ID. Any pending notifications are not resent.", @@ -569,7 +569,7 @@ ] } }, - "/simulate-event": { + "/v1/notifications/simulate-event": { "post": { "summary": "Simulate webhook event", "description": "Simulates a webhook event. In the JSON request body, specify a sample payload.
You need to subscribe to the following webhook events for Pay upon Invoice:
EventTrigger
PAYMENT.CAPTURE.COMPLETEDA payment capture completes.
PAYMENT.CAPTURE.DENIEDA payment capture is denied.
CHECKOUT.PAYMENT-APPROVAL.REVERSEDPayPal reverses a payment capture.
", @@ -667,11 +667,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -697,7 +702,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/applications/webhooks": "Access/update Webhooks." } diff --git a/openapi/payment-experience_web_experience_profiles_v1.json b/openapi/payment-experience_web_experience_profiles_v1.json index 09bbc9e..894e8c9 100644 --- a/openapi/payment-experience_web_experience_profiles_v1.json +++ b/openapi/payment-experience_web_experience_profiles_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.3" }, "paths": { - "/web-profiles": { + "/v1/payment-experience/web-profiles": { "post": { "summary": "Create web experience profile", "description": "Creates a web experience profile. In the JSON request body, specify the profile name and details.", @@ -50,9 +50,6 @@ { "$ref": "#/components/parameters/paypal_request_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -118,9 +115,6 @@ } ], "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -130,7 +124,7 @@ ] } }, - "/web-profiles/{id}": { + "/v1/payment-experience/web-profiles/{id}": { "put": { "summary": "Update web experience profile", "description": "Updates a web experience profile, by ID. In the JSON request body, specify the profile details. If your request omits any profile parameters, any previously set values for those parameters are removed.", @@ -159,9 +153,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "requestBody": { @@ -209,9 +200,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -279,9 +267,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -328,9 +313,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -360,11 +342,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -390,7 +377,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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." @@ -409,22 +396,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..a67625f 100644 --- a/openapi/payments_payment_v1.json +++ b/openapi/payments_payment_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.12" }, "paths": { - "/payment": { + "/v1/payments/payment": { "post": { "summary": "Create payment", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Creates a sale, an authorized payment to be captured later, or an order. To create a sale, authorization, or order, include the payment details in the JSON request body. Set the intent to sale, authorize, or order.
Note: TPP Clients (Third Party Providers in the context of PSD2 regulation) are restricted from using authorize and order intents.
Include payer, transaction details, and, for PayPal payments only, redirect URLs. The combination of the payment_method and funding_instrument determines the type of payment that is created. For more information, see Payments REST API.", @@ -153,7 +153,7 @@ ] } }, - "/payment/{payment_id}": { + "/v1/payments/payment/{payment_id}": { "get": { "summary": "Show payment details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for a payment, by ID, that has yet to complete. For example, shows details for a payment that was created, approved, or failed.", @@ -269,7 +269,7 @@ ] } }, - "/payment/{payment_id}/execute": { + "/v1/payments/payment/{payment_id}/execute": { "post": { "summary": "Execute approved PayPal payment", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Executes a PayPal payment that the customer has approved. You can optionally update one or more transactions when you execute the payment.
Important: This call works only after a customer has approved the payment. For more information, learn about PayPal payments.
", @@ -336,7 +336,7 @@ ] } }, - "/sale/{sale_id}": { + "/v1/payments/sale/{sale_id}": { "get": { "summary": "Show sale details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for a sale, by ID. Returns only sales that were created through the REST API.", @@ -388,7 +388,7 @@ ] } }, - "/sale/{sale_id}/refund": { + "/v1/payments/sale/{sale_id}/refund": { "post": { "summary": "Refund sale", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Refunds a sale, by ID. For a full refund, do not include the amount object in the JSON request body. For a partial refund, include an amount object in the JSON request body.", @@ -466,7 +466,7 @@ ] } }, - "/authorization/{authorization_id}": { + "/v1/payments/authorization/{authorization_id}": { "get": { "summary": "Show authorization details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for an authorization, by ID.", @@ -523,7 +523,7 @@ ] } }, - "/authorization/{authorization_id}/capture": { + "/v1/payments/authorization/{authorization_id}/capture": { "post": { "summary": "Capture authorization", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Captures and processes an authorization, by ID. The original payment call must specify an intent of authorize.", @@ -573,7 +573,7 @@ ] } }, - "/authorization/{authorization_id}/void": { + "/v1/payments/authorization/{authorization_id}/void": { "post": { "summary": "Void authorization", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.", @@ -633,7 +633,7 @@ ] } }, - "/authorization/{authorization_id}/reauthorize": { + "/v1/payments/authorization/{authorization_id}/reauthorize": { "post": { "summary": "Re-authorize payment", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Re-authorizes a PayPal account payment, by authorization ID. To ensure that funds are still available, re-authorize a payment after the initial three-day honor period. Supports only the amount request parameter. You can re-authorize a payment only once from four to 29 days after three-day honor period for the original authorization expires. If 30 days have passed from the original authorization, you must create a new authorization instead. A re-authorized payment itself has a new three-day honor period. You can re-authorize a transaction once for up to 115% of the originally authorized amount, not to exceed an increase of $75 USD.", @@ -689,7 +689,7 @@ ] } }, - "/orders/{order_id}": { + "/v1/payments/orders/{order_id}": { "get": { "summary": "Show order details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for an order, by ID.", @@ -746,7 +746,7 @@ ] } }, - "/orders/{order_id}/capture": { + "/v1/payments/orders/{order_id}/capture": { "post": { "summary": "Capture order", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Captures a payment for an order, by ID. To use this call, the original payment call must specify an order intent. In the JSON request body, include the payment amount and indicate whether this capture is the final capture for the authorization.", @@ -796,7 +796,7 @@ ] } }, - "/orders/{order_id}/do-void": { + "/v1/payments/orders/{order_id}/do-void": { "post": { "summary": "Void order", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Voids, or cancels, an order, by ID. You can only void orders that are either in the PENDING or AUTHORIZED states or those in the CAPTURED state that are not fully captured.", @@ -846,7 +846,7 @@ ] } }, - "/orders/{order_id}/authorize": { + "/v1/payments/orders/{order_id}/authorize": { "post": { "summary": "Authorize order", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Authorizes an order, by ID. In the JSON request body, include an amount object.", @@ -902,7 +902,7 @@ ] } }, - "/capture/{capture_id}": { + "/v1/payments/capture/{capture_id}": { "get": { "summary": "Show captured payment details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for a captured payment, by ID.", @@ -954,7 +954,7 @@ ] } }, - "/capture/{capture_id}/refund": { + "/v1/payments/capture/{capture_id}/refund": { "post": { "summary": "Refund captured payment", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Refunds a captured payment, by ID. In the JSON request body, include an amount object.", @@ -1032,7 +1032,7 @@ ] } }, - "/refund/{refund_id}": { + "/v1/payments/refund/{refund_id}": { "get": { "summary": "Show refund details", "description": "
Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
Shows details for a refund, by ID.", @@ -1115,11 +1115,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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -1159,7 +1164,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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", diff --git a/openapi/payments_payment_v2.json b/openapi/payments_payment_v2.json index 06d9c89..f443759 100644 --- a/openapi/payments_payment_v2.json +++ b/openapi/payments_payment_v2.json @@ -1,12 +1,12 @@ { - "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.", "version": "2.4" }, "paths": { - "/authorizations/{authorization_id}": { + "/v2/payments/authorizations/{authorization_id}": { "get": { "summary": "Show details for authorized payment", "description": "Shows details for an authorized payment, by ID.", @@ -15,9 +15,6 @@ { "$ref": "#/components/parameters/authorization_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -96,7 +93,7 @@ ] } }, - "/authorizations/{authorization_id}/capture": { + "/v2/payments/authorizations/{authorization_id}/capture": { "post": { "summary": "Capture authorized payment", "description": "Captures an authorized payment, by ID.", @@ -111,9 +108,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -240,7 +234,7 @@ ] } }, - "/authorizations/{authorization_id}/reauthorize": { + "/v2/payments/authorizations/{authorization_id}/reauthorize": { "post": { "summary": "Reauthorize authorized payment", "description": "Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once for up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
", @@ -255,9 +249,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -384,7 +375,7 @@ ] } }, - "/authorizations/{authorization_id}/void": { + "/v2/payments/authorizations/{authorization_id}/void": { "post": { "summary": "Void authorized payment", "description": "Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.", @@ -393,9 +384,6 @@ { "$ref": "#/components/parameters/authorization_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -534,7 +522,7 @@ ] } }, - "/captures/{capture_id}": { + "/v2/payments/captures/{capture_id}": { "get": { "summary": "Show captured payment details", "description": "Shows details for a captured payment, by ID.", @@ -543,9 +531,6 @@ { "$ref": "#/components/parameters/capture_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -624,7 +609,7 @@ ] } }, - "/captures/{capture_id}/refund": { + "/v2/payments/captures/{capture_id}/refund": { "post": { "summary": "Refund captured payment", "description": "Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.", @@ -639,9 +624,6 @@ { "$ref": "#/components/parameters/prefer" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" }, @@ -795,7 +777,7 @@ ] } }, - "/refunds/{refund_id}": { + "/v2/payments/refunds/{refund_id}": { "get": { "summary": "Show refund details", "description": "Shows details for a refund, by ID.", @@ -804,9 +786,6 @@ { "$ref": "#/components/parameters/refund_id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -924,11 +903,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -938,7 +922,7 @@ "description": "OAuth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/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", @@ -973,15 +957,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 +966,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..cb1121f 100644 --- a/openapi/payments_payouts_batch_v1.json +++ b/openapi/payments_payouts_batch_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.8" }, "paths": { - "/payouts": { + "/v1/payments/payouts": { "post": { "summary": "Create batch payout", "description": "Creates a batch payout. In the JSON request body, pass a `sender_batch_header` and an `items` array. The `sender_batch_header` defines how to handle the payout. The `items` array defines the payout items.
You can make payouts to one or more recipients.
Notes:
  • PayPal does not process duplicate payouts. If you specify a sender_batch_id that was used in the last 30 days, the API rejects the request with an error message that shows the duplicate sender_batch_id and includes a HATEOAS link to the original payout with the same sender_batch_id.

    If you receive an HTTP 5nn status code, you can safely retry the request with the same sender_batch_id.

  • The Payouts API does not support build notation (BN) codes. In a future Payouts release, you can optionally provide BN codes in the PayPal-Partner-Attribution-Id request header.

    For information about the PayPal-Partner-Attribution-Id header, see HTTP request headers. To learn about or request a BN code, contact your partner manager or see PayPal Partner Program.

", @@ -57,7 +57,7 @@ ] } }, - "/payouts/{payout_batch_id}": { + "/v1/payments/payouts/{payout_batch_id}": { "get": { "summary": "Show payout batch details", "description": "Shows the latest status of a batch payout. Includes the transaction status and other data for individual payout items.", @@ -106,7 +106,7 @@ ] } }, - "/payouts-item/{payout_item_id}": { + "/v1/payments/payouts-item/{payout_item_id}": { "get": { "summary": "Show payout item details", "description": "Shows details for a payout item, by ID. A payout_item_id helps you identify denied payments. If a payment is denied, you can use the payout_item_id to identify the payment even if it lacks a transaction_id.", @@ -143,7 +143,7 @@ ] } }, - "/payouts-item/{payout_item_id}/cancel": { + "/v1/payments/payouts-item/{payout_item_id}/cancel": { "post": { "summary": "Cancel unclaimed payout item", "description": "Cancels an unclaimed payout item, by ID. If no one claims the unclaimed item within 30 days, the API automatically returns the funds to the sender. Use this call to cancel the unclaimed item before the automatic 30-day refund. You can cancel payout items with a transaction_status of UNCLAIMED.", @@ -200,11 +200,16 @@ } ], "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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -214,7 +219,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/payments/payouts": "Payout to a list of recipients." } diff --git a/openapi/reporting_transactions_v1.json b/openapi/reporting_transactions_v1.json index fc82590..7ca51f3 100644 --- a/openapi/reporting_transactions_v1.json +++ b/openapi/reporting_transactions_v1.json @@ -1,12 +1,12 @@ { - "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.
", "version": "1.9" }, "paths": { - "/transactions": { + "/v1/reporting/transactions": { "get": { "summary": "List transactions", "description": "Lists transactions. Specify one or more query parameters to filter the transaction that appear in the response.
Notes:
  • If you specify one or more optional query parameters, the ending_balance response field is empty.
  • It takes a maximum of three hours for executed transactions to appear in the list transactions call.
  • This call lists transaction for the previous three years.
", @@ -82,7 +82,7 @@ ] } }, - "/balances": { + "/v1/reporting/balances": { "get": { "summary": "List all balances", "description": "List all balances. Specify date time to list balances for that time that appear in the response.
Notes:
  • It takes a maximum of three hours for balances to appear in the list balances call.
  • This call lists balances upto the previous three years.
", @@ -172,7 +172,12 @@ }, "servers": [ { - "url": "https://api-m.paypal.com/v1/reporting" + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -182,7 +187,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/reporting/search/read": "Transactions Search", "https://uri.paypal.com/services/reporting/balances/read": "List Balances" diff --git a/openapi/shipping_shipment_tracking_v1.json b/openapi/shipping_shipment_tracking_v1.json index 0b10151..1960d56 100644 --- a/openapi/shipping_shipment_tracking_v1.json +++ b/openapi/shipping_shipment_tracking_v1.json @@ -1,12 +1,12 @@ { - "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.", "version": "1.1" }, "paths": { - "/trackers-batch": { + "/v1/shipping/trackers-batch": { "post": { "summary": "Add tracking information for multiple PayPal transactions", "description": "Adds tracking information, with or without tracking numbers, for multiple PayPal transactions. Accepts up to 20 tracking IDs. For more information, see Add tracking information with tracking numbers and Add tracking information without tracking numbers.", @@ -38,11 +38,6 @@ "$ref": "#/components/responses/default" } }, - "parameters": [ - { - "$ref": "#/components/parameters/authorization" - } - ], "requestBody": { "$ref": "#/components/requestBodies/tracker_collection" }, @@ -58,7 +53,7 @@ ] } }, - "/trackers": { + "/v1/shipping/trackers": { "post": { "summary": "Add tracking information for PayPal transaction", "description": "Adds tracking information for a PayPal transaction.", @@ -78,11 +73,6 @@ "$ref": "#/components/responses/default" } }, - "parameters": [ - { - "$ref": "#/components/parameters/authorization" - } - ], "requestBody": { "$ref": "#/components/requestBodies/tracker_collection" }, @@ -117,9 +107,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/transaction_id" }, @@ -139,7 +126,7 @@ ] } }, - "/trackers/{id}": { + "/v1/shipping/trackers/{id}": { "put": { "summary": "Update or cancel tracking information for PayPal transaction", "description": "Updates or cancels the tracking information for a PayPal transaction, by ID. To cancel tracking information, call this method and set the status to CANCELLED. For more information, see Update or cancel tracking information.", @@ -153,9 +140,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/id" } @@ -205,9 +189,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/id" } @@ -248,11 +229,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", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Production Environment" } ], "components": { @@ -278,7 +264,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "tokenUrl": "/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" @@ -288,14 +274,6 @@ } }, "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..da2669f 100644 --- a/openapi/vault_payment_tokens_v3.json +++ b/openapi/vault_payment_tokens_v3.json @@ -1,12 +1,12 @@ { - "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.", "version": "3.0" }, "paths": { - "/payment-tokens": { + "/v3/vault/payment-tokens": { "post": { "description": "Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.", "summary": "Create payment token for a given payment source", @@ -97,9 +97,6 @@ { "$ref": "#/components/parameters/content_type" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -198,9 +195,6 @@ { "$ref": "#/components/parameters/payment_source" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -217,7 +211,7 @@ ] } }, - "/payment-tokens/{id}": { + "/v3/vault/payment-tokens/{id}": { "get": { "description": "Returns a readable representation of vaulted payment source associated with the payment token id.", "summary": "Retrieve a payment token", @@ -278,9 +272,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -341,9 +332,6 @@ }, { "$ref": "#/components/parameters/content_type" - }, - { - "$ref": "#/components/parameters/authorization" } ], "security": [ @@ -358,7 +346,7 @@ ] } }, - "/setup-tokens": { + "/v3/vault/setup-tokens": { "post": { "description": "Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.", "summary": "Create a setup token", @@ -439,9 +427,6 @@ { "$ref": "#/components/parameters/content_type" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -474,7 +459,7 @@ ] } }, - "/setup-tokens/{id}": { + "/v3/vault/setup-tokens/{id}": { "get": { "description": "Returns a readable representation of temporarily vaulted payment source associated with the setup token id.", "summary": "Retrieve a setup token", @@ -535,9 +520,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/authorization" - }, { "$ref": "#/components/parameters/content_type" } @@ -574,7 +556,12 @@ }, "servers": [ { - "url": "https://api.paypal.com/v3/vault" + "url": "https://api.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api.paypal.com", + "description": "PayPal Live Environment" } ], "components": { @@ -584,7 +571,7 @@ "description": "Oauth 2.0 authentication", "flows": { "clientCredentials": { - "tokenUrl": "https://api.paypal.com/v1/oauth2/token", + "tokenUrl": "/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" @@ -603,16 +590,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 +2497,7 @@ "payment_source": { "token": { "id": "5C991763VB2781612", - "type": "SETUP_TOKEN" + "type": "BILLING_AGREEMENT" } } } diff --git a/package.json b/package.json index a32ddaf..ea0aaa7 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "lint-redocly": "redocly --format summary lint", "lint-spectral": "spectral --format pretty lint", "lint-openapi": "openapi-generator-cli validate -i", - "codegen-java": "openapi-generator-cli generate --skip-validate-spec -g java -o generated/java -i", + "codegen-java": "openapi-generator-cli generate --skip-validate-spec -g java --library apache-httpclient -o generated/java -i", "codegen-typescript-node": "openapi-generator-cli generate --skip-validate-spec -g typescript-node -o generated/typescript-node -i" } }