return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.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" + "version": "1.1", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "orders", + "description": "Use the `/checkout/orders` resource to create, cancel, and show details for orders." + }, + { + "name": "orders-payment-actions", + "description": "Use the `/checkout/orders` resource with the `/pay` action to pay for an order. When you [create an order](#orders_create), the response includes an approval URL. Redirect the customer to this approval URL." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/orders/v1/" }, "paths": { "/v1/checkout/orders": { @@ -18,11 +42,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/order" - }, - "examples": { - "0": { - "$ref": "#/components/examples/order" - } } } } @@ -48,6 +67,73 @@ "application/json": { "schema": { "$ref": "#/components/schemas/order" + }, + "examples": { + "order": { + "value": { + "purchase_units": [ + { + "reference_id": "store_mobile_world_order_1234", + "description": "Mobile World Store order-1234", + "amount": { + "currency": "USD", + "details": { + "subtotal": "1.09", + "shipping": "0.02", + "tax": "0.33" + }, + "total": "1.44" + }, + "payee": { + "email": "seller@example.com" + }, + "items": [ + { + "name": "NeoPhone", + "sku": "sku03", + "price": "0.54", + "currency": "USD", + "quantity": "1" + }, + { + "name": "Fitness Watch", + "sku": "sku04", + "price": "0.55", + "currency": "USD", + "quantity": "1" + } + ], + "shipping_address": { + "line1": "2211 N First Street", + "line2": "Building 17", + "city": "San Jose", + "country_code": "US", + "postal_code": "95131", + "state": "CA", + "phone": "(123) 456-7890" + }, + "shipping_method": "United Postal Service", + "partner_fee_details": { + "receiver": { + "email": "partner@example.com" + }, + "amount": { + "value": "0.01", + "currency": "USD" + } + }, + "payment_linked_group": 1, + "custom": "custom_value_2388", + "invoice_number": "invoice_number_2388", + "payment_descriptor": "Payment Mobile World" + } + ], + "redirect_urls": { + "return_url": "https://example.com/return", + "cancel_url": "https://example.com/cancel" + } + } + } } } }, @@ -233,29 +319,6 @@ } } }, - "tags": [ - { - "name": "orders", - "description": "Use the `/checkout/orders` resource to create, cancel, and show details for orders." - }, - { - "name": "orders-payment-actions", - "description": "Use the `/checkout/orders` resource with the `/pay` action to pay for an order. When you [create an order](#orders_create), the response includes an approval URL. Redirect the customer to this approval URL." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/orders/v1/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "securitySchemes": { "Oauth2": { @@ -276,34 +339,6 @@ } } }, - "parameters": { - "paypal_partner_attribution_id": { - "name": "PayPal-Partner-Attribution-Id", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - "order_id": { - "name": "order_id", - "in": "path", - "description": "The ID of the order for which to execute a payment.", - "required": true, - "schema": { - "type": "string" - } - }, - "paypal_request_id": { - "name": "PayPal-Request-Id", - "description": "The server stores keys forever.", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -319,9 +354,7 @@ "description": "The value of the field that caused the error." }, "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" + "$ref": "#/components/schemas/error_location" }, "issue": { "type": "string", @@ -336,37 +369,15 @@ "issue" ] }, - "error_default": { - "description": "The default error response.", - "oneOf": [ - { - "$ref": "#/components/schemas/error_400" - }, - { - "$ref": "#/components/schemas/error_401" - }, - { - "$ref": "#/components/schemas/error_403" - }, - { - "$ref": "#/components/schemas/error_404" - }, - { - "$ref": "#/components/schemas/error_409" - }, - { - "$ref": "#/components/schemas/error_415" - }, - { - "$ref": "#/components/schemas/error_422" - }, - { - "$ref": "#/components/schemas/error_500" - }, - { - "$ref": "#/components/schemas/error_503" - } - ] + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" }, "error_link_description": { "title": "Link Description", @@ -395,17 +406,14 @@ "description": "The HTTP method required to make the related call.", "type": "string", "minLength": 3, - "maxLength": 7, + "maxLength": 6, "pattern": "^[A-Z]*$", "enum": [ - "CONNECT", - "DELETE", "GET", - "HEAD", - "OPTIONS", - "PATCH", "POST", - "PUT" + "PUT", + "DELETE", + "PATCH" ] } } @@ -1972,72 +1980,33 @@ } } }, - "examples": { - "order": { - "value": { - "purchase_units": [ - { - "reference_id": "store_mobile_world_order_1234", - "description": "Mobile World Store order-1234", - "amount": { - "currency": "USD", - "details": { - "subtotal": "1.09", - "shipping": "0.02", - "tax": "0.33" - }, - "total": "1.44" - }, - "payee": { - "email": "seller@example.com" - }, - "items": [ - { - "name": "NeoPhone", - "sku": "sku03", - "price": "0.54", - "currency": "USD", - "quantity": "1" - }, - { - "name": "Fitness Watch", - "sku": "sku04", - "price": "0.55", - "currency": "USD", - "quantity": "1" - } - ], - "shipping_address": { - "line1": "2211 N First Street", - "line2": "Building 17", - "city": "San Jose", - "country_code": "US", - "postal_code": "95131", - "state": "CA", - "phone": "(123) 456-7890" - }, - "shipping_method": "United Postal Service", - "partner_fee_details": { - "receiver": { - "email": "partner@example.com" - }, - "amount": { - "value": "0.01", - "currency": "USD" - } - }, - "payment_linked_group": 1, - "custom": "custom_value_2388", - "invoice_number": "invoice_number_2388", - "payment_descriptor": "Payment Mobile World" - } - ], - "redirect_urls": { - "return_url": "https://example.com/return", - "cancel_url": "https://example.com/cancel" - } + "parameters": { + "paypal_partner_attribution_id": { + "name": "PayPal-Partner-Attribution-Id", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + "order_id": { + "name": "order_id", + "in": "path", + "description": "The ID of the order for which to execute a payment.", + "required": true, + "schema": { + "type": "string" + } + }, + "paypal_request_id": { + "name": "PayPal-Request-Id", + "description": "The server stores keys forever.", + "in": "header", + "required": false, + "schema": { + "type": "string" } } } } -} +} \ No newline at end of file diff --git a/openapi/checkout_orders_v2.json b/openapi/checkout_orders_v2.json index 1773049..f1eb080 100644 --- a/openapi/checkout_orders_v2.json +++ b/openapi/checkout_orders_v2.json @@ -3,7 +3,31 @@ "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" + "version": "2.13", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "orders", + "description": "Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders." + }, + { + "name": "trackers", + "description": "Use the `/trackers` resource to update and retrieve tracking information for PayPal orders." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/orders/v2/" }, "paths": { "/v2/checkout/orders": { @@ -30,8 +54,19 @@ "$ref": "#/components/schemas/order" }, "examples": { - "0": { - "$ref": "#/components/examples/order_request_create" + "orders_request_create": { + "value": { + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", + "amount": { + "currency_code": "USD", + "value": "100.00" + } + } + ] + } } } } @@ -104,9 +139,6 @@ }, { "$ref": "#/components/parameters/prefer" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -116,8 +148,33 @@ "$ref": "#/components/schemas/order_request" }, "examples": { - "0": { - "$ref": "#/components/examples/order_request" + "order_request": { + "value": { + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", + "amount": { + "currency_code": "USD", + "value": "100.00" + } + } + ], + "payment_source": { + "paypal": { + "experience_context": { + "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED", + "payment_method_selected": "PAYPAL", + "brand_name": "EXAMPLE INC", + "locale": "en-US", + "landing_page": "LOGIN", + "user_action": "PAY_NOW", + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } + } + } } } } @@ -195,9 +252,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/fields" } @@ -297,9 +351,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -406,9 +457,6 @@ { "$ref": "#/components/parameters/id" }, - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/prefer" } @@ -420,8 +468,29 @@ "$ref": "#/components/schemas/confirm_order_request" }, "examples": { - "0": { - "$ref": "#/components/examples/confirm_order_request" + "confirm_order_request": { + "value": { + "payment_source": { + "paypal": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "email_address": "customer@example.com", + "experience_context": { + "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED", + "payment_method_selected": "PAYPAL", + "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" + } + } + } + } } } } @@ -580,9 +649,6 @@ }, { "$ref": "#/components/parameters/paypal_auth_assertion" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -747,9 +813,6 @@ }, { "$ref": "#/components/parameters/paypal_auth_assertion" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -888,9 +951,6 @@ }, { "$ref": "#/components/parameters/paypal_auth_assertion" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -1012,13 +1072,34 @@ }, { "$ref": "#/components/parameters/tracker_id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { - "$ref": "#/components/requestBodies/patch_request" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patch_request" + }, + "examples": { + "orders_patch_request": { + "value": [ + { + "op": "replace", + "path": "/purchase_units/@reference_id=='PUHF'/shipping/address", + "value": { + "address_line_1": "2211 N First Street", + "address_line_2": "Building 17", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + ] + } + } + } + } }, "security": [ { @@ -1033,29 +1114,6 @@ } } }, - "tags": [ - { - "name": "orders", - "description": "Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders." - }, - { - "name": "trackers", - "description": "Use the `/trackers` resource to update and retrieve tracking information for PayPal orders." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/orders/v2/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "requestBodies": { "patch_request": { @@ -1063,11 +1121,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/patch_request" - }, - "examples": { - "0": { - "$ref": "#/components/examples/patch_request" - } } } } @@ -1090,107 +1143,6 @@ } } }, - "parameters": { - "paypal_request_id": { - "name": "PayPal-Request-Id", - "in": "header", - "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 108 - } - }, - "paypal_partner_attribution_id": { - "name": "PayPal-Partner-Attribution-Id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 36 - } - }, - "paypal_client_metadata_id": { - "name": "PayPal-Client-Metadata-Id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 36 - } - }, - "prefer": { - "name": "Prefer", - "in": "header", - "description": "The preferred server response upon successful completion of the request. Value is:
return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.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.
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.
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" + "version": "1.4", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "merchant-integration", + "description": "Enables you to get information about a seller-partner integration." + }, + { + "name": "partner-referrals", + "description": "Enables you to create and get information about shared customer data." + }, + { + "name": "partner-referral-link", + "description": "Links partner-referral data with a PayPal account." + }, + { + "name": "cancel-onboarding", + "description": "Enables you to cancel an in-progress seller onboarding." + }, + { + "name": "partner", + "description": "Enables you to create, update and read partner agreements and preferences." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/platforms/seller-onboarding/before-payment/" }, "paths": { "/v1/customer/partner-referrals": { @@ -40,8 +76,156 @@ "$ref": "#/components/schemas/referral_data" }, "examples": { - "0": { - "$ref": "#/components/examples/referral_data" + "referral_data": { + "value": { + "customer_data": { + "customer_type": "MERCHANT", + "person_details": { + "email_address": "customer@example.com", + "name": { + "prefix": "Mr.", + "given_name": "Shashank", + "surname": "Wankhede", + "middle_name": "Govind" + }, + "phone_contacts": [ + { + "phone_number_details": { + "country_code": "91", + "national_number": "9740216087" + }, + "phone_type": "HOME" + } + ], + "home_address": { + "line1": "11, outer ring road", + "state": "Karnataka", + "city": "Bangalore", + "country_code": "IN", + "postal_code": "560103" + }, + "nationality_country_code": "IN", + "identity_documents": [ + { + "type": "SOCIAL_SECURITY_NUMBER", + "value": "ABCDEF34646", + "partial_value": false, + "issuer_country_code": "US" + } + ] + }, + "business_details": { + "phone_contacts": [ + { + "phone_number_details": { + "country_code": "91", + "national_number": "9740216087" + }, + "phone_type": "FAX" + } + ], + "business_address": { + "line1": "11, outer ring road", + "state": "Karnataka", + "city": "Bangalore", + "country_code": "IN", + "postal_code": "560103" + }, + "business_type": "PROPRIETORSHIP", + "category": "1004", + "sub_category": "2025", + "merchant_category_code": "8931", + "names": [ + { + "type": "LEGAL", + "name": "SHASHANK STORE" + } + ], + "business_description": "Arts and handicrafts", + "event_dates": [ + { + "event_type": "ESTABLISHED", + "event_date": "2009-01-31T13:59:45Z" + } + ], + "website_urls": [ + "https://example.com/mystore/" + ], + "annual_sales_volume_range": { + "minimum_amount": { + "currency": "USD", + "value": "2000" + }, + "maximum_amount": { + "currency": "USD", + "value": "3000" + } + }, + "average_monthly_volume_range": {}, + "identity_documents": [ + { + "type": "TAX_IDENTIFICATION_NUMBER", + "value": "ABCDEF34646", + "partial_value": false, + "issuer_country_code": "US" + } + ], + "email_contacts": [ + { + "email_address": "customer-service@example.com", + "role": "CUSTOMER_SERVICE" + } + ] + }, + "financial_instrument_data": { + "bank_details": [ + { + "nick_name": "Bank of America", + "account_number": "123405668293", + "account_type": "CHECKING", + "currency_code": "USD", + "identifiers": [ + { + "type": "ROUTING_NUMBER_1", + "value": "123456789" + } + ] + } + ] + }, + "preferred_language_code": "en_US", + "primary_currency_code": "USD", + "referral_user_payer_id": { + "type": "PAYER_ID", + "value": "RFYUH2QQDGUQU" + }, + "partner_specific_identifiers": [ + { + "type": "TRACKING_ID", + "value": "ABJSDFO343SD" + } + ] + }, + "requested_capabilities": [ + { + "capability": "BANK_ADDITION" + } + ], + "web_experience_preference": { + "partner_logo_url": "https://example.com/logo/", + "return_url": "https://example.com/", + "action_renewal_url": "https://example.com/renew/" + }, + "collected_consents": [ + { + "type": "SHARE_DATA_CONSENT", + "granted": true + } + ], + "products": [ + "EXPRESS_CHECKOUT" + ] + } } } } @@ -312,6 +496,9 @@ }, { "$ref": "#/components/parameters/content_type" + }, + { + "$ref": "#/components/parameters/x_paypal_security_context" } ], "security": [ @@ -387,6 +574,9 @@ }, { "$ref": "#/components/parameters/content_type" + }, + { + "$ref": "#/components/parameters/x_paypal_security_context" } ], "requestBody": { @@ -468,6 +658,9 @@ }, { "$ref": "#/components/parameters/content_type" + }, + { + "$ref": "#/components/parameters/x_paypal_security_context" } ], "requestBody": { @@ -486,41 +679,6 @@ } } }, - "tags": [ - { - "name": "merchant-integration", - "description": "Enables you to get information about a seller-partner integration." - }, - { - "name": "partner-referrals", - "description": "Enables you to create and get information about shared customer data." - }, - { - "name": "partner-referral-link", - "description": "Links partner-referral data with a PayPal account." - }, - { - "name": "cancel-onboarding", - "description": "Enables you to cancel an in-progress seller onboarding." - }, - { - "name": "partner", - "description": "Enables you to create, update and read partner agreements and preferences." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/platforms/seller-onboarding/before-payment/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "requestBodies": { "partner": { @@ -550,97 +708,6 @@ } } }, - "parameters": { - "partner_referral_id": { - "name": "partner_referral_id", - "in": "path", - "description": "The ID of the partner-referrals data for which to show details.", - "required": true, - "schema": { - "type": "string" - } - }, - "partner_id": { - "name": "partner_id", - "in": "path", - "description": "The ID of the partner for which to show onboarded seller's credentials, which is the partner's PayPal account number. To find this ID, log in to the partner's PayPal business account. Navigate to **Profile**, click **Profile and settings**, and click **My business info**. The account number appears in the **Merchant account ID** section.", - "required": true, - "schema": { - "type": "string" - } - }, - "tracking_id": { - "name": "tracking_id", - "in": "query", - "description": "Filters the sellers in the response by this partner-provided seller ID (`merchant_id`).", - "required": true, - "schema": { - "type": "string" - } - }, - "merchant_id": { - "name": "merchant_id", - "in": "path", - "description": "The ID of the seller for which to show status information.", - "required": true, - "schema": { - "type": "string" - } - }, - "fields": { - "name": "fields", - "in": "query", - "description": "Filters the fields in the response to this comma-separated list of fields.", - "schema": { - "type": "string" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "The ID of the partner, which is the partner's PayPal account number. To find this ID, log in to the partner's PayPal business account. Navigate to **Profile**, click **Profile and settings**, and click **My business info**. The account number appears in the **Merchant account ID** section.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 20, - "pattern": "^.*$" - } - }, - "country_code": { - "name": "country_code", - "in": "query", - "description": "The country code to load region preferences.", - "schema": { - "type": "string", - "minLength": 2, - "maxLength": 2, - "pattern": "^([a-zA-Z]{2})$" - } - }, - "product": { - "name": "product", - "in": "query", - "description": "The product to load region and integration preferences.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 20, - "pattern": "^.*$" - } - }, - "content_type": { - "name": "Content-type", - "in": "header", - "description": "The Content-type header MUST be described in all externally-accessible APIs.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 4000, - "pattern": "^.*$" - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -656,9 +723,7 @@ "description": "The value of the field that caused the error." }, "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" + "$ref": "#/components/schemas/error_location" }, "issue": { "type": "string", @@ -673,37 +738,15 @@ "issue" ] }, - "error_default": { - "description": "The default error response.", - "oneOf": [ - { - "$ref": "#/components/schemas/error_400" - }, - { - "$ref": "#/components/schemas/error_401" - }, - { - "$ref": "#/components/schemas/error_403" - }, - { - "$ref": "#/components/schemas/error_404" - }, - { - "$ref": "#/components/schemas/error_409" - }, - { - "$ref": "#/components/schemas/error_415" - }, - { - "$ref": "#/components/schemas/error_422" - }, - { - "$ref": "#/components/schemas/error_500" - }, - { - "$ref": "#/components/schemas/error_503" - } - ] + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" }, "error_link_description": { "title": "Link Description", @@ -732,17 +775,14 @@ "description": "The HTTP method required to make the related call.", "type": "string", "minLength": 3, - "maxLength": 7, + "maxLength": 6, "pattern": "^[A-Z]*$", "enum": [ - "CONNECT", - "DELETE", "GET", - "HEAD", - "OPTIONS", - "PATCH", "POST", - "PUT" + "PUT", + "DELETE", + "PATCH" ] } } @@ -2339,6 +2379,37 @@ } } }, + "error_details-2": { + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique, fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value." + } + }, + "required": [ + "issue" + ] + }, "link_description": { "type": "object", "title": "Link Description", @@ -2398,7 +2469,7 @@ "type": "array", "description": "An array of additional details about the error.", "items": { - "$ref": "#/components/schemas/error_details" + "$ref": "#/components/schemas/error_details-2" } }, "links": { @@ -2898,7 +2969,7 @@ } } }, - "error_details-2": { + "error_details-3": { "type": "object", "title": "Error Details", "description": "The error details. Required for client-side `4XX` errors.", @@ -2947,7 +3018,7 @@ "description": "An array of additional details for the error.", "readOnly": true, "items": { - "$ref": "#/components/schemas/error_details-2" + "$ref": "#/components/schemas/error_details-3" } } }, @@ -3202,156 +3273,105 @@ } } }, - "examples": { - "referral_data": { - "value": { - "customer_data": { - "customer_type": "MERCHANT", - "person_details": { - "email_address": "customer@example.com", - "name": { - "prefix": "Mr.", - "given_name": "Shashank", - "surname": "Wankhede", - "middle_name": "Govind" - }, - "phone_contacts": [ - { - "phone_number_details": { - "country_code": "91", - "national_number": "9740216087" - }, - "phone_type": "HOME" - } - ], - "home_address": { - "line1": "11, outer ring road", - "state": "Karnataka", - "city": "Bangalore", - "country_code": "IN", - "postal_code": "560103" - }, - "nationality_country_code": "IN", - "identity_documents": [ - { - "type": "SOCIAL_SECURITY_NUMBER", - "value": "ABCDEF34646", - "partial_value": false, - "issuer_country_code": "US" - } - ] - }, - "business_details": { - "phone_contacts": [ - { - "phone_number_details": { - "country_code": "91", - "national_number": "9740216087" - }, - "phone_type": "FAX" - } - ], - "business_address": { - "line1": "11, outer ring road", - "state": "Karnataka", - "city": "Bangalore", - "country_code": "IN", - "postal_code": "560103" - }, - "business_type": "PROPRIETORSHIP", - "category": "1004", - "sub_category": "2025", - "merchant_category_code": "8931", - "names": [ - { - "type": "LEGAL", - "name": "SHASHANK STORE" - } - ], - "business_description": "Arts and handicrafts", - "event_dates": [ - { - "event_type": "ESTABLISHED", - "event_date": "2009-01-31T13:59:45Z" - } - ], - "website_urls": [ - "https://example.com/mystore/" - ], - "annual_sales_volume_range": { - "minimum_amount": { - "currency": "USD", - "value": "2000" - }, - "maximum_amount": { - "currency": "USD", - "value": "3000" - } - }, - "average_monthly_volume_range": {}, - "identity_documents": [ - { - "type": "TAX_IDENTIFICATION_NUMBER", - "value": "ABCDEF34646", - "partial_value": false, - "issuer_country_code": "US" - } - ], - "email_contacts": [ - { - "email_address": "customer-service@example.com", - "role": "CUSTOMER_SERVICE" - } - ] - }, - "financial_instrument_data": { - "bank_details": [ - { - "nick_name": "Bank of America", - "account_number": "123405668293", - "account_type": "CHECKING", - "currency_code": "USD", - "identifiers": [ - { - "type": "ROUTING_NUMBER_1", - "value": "123456789" - } - ] - } - ] - }, - "preferred_language_code": "en_US", - "primary_currency_code": "USD", - "referral_user_payer_id": { - "type": "PAYER_ID", - "value": "RFYUH2QQDGUQU" - }, - "partner_specific_identifiers": [ - { - "type": "TRACKING_ID", - "value": "ABJSDFO343SD" - } - ] - }, - "requested_capabilities": [ - { - "capability": "BANK_ADDITION" - } - ], - "web_experience_preference": { - "partner_logo_url": "https://example.com/logo/", - "return_url": "https://example.com/", - "action_renewal_url": "https://example.com/renew/" - }, - "collected_consents": [ - { - "type": "SHARE_DATA_CONSENT", - "granted": true - } - ], - "products": [ - "EXPRESS_CHECKOUT" - ] + "parameters": { + "partner_referral_id": { + "name": "partner_referral_id", + "in": "path", + "description": "The ID of the partner-referrals data for which to show details.", + "required": true, + "schema": { + "type": "string" + } + }, + "partner_id": { + "name": "partner_id", + "in": "path", + "description": "The ID of the partner for which to show onboarded seller's credentials, which is the partner's PayPal account number. To find this ID, log in to the partner's PayPal business account. Navigate to **Profile**, click **Profile and settings**, and click **My business info**. The account number appears in the **Merchant account ID** section.", + "required": true, + "schema": { + "type": "string" + } + }, + "tracking_id": { + "name": "tracking_id", + "in": "query", + "description": "Filters the sellers in the response by this partner-provided seller ID (`merchant_id`).", + "required": true, + "schema": { + "type": "string" + } + }, + "merchant_id": { + "name": "merchant_id", + "in": "path", + "description": "The ID of the seller for which to show status information.", + "required": true, + "schema": { + "type": "string" + } + }, + "fields": { + "name": "fields", + "in": "query", + "description": "Filters the fields in the response to this comma-separated list of fields.", + "schema": { + "type": "string" + } + }, + "id": { + "name": "id", + "in": "path", + "description": "The ID of the partner, which is the partner's PayPal account number. To find this ID, log in to the partner's PayPal business account. Navigate to **Profile**, click **Profile and settings**, and click **My business info**. The account number appears in the **Merchant account ID** section.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "pattern": "^.*$" + } + }, + "country_code": { + "name": "country_code", + "in": "query", + "description": "The country code to load region preferences.", + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 2, + "pattern": "^([a-zA-Z]{2})$" + } + }, + "product": { + "name": "product", + "in": "query", + "description": "The product to load region and integration preferences.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "pattern": "^.*$" + } + }, + "content_type": { + "name": "Content-type", + "in": "header", + "description": "The Content-type header MUST be described in all externally-accessible APIs.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 4000, + "pattern": "^.*$" + } + }, + "x_paypal_security_context": { + "name": "X-PAYPAL-SECURITY-CONTEXT", + "in": "header", + "description": "The X-PAYPAL-SECURITY-CONTEXT header MUST be described in all externally-accessible APIs.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 4000, + "pattern": "^.*$" } } } diff --git a/openapi/customer_partner_referrals_v2.json b/openapi/customer_partner_referrals_v2.json index 6749e52..2041cc4 100644 --- a/openapi/customer_partner_referrals_v2.json +++ b/openapi/customer_partner_referrals_v2.json @@ -2,8 +2,28 @@ "openapi": "3.0.3", "info": { "title": "Partner Referrals", - "description": "Use the Partner Referrals API to add PayPal seller accounts to PayPal Commerce Platform for Marketplaces and Platforms.
Important: This endpoint is available to approved partners only. Fill out this form to get approved and a PayPal representative will reach out to you shortly.For more information about partner integrations and onboarding sellers, see PayPal Commerce Platform for Marketplaces and Platforms.", - "version": "2.4" + "description": "Use the Partner Referrals API to add PayPal seller accounts to PayPal Complete Payments Platform for Marketplaces and Platforms.
Important: This endpoint is available to approved partners only. Fill out this form to get approved and a PayPal representative will reach out to you shortly.For more information about partner integrations and onboarding sellers, see PayPal Complete Payments Platform for Marketplaces and Platforms.", + "version": "2.4", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "partner-referrals", + "description": "Enables you to create and get information about shared customer data." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/platforms/seller-onboarding/before-payment/" }, "paths": { "/v2/customer/partner-referrals": { @@ -140,8 +160,286 @@ "$ref": "#/components/schemas/referral_data_response" }, "examples": { - "0": { - "$ref": "#/components/examples/referral_data" + "referral_data": { + "value": { + "individual_owners": [ + { + "names": [ + { + "prefix": "Mr.", + "given_name": "John", + "surname": "Doe", + "middle_name": "Middle", + "suffix": "Jr.", + "full_name": "John Middle Doe Jr.", + "type": "LEGAL" + } + ], + "citizenship": "US", + "addresses": [ + { + "address_line_1": "One Washington Square", + "address_line_2": "Apt 123", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95112", + "country_code": "US", + "type": "HOME" + } + ], + "phones": [ + { + "country_code": "1", + "national_number": "6692468839", + "extension_number": "1234", + "type": "MOBILE" + } + ], + "birth_details": { + "date_of_birth": "1955-12-29" + }, + "type": "PRIMARY" + } + ], + "business_entity": { + "business_type": { + "type": "INDIVIDUAL", + "subtype": "ASSO_TYPE_INCORPORATED" + }, + "business_industry": { + "category": "1004", + "mcc_code": "8931", + "subcategory": "2025" + }, + "business_incorporation": { + "incorporation_country_code": "US", + "incorporation_date": "1986-12-29" + }, + "names": [ + { + "business_name": "Test Enterprise", + "type": "LEGAL_NAME" + } + ], + "emails": [ + { + "type": "CUSTOMER_SERVICE", + "email": "customerservice@example.com" + } + ], + "website": "https://mystore.testenterprises.com", + "addresses": [ + { + "address_line_1": "One Washington Square", + "address_line_2": "Apt 123", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95112", + "country_code": "US", + "type": "WORK" + } + ], + "phones": [ + { + "country_code": "1", + "national_number": "6692478833", + "extension_number": "1234", + "type": "CUSTOMER_SERVICE" + } + ], + "beneficial_owners": { + "individual_beneficial_owners": [ + { + "names": [ + { + "prefix": "Mr.", + "given_name": "John", + "surname": "Doe", + "middle_name": "Middle", + "suffix": "Jr.", + "full_name": "John Middle Doe Jr.", + "type": "LEGAL" + } + ], + "citizenship": "US", + "addresses": [ + { + "address_line_1": "One Washington Square", + "address_line_2": "Apt 123", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95112", + "country_code": "US", + "type": "HOME" + } + ], + "phones": [ + { + "country_code": "1", + "national_number": "6692468839", + "extension_number": "1234", + "type": "MOBILE" + } + ], + "birth_details": { + "date_of_birth": "1955-12-29" + }, + "percentage_of_ownership": "50" + } + ], + "business_beneficial_owners": [ + { + "business_type": { + "type": "INDIVIDUAL", + "subtype": "ASSO_TYPE_INCORPORATED" + }, + "business_industry": { + "category": "1004", + "mcc_code": "8931", + "subcategory": "2025" + }, + "business_incorporation": { + "incorporation_country_code": "US", + "incorporation_date": "1986-12-29" + }, + "names": [ + { + "business_name": "Test Enterprise", + "type": "LEGAL_NAME" + } + ], + "emails": [ + { + "type": "CUSTOMER_SERVICE", + "email": "customerservice@example.com" + } + ], + "website": "https://mystore.testenterprises.com", + "addresses": [ + { + "address_line_1": "One Washington Square", + "address_line_2": "Apt 123", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95112", + "country_code": "US", + "type": "WORK" + } + ], + "phones": [ + { + "country_code": "1", + "national_number": "6692478833", + "extension_number": "1234", + "type": "CUSTOMER_SERVICE" + } + ], + "percentage_of_ownership": "50" + } + ] + }, + "office_bearers": [ + { + "names": [ + { + "prefix": "Mr.", + "given_name": "John", + "surname": "Doe", + "middle_name": "Middle", + "suffix": "Jr.", + "full_name": "John Middle Doe Jr.", + "type": "LEGAL" + } + ], + "citizenship": "US", + "addresses": [ + { + "address_line_1": "One Washington Square", + "address_line_2": "Apt 123", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95112", + "country_code": "US", + "type": "HOME" + } + ], + "phones": [ + { + "country_code": "1", + "national_number": "6692468839", + "extension_number": "1234", + "type": "MOBILE" + } + ], + "birth_details": { + "date_of_birth": "1955-12-29" + }, + "role": "DIRECTOR" + } + ], + "annual_sales_volume_range": { + "minimum_amount": { + "currency_code": "USD", + "value": "10000" + }, + "maximum_amount": { + "currency_code": "USD", + "value": "50000" + } + }, + "average_monthly_volume_range": { + "minimum_amount": { + "currency_code": "USD", + "value": "1000" + }, + "maximum_amount": { + "currency_code": "USD", + "value": "50000" + } + }, + "purpose_code": "P0104" + }, + "email": "accountemail@example.com", + "preferred_language_code": "en-US", + "tracking_id": "testenterprices123122", + "partner_config_override": { + "partner_logo_url": "https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg", + "return_url": "https://testenterprises.com/merchantonboarded", + "return_url_description": "the url to return the merchant after the paypal onboarding process.", + "action_renewal_url": "https://testenterprises.com/renew-exprired-url", + "show_add_credit_card": true + }, + "operations": [ + { + "operation": "BANK_ADDITION" + } + ], + "financial_instruments": { + "banks": [ + { + "nick_name": "Bank of America", + "account_number": "123405668293", + "account_type": "CHECKING", + "currency_code": "USD", + "identifiers": [ + { + "type": "ROUTING_NUMBER_1", + "value": "123456789" + } + ] + } + ] + }, + "legal_consents": [ + { + "type": "SHARE_DATA_CONSENT", + "granted": true + } + ], + "products": [ + "EXPRESS_CHECKOUT" + ] + } } } } @@ -218,25 +516,6 @@ } } }, - "tags": [ - { - "name": "partner-referrals", - "description": "Enables you to create and get information about shared customer data." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/platforms/seller-onboarding/before-payment/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "securitySchemes": { "Oauth2": { @@ -254,17 +533,6 @@ } } }, - "parameters": { - "partner_referral_id": { - "name": "partner_referral_id", - "in": "path", - "description": "The ID of the partner-referrals data for which to show details.", - "required": true, - "schema": { - "type": "string" - } - } - }, "responses": { "default": { "description": "The default response.", @@ -486,9 +754,7 @@ "description": "The value of the field that caused the error." }, "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" + "$ref": "#/components/schemas/error_location" }, "issue": { "type": "string", @@ -503,6 +769,16 @@ "issue" ] }, + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" + }, "error_default": { "description": "The default error response.", "oneOf": [ @@ -562,17 +838,14 @@ "description": "The HTTP method required to make the related call.", "type": "string", "minLength": 3, - "maxLength": 7, + "maxLength": 6, "pattern": "^[A-Z]*$", "enum": [ - "CONNECT", - "DELETE", "GET", - "HEAD", - "OPTIONS", - "PATCH", "POST", - "PUT" + "PUT", + "DELETE", + "PATCH" ] } } @@ -2230,7 +2503,6 @@ "enum": [ "BANK_CODE", "BI_CODE", - "BRANCH_CODE", "ROUTING_NUMBER_1", "ROUTING_NUMBER_2", "ROUTING_NUMBER_3", @@ -2945,286 +3217,14 @@ } } }, - "examples": { - "referral_data": { - "value": { - "individual_owners": [ - { - "names": [ - { - "prefix": "Mr.", - "given_name": "John", - "surname": "Doe", - "middle_name": "Middle", - "suffix": "Jr.", - "full_name": "John Middle Doe Jr.", - "type": "LEGAL" - } - ], - "citizenship": "US", - "addresses": [ - { - "address_line_1": "One Washington Square", - "address_line_2": "Apt 123", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95112", - "country_code": "US", - "type": "HOME" - } - ], - "phones": [ - { - "country_code": "1", - "national_number": "6692468839", - "extension_number": "1234", - "type": "MOBILE" - } - ], - "birth_details": { - "date_of_birth": "1955-12-29" - }, - "type": "PRIMARY" - } - ], - "business_entity": { - "business_type": { - "type": "INDIVIDUAL", - "subtype": "ASSO_TYPE_INCORPORATED" - }, - "business_industry": { - "category": "1004", - "mcc_code": "8931", - "subcategory": "2025" - }, - "business_incorporation": { - "incorporation_country_code": "US", - "incorporation_date": "1986-12-29" - }, - "names": [ - { - "business_name": "Test Enterprise", - "type": "LEGAL_NAME" - } - ], - "emails": [ - { - "type": "CUSTOMER_SERVICE", - "email": "customerservice@example.com" - } - ], - "website": "https://mystore.testenterprises.com", - "addresses": [ - { - "address_line_1": "One Washington Square", - "address_line_2": "Apt 123", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95112", - "country_code": "US", - "type": "WORK" - } - ], - "phones": [ - { - "country_code": "1", - "national_number": "6692478833", - "extension_number": "1234", - "type": "CUSTOMER_SERVICE" - } - ], - "beneficial_owners": { - "individual_beneficial_owners": [ - { - "names": [ - { - "prefix": "Mr.", - "given_name": "John", - "surname": "Doe", - "middle_name": "Middle", - "suffix": "Jr.", - "full_name": "John Middle Doe Jr.", - "type": "LEGAL" - } - ], - "citizenship": "US", - "addresses": [ - { - "address_line_1": "One Washington Square", - "address_line_2": "Apt 123", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95112", - "country_code": "US", - "type": "HOME" - } - ], - "phones": [ - { - "country_code": "1", - "national_number": "6692468839", - "extension_number": "1234", - "type": "MOBILE" - } - ], - "birth_details": { - "date_of_birth": "1955-12-29" - }, - "percentage_of_ownership": "50" - } - ], - "business_beneficial_owners": [ - { - "business_type": { - "type": "INDIVIDUAL", - "subtype": "ASSO_TYPE_INCORPORATED" - }, - "business_industry": { - "category": "1004", - "mcc_code": "8931", - "subcategory": "2025" - }, - "business_incorporation": { - "incorporation_country_code": "US", - "incorporation_date": "1986-12-29" - }, - "names": [ - { - "business_name": "Test Enterprise", - "type": "LEGAL_NAME" - } - ], - "emails": [ - { - "type": "CUSTOMER_SERVICE", - "email": "customerservice@example.com" - } - ], - "website": "https://mystore.testenterprises.com", - "addresses": [ - { - "address_line_1": "One Washington Square", - "address_line_2": "Apt 123", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95112", - "country_code": "US", - "type": "WORK" - } - ], - "phones": [ - { - "country_code": "1", - "national_number": "6692478833", - "extension_number": "1234", - "type": "CUSTOMER_SERVICE" - } - ], - "percentage_of_ownership": "50" - } - ] - }, - "office_bearers": [ - { - "names": [ - { - "prefix": "Mr.", - "given_name": "John", - "surname": "Doe", - "middle_name": "Middle", - "suffix": "Jr.", - "full_name": "John Middle Doe Jr.", - "type": "LEGAL" - } - ], - "citizenship": "US", - "addresses": [ - { - "address_line_1": "One Washington Square", - "address_line_2": "Apt 123", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95112", - "country_code": "US", - "type": "HOME" - } - ], - "phones": [ - { - "country_code": "1", - "national_number": "6692468839", - "extension_number": "1234", - "type": "MOBILE" - } - ], - "birth_details": { - "date_of_birth": "1955-12-29" - }, - "role": "DIRECTOR" - } - ], - "annual_sales_volume_range": { - "minimum_amount": { - "currency_code": "USD", - "value": "10000" - }, - "maximum_amount": { - "currency_code": "USD", - "value": "50000" - } - }, - "average_monthly_volume_range": { - "minimum_amount": { - "currency_code": "USD", - "value": "1000" - }, - "maximum_amount": { - "currency_code": "USD", - "value": "50000" - } - }, - "purpose_code": "P0104" - }, - "email": "accountemail@example.com", - "preferred_language_code": "en-US", - "tracking_id": "testenterprices123122", - "partner_config_override": { - "partner_logo_url": "https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg", - "return_url": "https://testenterprises.com/merchantonboarded", - "return_url_description": "the url to return the merchant after the paypal onboarding process.", - "action_renewal_url": "https://testenterprises.com/renew-exprired-url", - "show_add_credit_card": true - }, - "operations": [ - { - "operation": "BANK_ADDITION" - } - ], - "financial_instruments": { - "banks": [ - { - "nick_name": "Bank of America", - "account_number": "123405668293", - "account_type": "CHECKING", - "currency_code": "USD", - "identifiers": [ - { - "type": "ROUTING_NUMBER_1", - "value": "123456789" - } - ] - } - ] - }, - "legal_consents": [ - { - "type": "SHARE_DATA_CONSENT", - "granted": true - } - ], - "products": [ - "EXPRESS_CHECKOUT" - ] + "parameters": { + "partner_referral_id": { + "name": "partner_referral_id", + "in": "path", + "description": "The ID of the partner-referrals data for which to show details.", + "required": true, + "schema": { + "type": "string" } } } diff --git a/openapi/invoicing_v1.json b/openapi/invoicing_v1.json index 201d46c..891c201 100644 --- a/openapi/invoicing_v1.json +++ b/openapi/invoicing_v1.json @@ -3,7 +3,8 @@ "info": { "title": "Invoicing", "description": "
Deprecation notice: TheUse 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.13" + "version": "1.13", + "contact": {} }, "deprecated": true, "paths": { @@ -2910,4 +2911,4 @@ } } } -} \ No newline at end of file +} diff --git a/openapi/invoicing_v2.json b/openapi/invoicing_v2.json index 8169263..5c9a99d 100644 --- a/openapi/invoicing_v2.json +++ b/openapi/invoicing_v2.json @@ -3,7 +3,8 @@ "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" + "version": "2.3", + "contact": {} }, "paths": { "/v2/invoicing/invoices": { diff --git a/openapi/notifications_webhooks_v1.json b/openapi/notifications_webhooks_v1.json index dd88fd6..1a3649f 100644 --- a/openapi/notifications_webhooks_v1.json +++ b/openapi/notifications_webhooks_v1.json @@ -3,7 +3,71 @@ "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/v1/invoices
endpoint is deprecated. Use the/v2/invoices
endpoint instead. For details, see PayPal Invoicing Basic Integration.
notifications
namespace contains resource collections for webhooks.",
- "version": "1.11"
+ "version": "1.11",
+ "contact": {}
+ },
+ "servers": [
+ {
+ "url": "https://api-m.sandbox.paypal.com",
+ "description": "PayPal Sandbox Environment"
+ },
+ {
+ "url": "https://api-m.paypal.com",
+ "description": "PayPal Live Environment"
+ }
+ ],
+ "tags": [
+ {
+ "name": "webhooks",
+ "description": "Use the `/webhooks` resource to subscribe your webhook listener to events, list webhooks for an app, show details for, update, delete, and list event subscriptions for webhooks."
+ },
+ {
+ "name": "webhooks-lookup",
+ "description": "Use the `/webhooks-lookup` resource to create, list, show details for, and delete webhook lookups."
+ },
+ {
+ "name": "verify-webhook-signature",
+ "description": "Use the `/verify-webhook-signature` resource to verify a webhook signature."
+ },
+ {
+ "name": "webhooks-event-types",
+ "description": "Use the `/webhooks-event-types` resource to list available events to which any webhook can subscribe."
+ },
+ {
+ "name": "webhooks-events",
+ "description": "Use the `/webhooks-events` resource to list, show details for, and resend event notifications."
+ },
+ {
+ "name": "simulate-event",
+ "description": "Use the `/simulate-event` resource to use a sample payload to simulate a webhook event. The events that this call generates only serve to validate the connection to the listener URL and to show how webhook events look. Note: You can also use the Webhooks simulator to simulate webhook events." + }, + { + "name": "publish-event-with-payload", + "description": "Use the `/publish-event-with-payload` resource to publish an event with a specified payload." + }, + { + "name": "publish-event-with-reference", + "description": "Use the `/publish-event-with-reference` resource to publish an event with a specified reference." + }, + { + "name": "webhook-event-delivery-status", + "description": "Use the `/webhook-event-delivery-status` resource to show the webhook event send status." + }, + { + "name": "webhooks-error-types", + "description": "Use the `/error-types` resource to create and list available webhook error types." + }, + { + "name": "webhooks-errors", + "description": "Use the `/webhooks-errors` resource to create, list, show details for, and update webhook errors." + }, + { + "name": "batch-resend", + "description": "Use the `/batch-resend` resource to send out IPN/Webhooks in batches." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/webhooks/v1/" }, "paths": { "/v1/notifications/webhooks": { @@ -40,8 +104,18 @@ "$ref": "#/components/schemas/webhook" }, "examples": { - "0": { - "$ref": "#/components/examples/webhook" + "webhook": { + "value": { + "url": "https://example.com/example_webhook", + "event_types": [ + { + "name": "PAYMENT.AUTHORIZATION.CREATED" + }, + { + "name": "PAYMENT.AUTHORIZATION.VOIDED" + } + ] + } } } } @@ -464,8 +538,59 @@ "$ref": "#/components/schemas/verify_webhook_signature" }, "examples": { - "0": { - "$ref": "#/components/examples/verify_webhook_signature" + "verify_webhook_signature": { + "value": { + "transmission_id": "69cd13f0-d67a-11e5-baa3-778b53f4ae55", + "transmission_time": "2016-02-18T20:01:35Z", + "cert_url": "cert_url", + "auth_algo": "SHA256withRSA", + "transmission_sig": "lmI95Jx3Y9nhR5SJWlHVIWpg4AgFk7n9bCHSRxbrd8A9zrhdu2rMyFrmz+Zjh3s3boXB07VXCXUZy/UFzUlnGJn0wDugt7FlSvdKeIJenLRemUxYCPVoEZzg9VFNqOa48gMkvF+XTpxBeUx/kWy6B5cp7GkT2+pOowfRK7OaynuxUoKW3JcMWw272VKjLTtTAShncla7tGF+55rxyt2KNZIIqxNMJ48RDZheGU5w1npu9dZHnPgTXB9iomeVRoD8O/jhRpnKsGrDschyNdkeh81BJJMH4Ctc6lnCCquoP/GzCzz33MMsNdid7vL/NIWaCsekQpW26FpWPi/tfj8nLA==", + "webhook_id": "1JE4291016473214C", + "webhook_event": { + "id": "8PT597110X687430LKGECATA", + "create_time": "2013-06-25T21:41:28Z", + "resource_type": "authorization", + "event_type": "PAYMENT.AUTHORIZATION.CREATED", + "summary": "A payment authorization was created", + "resource": { + "id": "2DC87612EK520411B", + "create_time": "2013-06-25T21:39:15Z", + "update_time": "2013-06-25T21:39:17Z", + "state": "authorized", + "amount": { + "total": "7.47", + "currency": "USD", + "details": { + "subtotal": "7.47" + } + }, + "parent_payment": "PAY-36246664YD343335CKHFA4AY", + "valid_until": "2013-07-24T21:39:15Z", + "links": [ + { + "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B/capture", + "rel": "capture", + "method": "POST" + }, + { + "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B/void", + "rel": "void", + "method": "POST" + }, + { + "href": "https://api-m.paypal.com/v1/payments/payment/PAY-36246664YD343335CKHFA4AY", + "rel": "parent_payment", + "method": "GET" + } + ] + } + } + } } } } @@ -653,11 +778,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/event_resend" - }, - "examples": { - "0": { - "$ref": "#/components/examples/event_resend" - } } } } @@ -708,8 +828,12 @@ "$ref": "#/components/schemas/simulate_event" }, "examples": { - "0": { - "$ref": "#/components/examples/simulate_event" + "simulate_event": { + "value": { + "url": "https://example.com/example_webhook", + "event_type": "PAYMENT.AUTHORIZATION.CREATED", + "resource_version": "1.0" + } } } } @@ -728,69 +852,6 @@ } } }, - "tags": [ - { - "name": "webhooks", - "description": "Use the `/webhooks` resource to subscribe your webhook listener to events, list webhooks for an app, show details for, update, delete, and list event subscriptions for webhooks." - }, - { - "name": "webhooks-lookup", - "description": "Use the `/webhooks-lookup` resource to create, list, show details for, and delete webhook lookups." - }, - { - "name": "verify-webhook-signature", - "description": "Use the `/verify-webhook-signature` resource to verify a webhook signature." - }, - { - "name": "webhooks-event-types", - "description": "Use the `/webhooks-event-types` resource to list available events to which any webhook can subscribe." - }, - { - "name": "webhooks-events", - "description": "Use the `/webhooks-events` resource to list, show details for, and resend event notifications." - }, - { - "name": "simulate-event", - "description": "Use the `/simulate-event` resource to use a sample payload to simulate a webhook event. The events that this call generates only serve to validate the connection to the listener URL and to show how webhook events look.
Note: You can also use the Webhooks simulator to simulate webhook events." - }, - { - "name": "publish-event-with-payload", - "description": "Use the `/publish-event-with-payload` resource to publish an event with a specified payload." - }, - { - "name": "publish-event-with-reference", - "description": "Use the `/publish-event-with-reference` resource to publish an event with a specified reference." - }, - { - "name": "webhook-event-delivery-status", - "description": "Use the `/webhook-event-delivery-status` resource to show the webhook event send status." - }, - { - "name": "webhooks-error-types", - "description": "Use the `/error-types` resource to create and list available webhook error types." - }, - { - "name": "webhooks-errors", - "description": "Use the `/webhooks-errors` resource to create, list, show details for, and update webhook errors." - }, - { - "name": "batch-resend", - "description": "Use the `/batch-resend` resource to send out IPN/Webhooks in batches." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/webhooks/v1/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "securitySchemes": { "Oauth2": { @@ -808,74 +869,6 @@ } }, "schemas": { - "EventTypeList": { - "type": "object", - "title": "Event Type List", - "description": "A list of webhook events.", - "properties": { - "event_types": { - "type": "array", - "description": "An array of webhook events.", - "items": { - "$ref": "#/components/schemas/event_type" - } - } - } - }, - "WebhookList": { - "type": "object", - "title": "Webhook List", - "description": "A list of webhooks.", - "properties": { - "webhooks": { - "type": "array", - "description": "An array of webhooks.", - "items": { - "$ref": "#/components/schemas/webhook" - } - } - } - }, - "EventList": { - "type": "object", - "title": "Event List", - "description": "A list of webhooks events.", - "properties": { - "events": { - "type": "array", - "description": "An array of webhooks events.", - "items": { - "$ref": "#/components/schemas/event" - } - }, - "count": { - "type": "integer", - "description": "The number of items in each range of results. Note that the response might have fewer items than the requested `page_size` value." - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description" - } - } - } - }, - "WebhookLookupList": { - "type": "object", - "title": "Webhook Lookup List", - "description": "A list of webhook lookups.", - "properties": { - "webhooks_lookups": { - "type": "array", - "description": "An array of webhook lookups.", - "items": { - "$ref": "#/components/schemas/webhooks_lookup" - } - } - } - }, "error_details": { "title": "Error Details", "type": "object", @@ -890,9 +883,7 @@ "description": "The value of the field that caused the error." }, "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" + "$ref": "#/components/schemas/error_location" }, "issue": { "type": "string", @@ -907,37 +898,15 @@ "issue" ] }, - "error_default": { - "description": "The default error response.", - "oneOf": [ - { - "$ref": "#/components/schemas/error_400" - }, - { - "$ref": "#/components/schemas/error_401" - }, - { - "$ref": "#/components/schemas/error_403" - }, - { - "$ref": "#/components/schemas/error_404" - }, - { - "$ref": "#/components/schemas/error_409" - }, - { - "$ref": "#/components/schemas/error_415" - }, - { - "$ref": "#/components/schemas/error_422" - }, - { - "$ref": "#/components/schemas/error_500" - }, - { - "$ref": "#/components/schemas/error_503" - } - ] + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" }, "error_link_description": { "title": "Link Description", @@ -966,17 +935,14 @@ "description": "The HTTP method required to make the related call.", "type": "string", "minLength": 3, - "maxLength": 7, + "maxLength": 6, "pattern": "^[A-Z]*$", "enum": [ - "CONNECT", - "DELETE", "GET", - "HEAD", - "OPTIONS", - "PATCH", "POST", - "PUT" + "PUT", + "DELETE", + "PATCH" ] } } @@ -1328,6 +1294,105 @@ "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" } }, + "EventTypeList": { + "type": "object", + "title": "Event Type List", + "description": "A list of webhook events.", + "properties": { + "event_types": { + "type": "array", + "description": "An array of webhook events.", + "items": { + "$ref": "#/components/schemas/event_type" + } + } + } + }, + "WebhookList": { + "type": "object", + "title": "Webhook List", + "description": "A list of webhooks.", + "properties": { + "webhooks": { + "type": "array", + "description": "An array of webhooks.", + "items": { + "$ref": "#/components/schemas/webhook" + } + } + } + }, + "EventList": { + "type": "object", + "title": "Event List", + "description": "A list of webhooks events.", + "properties": { + "events": { + "type": "array", + "description": "An array of webhooks events.", + "items": { + "$ref": "#/components/schemas/event" + } + }, + "count": { + "type": "integer", + "description": "The number of items in each range of results. Note that the response might have fewer items than the requested `page_size` value." + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description" + } + } + } + }, + "WebhookLookupList": { + "type": "object", + "title": "Webhook Lookup List", + "description": "A list of webhook lookups.", + "properties": { + "webhooks_lookups": { + "type": "array", + "description": "An array of webhook lookups.", + "items": { + "$ref": "#/components/schemas/webhooks_lookup" + } + } + } + }, + "error_details-2": { + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique, fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value." + } + }, + "required": [ + "issue" + ] + }, "link_description": { "type": "object", "title": "Link Description", @@ -1387,7 +1452,7 @@ "type": "array", "description": "An array of additional details about the error.", "items": { - "$ref": "#/components/schemas/error_details" + "$ref": "#/components/schemas/error_details-2" } }, "links": { @@ -1829,107 +1894,6 @@ "pattern": "^[a-zA-Z0-9]+$" } } - }, - "examples": { - "patch_request": { - "value": [ - { - "op": "replace", - "path": "/url", - "value": "https://example.com/example_webhook_2" - }, - { - "op": "replace", - "path": "/event_types", - "value": [ - { - "name": "PAYMENT.SALE.REFUNDED" - } - ] - } - ] - }, - "verify_webhook_signature": { - "value": { - "transmission_id": "69cd13f0-d67a-11e5-baa3-778b53f4ae55", - "transmission_time": "2016-02-18T20:01:35Z", - "cert_url": "cert_url", - "auth_algo": "SHA256withRSA", - "transmission_sig": "lmI95Jx3Y9nhR5SJWlHVIWpg4AgFk7n9bCHSRxbrd8A9zrhdu2rMyFrmz+Zjh3s3boXB07VXCXUZy/UFzUlnGJn0wDugt7FlSvdKeIJenLRemUxYCPVoEZzg9VFNqOa48gMkvF+XTpxBeUx/kWy6B5cp7GkT2+pOowfRK7OaynuxUoKW3JcMWw272VKjLTtTAShncla7tGF+55rxyt2KNZIIqxNMJ48RDZheGU5w1npu9dZHnPgTXB9iomeVRoD8O/jhRpnKsGrDschyNdkeh81BJJMH4Ctc6lnCCquoP/GzCzz33MMsNdid7vL/NIWaCsekQpW26FpWPi/tfj8nLA==", - "webhook_id": "1JE4291016473214C", - "webhook_event": { - "id": "8PT597110X687430LKGECATA", - "create_time": "2013-06-25T21:41:28Z", - "resource_type": "authorization", - "event_type": "PAYMENT.AUTHORIZATION.CREATED", - "summary": "A payment authorization was created", - "resource": { - "id": "2DC87612EK520411B", - "create_time": "2013-06-25T21:39:15Z", - "update_time": "2013-06-25T21:39:17Z", - "state": "authorized", - "amount": { - "total": "7.47", - "currency": "USD", - "details": { - "subtotal": "7.47" - } - }, - "parent_payment": "PAY-36246664YD343335CKHFA4AY", - "valid_until": "2013-07-24T21:39:15Z", - "links": [ - { - "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B/capture", - "rel": "capture", - "method": "POST" - }, - { - "href": "https://api-m.paypal.com/v1/payments/authorization/2DC87612EK520411B/void", - "rel": "void", - "method": "POST" - }, - { - "href": "https://api-m.paypal.com/v1/payments/payment/PAY-36246664YD343335CKHFA4AY", - "rel": "parent_payment", - "method": "GET" - } - ] - } - } - } - }, - "event_resend": { - "value": { - "webhook_ids": [ - "12334456" - ] - } - }, - "simulate_event": { - "value": { - "url": "https://example.com/example_webhook", - "event_type": "PAYMENT.AUTHORIZATION.CREATED", - "resource_version": "1.0" - } - }, - "webhook": { - "value": { - "url": "https://example.com/example_webhook", - "event_types": [ - { - "name": "PAYMENT.AUTHORIZATION.CREATED" - }, - { - "name": "PAYMENT.AUTHORIZATION.VOIDED" - } - ] - } - } } } } diff --git a/openapi/payment-experience_web_experience_profiles_v1.json b/openapi/payment-experience_web_experience_profiles_v1.json index 902325a..247a5ca 100644 --- a/openapi/payment-experience_web_experience_profiles_v1.json +++ b/openapi/payment-experience_web_experience_profiles_v1.json @@ -3,7 +3,27 @@ "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" + "version": "1.3", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "web-profiles", + "description": "Use the `/payment-experience/web-profiles` resource to create, show details for, list, update, partially update, and delete web experience profiles." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/payment-experience/v1/" }, "paths": { "/v1/payment-experience/web-profiles": { @@ -56,9 +76,6 @@ "parameters": [ { "$ref": "#/components/parameters/paypal_request_id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -128,11 +145,6 @@ ] } ], - "parameters": [ - { - "$ref": "#/components/parameters/content_type" - } - ], "tags": [ "web-profiles" ] @@ -171,9 +183,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -227,9 +236,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -239,8 +245,18 @@ "$ref": "#/components/schemas/patch_request" }, "examples": { - "0": { - "$ref": "#/components/examples/patch_request" + "patch_request": { + "value": [ + { + "op": "add", + "path": "/presentation/brand_name", + "value": "new_brand_name" + }, + { + "op": "remove", + "path": "/flow_config/landing_page_type" + } + ] } } } @@ -301,9 +317,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -354,9 +367,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -377,25 +387,6 @@ } } }, - "tags": [ - { - "name": "web-profiles", - "description": "Use the `/payment-experience/web-profiles` resource to create, show details for, list, update, partially update, and delete web experience profiles." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/payment-experience/v1/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "requestBodies": { "web_profile": { @@ -403,11 +394,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/web_profile" - }, - "examples": { - "0": { - "$ref": "#/components/examples/web_profile" - } } } } @@ -428,35 +414,6 @@ } } }, - "parameters": { - "paypal_request_id": { - "name": "PayPal-Request-Id", - "in": "header", - "description": "The server stores keys for three hours.", - "required": true, - "schema": { - "type": "string" - } - }, - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "Required for operations with a request body. The value is application/
Deprecation notice: TheUse 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./v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
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"
+ "version": "1.12",
+ "contact": {}
+ },
+ "servers": [
+ {
+ "url": "https://api-m.sandbox.paypal.com",
+ "description": "PayPal Sandbox Environment"
+ },
+ {
+ "url": "https://api-m.paypal.com",
+ "description": "PayPal Live Environment"
+ }
+ ],
+ "tags": [
+ {
+ "name": "payment",
+ "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/payment
resource to create a sale, an authorized payment, or an order. A sale is a direct credit card payment, stored credit card payment, or PayPal payment. An authorized payment places funds on hold to be captured later. An order is a purchase that a customer has approved but for which the funds are not placed on hold. You can also use this resource to execute approved PayPal payments and show details for, update, and list payments. For more information, see also ."
+ },
+ {
+ "name": "sale",
+ "description": "Deprecation notice: TheA sale is a completed payment. Use the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/sale
resource to show sale details and refund a sale. For more information, see also Refund payments."
+ },
+ {
+ "name": "authorization",
+ "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/authorization
resource and related sub-resources to show details for, capture, void, and reauthorize an authorization."
+ },
+ {
+ "name": "orders",
+ "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/orders
resource to authorize, capture, void, and show details for an order.Note: You cannot refund an order directly. Instead, you must refund a completed payment for an order. For integration information, see Orders and refund payment.For more information, see also Orders." + }, + { + "name": "capture", + "description": "
Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/capture
resource and sub-resources to show details for and refund captured payments."
+ },
+ {
+ "name": "refund",
+ "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/refund
resource to show details for a refund on direct and captured payments."
+ },
+ {
+ "name": "receipt",
+ "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/receipt
resource to show details for a payment receipt."
+ }
+ ],
+ "externalDocs": {
+ "url": "https://developer.paypal.com/docs/api/payments/v1/"
},
- "deprecated": true,
"paths": {
"/v1/payments/payment": {
"post": {
@@ -46,8 +89,73 @@
"$ref": "#/components/schemas/payment"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/payment"
+ "payment": {
+ "value": {
+ "intent": "sale",
+ "payer": {
+ "payment_method": "paypal"
+ },
+ "transactions": [
+ {
+ "amount": {
+ "total": "30.11",
+ "currency": "USD",
+ "details": {
+ "subtotal": "30.00",
+ "tax": "0.07",
+ "shipping": "0.03",
+ "handling_fee": "1.00",
+ "shipping_discount": "-1.00",
+ "insurance": "0.01"
+ }
+ },
+ "description": "The payment transaction description.",
+ "custom": "EBAY_EMS_90048630024435",
+ "invoice_number": "48787589673",
+ "payment_options": {
+ "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
+ },
+ "soft_descriptor": "ECHI5786786",
+ "item_list": {
+ "items": [
+ {
+ "name": "hat",
+ "description": "Brown hat.",
+ "quantity": "5",
+ "price": "3",
+ "tax": "0.01",
+ "sku": "1",
+ "currency": "USD"
+ },
+ {
+ "name": "handbag",
+ "description": "Black handbag.",
+ "quantity": "1",
+ "price": "15",
+ "tax": "0.02",
+ "sku": "product34",
+ "currency": "USD"
+ }
+ ],
+ "shipping_address": {
+ "recipient_name": "Brian Robinson",
+ "line1": "4th Floor",
+ "line2": "Unit #34",
+ "city": "San Jose",
+ "country_code": "US",
+ "postal_code": "95131",
+ "phone": "011862212345678",
+ "state": "CA"
+ }
+ }
+ }
+ ],
+ "note_to_payer": "Contact us for any questions on your order.",
+ "redirect_urls": {
+ "return_url": "https://example.com/return",
+ "cancel_url": "https://example.com/cancel"
+ }
+ }
}
}
}
@@ -264,8 +372,32 @@
"$ref": "#/components/schemas/patch_request"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/patch_request"
+ "patch_request": {
+ "value": [
+ {
+ "op": "replace",
+ "path": "/transactions/0/amount",
+ "value": {
+ "total": "18.37",
+ "currency": "EUR",
+ "details": {
+ "subtotal": "13.37",
+ "shipping": "5.00"
+ }
+ }
+ },
+ {
+ "op": "add",
+ "path": "/transactions/0/item_list/shipping_address",
+ "value": {
+ "recipient_name": "Anna Gruneberg",
+ "line1": "Kathwarinenhof 1",
+ "city": "Flensburg",
+ "postal_code": "24939",
+ "country_code": "DE"
+ }
+ }
+ ]
}
}
}
@@ -343,8 +475,10 @@
"$ref": "#/components/schemas/payment_execution"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/payment_execution"
+ "payment_execution": {
+ "value": {
+ "payer_id": "CR87QHB7JTRSC"
+ }
}
}
}
@@ -487,7 +621,24 @@
}
],
"requestBody": {
- "$ref": "#/components/requestBodies/refund_request"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/refund_request"
+ },
+ "examples": {
+ "refund_request": {
+ "value": {
+ "amount": {
+ "total": "100.00",
+ "currency": "USD"
+ },
+ "invoice_number": "INV-7654321"
+ }
+ }
+ }
+ }
+ }
},
"security": [
{
@@ -528,11 +679,6 @@
"application/json": {
"schema": {
"$ref": "#/components/schemas/authorization"
- },
- "examples": {
- "0": {
- "$ref": "#/components/examples/authorization"
- }
}
}
}
@@ -613,7 +759,24 @@
}
],
"requestBody": {
- "$ref": "#/components/requestBodies/capture"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/capture"
+ },
+ "examples": {
+ "capture": {
+ "value": {
+ "amount": {
+ "currency": "USD",
+ "total": "4.54"
+ },
+ "is_final_capture": true
+ }
+ }
+ }
+ }
+ }
},
"security": [
{
@@ -779,11 +942,6 @@
"application/json": {
"schema": {
"$ref": "#/components/schemas/order"
- },
- "examples": {
- "0": {
- "$ref": "#/components/examples/order"
- }
}
}
}
@@ -1207,49 +1365,6 @@
}
}
},
- "tags": [
- {
- "name": "payment",
- "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/payment
resource to create a sale, an authorized payment, or an order. A sale is a direct credit card payment, stored credit card payment, or PayPal payment. An authorized payment places funds on hold to be captured later. An order is a purchase that a customer has approved but for which the funds are not placed on hold. You can also use this resource to execute approved PayPal payments and show details for, update, and list payments. For more information, see also ."
- },
- {
- "name": "sale",
- "description": "Deprecation notice: TheA sale is a completed payment. Use the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/sale
resource to show sale details and refund a sale. For more information, see also Refund payments."
- },
- {
- "name": "authorization",
- "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/authorization
resource and related sub-resources to show details for, capture, void, and reauthorize an authorization."
- },
- {
- "name": "orders",
- "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/orders
resource to authorize, capture, void, and show details for an order.Note: You cannot refund an order directly. Instead, you must refund a completed payment for an order. For integration information, see Orders and refund payment.For more information, see also Orders." - }, - { - "name": "capture", - "description": "
Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/capture
resource and sub-resources to show details for and refund captured payments."
- },
- {
- "name": "refund",
- "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/refund
resource to show details for a refund on direct and captured payments."
- },
- {
- "name": "receipt",
- "description": "Deprecation notice: TheUse the/v1/payments
endpoint is deprecated. Use the/v2/payments
endpoint instead. For details, see PayPal Checkout Basic Integration.
/receipt
resource to show details for a payment receipt."
- }
- ],
- "externalDocs": {
- "url": "https://developer.paypal.com/docs/api/payments/v1/"
- },
- "servers": [
- {
- "url": "https://api-m.sandbox.paypal.com",
- "description": "PayPal Sandbox Environment"
- },
- {
- "url": "https://api-m.paypal.com",
- "description": "PayPal Live Environment"
- }
- ],
"components": {
"requestBodies": {
"capture": {
@@ -1257,11 +1372,6 @@
"application/json": {
"schema": {
"$ref": "#/components/schemas/capture"
- },
- "examples": {
- "0": {
- "$ref": "#/components/examples/capture"
- }
}
}
}
@@ -1271,11 +1381,6 @@
"application/json": {
"schema": {
"$ref": "#/components/schemas/refund_request"
- },
- "examples": {
- "0": {
- "$ref": "#/components/examples/refund_request"
- }
}
}
}
@@ -1304,161 +1409,6 @@
}
}
},
- "parameters": {
- "paypal_partner_attribution_id": {
- "name": "PayPal-Partner-Attribution-Id",
- "in": "header",
- "required": false,
- "schema": {
- "type": "string",
- "maxLength": 32
- }
- },
- "count": {
- "name": "count",
- "in": "query",
- "description": "The number of items to list in the response.",
- "required": false,
- "schema": {
- "type": "integer",
- "maximum": 20,
- "default": 10
- }
- },
- "start_id": {
- "name": "start_id",
- "in": "query",
- "description": "The ID of the starting resource in the response. When results are paged, you can use the `next_id` value as the `start_id` to continue with the next set of results.",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- "start_index": {
- "name": "start_index",
- "in": "query",
- "description": "The start index of the payments to list. Typically, you use the `start_index` to jump to a specific position in the resource history based on its cart. For example, to start at the second item in a list of results, specify `?start_index=2`.",
- "required": false,
- "schema": {
- "type": "integer"
- }
- },
- "start_time": {
- "name": "start_time",
- "in": "query",
- "description": "The start date and time for the range to show in the response, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, `start_time=2016-03-06T11:00:00Z`.",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- "end_time": {
- "name": "end_time",
- "in": "query",
- "description": "The end date and time for the range to show in the response, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, `end_time=2016-03-06T11:00:00Z`.",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- "payee_id": {
- "name": "payee_id",
- "in": "query",
- "description": "Filters the payments in the response by a PayPal-assigned merchant ID that identifies the payee.",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- "sort_by": {
- "name": "sort_by",
- "in": "query",
- "description": "Sorts the payments in the response by a create time.",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "create_time"
- ]
- }
- },
- "sort_order": {
- "name": "sort_order",
- "in": "query",
- "description": "Sorts the payments in the response in descending order.",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "desc"
- ]
- }
- },
- "payment_id": {
- "name": "payment_id",
- "in": "path",
- "description": "The ID of the payment to execute.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "paypal_request_id": {
- "name": "PayPal-Request-Id",
- "description": "The server stores keys for 30 days.",
- "in": "header",
- "required": false,
- "schema": {
- "type": "string",
- "maxLength": 78
- }
- },
- "sale_id": {
- "name": "sale_id",
- "in": "path",
- "description": "The ID of the sale transaction to refund.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "authorization_id": {
- "name": "authorization_id",
- "in": "path",
- "description": "The ID of the authorization to re-authorize.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "order_id": {
- "name": "order_id",
- "in": "path",
- "description": "The ID of the order to authorize.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "capture_id": {
- "name": "capture_id",
- "in": "path",
- "description": "The ID of the captured payment to refund.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "refund_id": {
- "name": "refund_id",
- "in": "path",
- "description": "The ID of the refund for which to show details.",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- },
"schemas": {
"error_details": {
"title": "Error Details",
@@ -1474,9 +1424,7 @@
"description": "The value of the field that caused the error."
},
"location": {
- "type": "string",
- "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
- "default": "body"
+ "$ref": "#/components/schemas/error_location"
},
"issue": {
"type": "string",
@@ -1491,37 +1439,15 @@
"issue"
]
},
- "error_default": {
- "description": "The default error response.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/error_400"
- },
- {
- "$ref": "#/components/schemas/error_401"
- },
- {
- "$ref": "#/components/schemas/error_403"
- },
- {
- "$ref": "#/components/schemas/error_404"
- },
- {
- "$ref": "#/components/schemas/error_409"
- },
- {
- "$ref": "#/components/schemas/error_415"
- },
- {
- "$ref": "#/components/schemas/error_422"
- },
- {
- "$ref": "#/components/schemas/error_500"
- },
- {
- "$ref": "#/components/schemas/error_503"
- }
- ]
+ "error_location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "enum": [
+ "body",
+ "path",
+ "query"
+ ],
+ "default": "body"
},
"error_link_description": {
"title": "Link Description",
@@ -1550,17 +1476,14 @@
"description": "The HTTP method required to make the related call.",
"type": "string",
"minLength": 3,
- "maxLength": 7,
+ "maxLength": 6,
"pattern": "^[A-Z]*$",
"enum": [
- "CONNECT",
- "DELETE",
"GET",
- "HEAD",
- "OPTIONS",
- "PATCH",
"POST",
- "PUT"
+ "PUT",
+ "DELETE",
+ "PATCH"
]
}
}
@@ -1912,6 +1835,37 @@
"information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE"
}
},
+ "error_details-2": {
+ "title": "Error Details",
+ "type": "object",
+ "description": "The error details. Required for client-side `4XX` errors.",
+ "properties": {
+ "field": {
+ "type": "string",
+ "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors."
+ },
+ "value": {
+ "type": "string",
+ "description": "The value of the field that caused the error."
+ },
+ "location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "default": "body"
+ },
+ "issue": {
+ "type": "string",
+ "description": "The unique, fine-grained application-level error code."
+ },
+ "description": {
+ "type": "string",
+ "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value."
+ }
+ },
+ "required": [
+ "issue"
+ ]
+ },
"link_description": {
"type": "object",
"title": "Link Description",
@@ -1971,7 +1925,7 @@
"type": "array",
"description": "An array of additional details about the error.",
"items": {
- "$ref": "#/components/schemas/error_details"
+ "$ref": "#/components/schemas/error_details-2"
}
},
"links": {
@@ -3760,141 +3714,161 @@
]
}
},
- "examples": {
- "patch_request": {
- "value": [
- {
- "op": "replace",
- "path": "/transactions/0/amount",
- "value": {
- "total": "18.37",
- "currency": "EUR",
- "details": {
- "subtotal": "13.37",
- "shipping": "5.00"
- }
- }
- },
- {
- "op": "add",
- "path": "/transactions/0/item_list/shipping_address",
- "value": {
- "recipient_name": "Anna Gruneberg",
- "line1": "Kathwarinenhof 1",
- "city": "Flensburg",
- "postal_code": "24939",
- "country_code": "DE"
- }
- }
- ]
+ "parameters": {
+ "paypal_partner_attribution_id": {
+ "name": "PayPal-Partner-Attribution-Id",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "maxLength": 32
+ }
},
- "payment_execution": {
- "value": {
- "payer_id": "CR87QHB7JTRSC"
+ "count": {
+ "name": "count",
+ "in": "query",
+ "description": "The number of items to list in the response.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "maximum": 20,
+ "default": 10
}
},
- "capture": {
- "value": {
- "amount": {
- "currency": "USD",
- "total": "4.54"
- },
- "is_final_capture": true
+ "start_id": {
+ "name": "start_id",
+ "in": "query",
+ "description": "The ID of the starting resource in the response. When results are paged, you can use the `next_id` value as the `start_id` to continue with the next set of results.",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
- "authorization": {
- "value": {
- "amount": {
- "total": "7.00",
- "currency": "USD"
- }
+ "start_index": {
+ "name": "start_index",
+ "in": "query",
+ "description": "The start index of the payments to list. Typically, you use the `start_index` to jump to a specific position in the resource history based on its cart. For example, to start at the second item in a list of results, specify `?start_index=2`.",
+ "required": false,
+ "schema": {
+ "type": "integer"
}
},
- "refund_request": {
- "value": {
- "amount": {
- "total": "100.00",
- "currency": "USD"
- },
- "invoice_number": "INV-7654321"
+ "start_time": {
+ "name": "start_time",
+ "in": "query",
+ "description": "The start date and time for the range to show in the response, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, `start_time=2016-03-06T11:00:00Z`.",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
- "order": {
- "value": {
- "amount": {
- "currency": "USD",
- "total": "4.54"
- }
+ "end_time": {
+ "name": "end_time",
+ "in": "query",
+ "description": "The end date and time for the range to show in the response, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, `end_time=2016-03-06T11:00:00Z`.",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
- "payment": {
- "value": {
- "intent": "sale",
- "payer": {
- "payment_method": "paypal"
- },
- "transactions": [
- {
- "amount": {
- "total": "30.11",
- "currency": "USD",
- "details": {
- "subtotal": "30.00",
- "tax": "0.07",
- "shipping": "0.03",
- "handling_fee": "1.00",
- "shipping_discount": "-1.00",
- "insurance": "0.01"
- }
- },
- "description": "The payment transaction description.",
- "custom": "EBAY_EMS_90048630024435",
- "invoice_number": "48787589673",
- "payment_options": {
- "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
- },
- "soft_descriptor": "ECHI5786786",
- "item_list": {
- "items": [
- {
- "name": "hat",
- "description": "Brown hat.",
- "quantity": "5",
- "price": "3",
- "tax": "0.01",
- "sku": "1",
- "currency": "USD"
- },
- {
- "name": "handbag",
- "description": "Black handbag.",
- "quantity": "1",
- "price": "15",
- "tax": "0.02",
- "sku": "product34",
- "currency": "USD"
- }
- ],
- "shipping_address": {
- "recipient_name": "Brian Robinson",
- "line1": "4th Floor",
- "line2": "Unit #34",
- "city": "San Jose",
- "country_code": "US",
- "postal_code": "95131",
- "phone": "011862212345678",
- "state": "CA"
- }
- }
- }
- ],
- "note_to_payer": "Contact us for any questions on your order.",
- "redirect_urls": {
- "return_url": "https://example.com/return",
- "cancel_url": "https://example.com/cancel"
- }
+ "payee_id": {
+ "name": "payee_id",
+ "in": "query",
+ "description": "Filters the payments in the response by a PayPal-assigned merchant ID that identifies the payee.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "sort_by": {
+ "name": "sort_by",
+ "in": "query",
+ "description": "Sorts the payments in the response by a create time.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "enum": [
+ "create_time"
+ ]
+ }
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "in": "query",
+ "description": "Sorts the payments in the response in descending order.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "enum": [
+ "desc"
+ ]
+ }
+ },
+ "payment_id": {
+ "name": "payment_id",
+ "in": "path",
+ "description": "The ID of the payment to execute.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "paypal_request_id": {
+ "name": "PayPal-Request-Id",
+ "description": "The server stores keys for 30 days.",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "maxLength": 78
+ }
+ },
+ "sale_id": {
+ "name": "sale_id",
+ "in": "path",
+ "description": "The ID of the sale transaction to refund.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "authorization_id": {
+ "name": "authorization_id",
+ "in": "path",
+ "description": "The ID of the authorization to re-authorize.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "in": "path",
+ "description": "The ID of the order to authorize.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "capture_id": {
+ "name": "capture_id",
+ "in": "path",
+ "description": "The ID of the captured payment to refund.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "refund_id": {
+ "name": "refund_id",
+ "in": "path",
+ "description": "The ID of the refund for which to show details.",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
}
- }
-}
\ No newline at end of file
+ },
+ "deprecated": true
+}
diff --git a/openapi/payments_payment_v2.json b/openapi/payments_payment_v2.json
index c74c9c7..2a23704 100644
--- a/openapi/payments_payment_v2.json
+++ b/openapi/payments_payment_v2.json
@@ -3,7 +3,51 @@
"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.5"
+ "version": "2.5",
+ "contact": {}
+ },
+ "servers": [
+ {
+ "url": "https://api-m.sandbox.paypal.com",
+ "description": "PayPal Sandbox Environment"
+ },
+ {
+ "url": "https://api-m.paypal.com",
+ "description": "PayPal Live Environment"
+ }
+ ],
+ "tags": [
+ {
+ "name": "authorizations",
+ "description": "Use the `/authorizations` resource to show details for, capture payment for, reauthorize, and void authorized payments."
+ },
+ {
+ "name": "captures",
+ "description": "Use the `/captures` resource to show details for and refund a captured payment."
+ },
+ {
+ "name": "refunds",
+ "description": "Use the `/refunds` resource to show refund details."
+ },
+ {
+ "name": "assets",
+ "description": "Assets APIs for Checkout"
+ },
+ {
+ "name": "cancel-payment",
+ "description": "Use the /cancel-payment
resource to cancel an order capture or order authorization by PayPal-Request-Id
. The merchant triggers the cancel action."
+ },
+ {
+ "name": "find-eligible-methods",
+ "description": "Use the `/find-eligible-methods` resource to show list of eligible payment methods for given customer/order context."
+ },
+ {
+ "name": "payment-resource-operations",
+ "description": "Use the `/payment-resource-operations` resource to show verifications details."
+ }
+ ],
+ "externalDocs": {
+ "url": "https://developer.paypal.com/docs/api/payments/v2/"
},
"paths": {
"/v2/payments/authorizations/{authorization_id}": {
@@ -14,9 +58,6 @@
"parameters": [
{
"$ref": "#/components/parameters/authorization_id"
- },
- {
- "$ref": "#/components/parameters/content_type"
}
],
"responses": {
@@ -107,9 +148,6 @@
},
{
"$ref": "#/components/parameters/prefer"
- },
- {
- "$ref": "#/components/parameters/content_type"
}
],
"requestBody": {
@@ -119,8 +157,17 @@
"$ref": "#/components/schemas/capture_request"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/capture_request"
+ "capture_request": {
+ "value": {
+ "amount": {
+ "value": "10.99",
+ "currency_code": "USD"
+ },
+ "invoice_id": "INVOICE-123",
+ "final_capture": true,
+ "note_to_payer": "If the ordered color is not available, we will substitute with a different color free of charge.",
+ "soft_descriptor": "Bob's Custom Sweaters"
+ }
}
}
}
@@ -248,9 +295,6 @@
},
{
"$ref": "#/components/parameters/prefer"
- },
- {
- "$ref": "#/components/parameters/content_type"
}
],
"requestBody": {
@@ -260,8 +304,13 @@
"$ref": "#/components/schemas/reauthorize_request"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/reauthorize_request"
+ "reauthorize_request": {
+ "value": {
+ "amount": {
+ "value": "10.99",
+ "currency_code": "USD"
+ }
+ }
}
}
}
@@ -384,9 +433,6 @@
{
"$ref": "#/components/parameters/authorization_id"
},
- {
- "$ref": "#/components/parameters/content_type"
- },
{
"$ref": "#/components/parameters/paypal_auth_assertion"
},
@@ -530,9 +576,6 @@
"parameters": [
{
"$ref": "#/components/parameters/capture_id"
- },
- {
- "$ref": "#/components/parameters/content_type"
}
],
"responses": {
@@ -624,9 +667,6 @@
{
"$ref": "#/components/parameters/prefer"
},
- {
- "$ref": "#/components/parameters/content_type"
- },
{
"$ref": "#/components/parameters/paypal_auth_assertion"
}
@@ -638,8 +678,25 @@
"$ref": "#/components/schemas/refund_request"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/refund_request"
+ "refund_request": {
+ "value": {
+ "amount": {
+ "value": "10.00",
+ "currency_code": "USD"
+ },
+ "invoice_id": "INVOICE-123",
+ "note_to_payer": "DefectiveProduct",
+ "payment_instruction": {
+ "platform_fees": [
+ {
+ "amount": {
+ "currency_code": "USD",
+ "value": "1.00"
+ }
+ }
+ ]
+ }
+ }
}
}
}
@@ -785,9 +842,6 @@
"parameters": [
{
"$ref": "#/components/parameters/refund_id"
- },
- {
- "$ref": "#/components/parameters/content_type"
}
],
"responses": {
@@ -872,49 +926,6 @@
}
}
},
- "tags": [
- {
- "name": "authorizations",
- "description": "Use the `/authorizations` resource to show details for, capture payment for, reauthorize, and void authorized payments."
- },
- {
- "name": "captures",
- "description": "Use the `/captures` resource to show details for and refund a captured payment."
- },
- {
- "name": "refunds",
- "description": "Use the `/refunds` resource to show refund details."
- },
- {
- "name": "assets",
- "description": "Assets APIs for Checkout"
- },
- {
- "name": "cancel-payment",
- "description": "Use the /cancel-payment
resource to cancel an order capture or order authorization by PayPal-Request-Id
. The merchant triggers the cancel action."
- },
- {
- "name": "find-eligible-methods",
- "description": "Use the `/find-eligible-methods` resource to show list of eligible payment methods for given customer/order context."
- },
- {
- "name": "payment-resource-operations",
- "description": "Use the `/payment-resource-operations` resource to show verifications details."
- }
- ],
- "externalDocs": {
- "url": "https://developer.paypal.com/docs/api/payments/v2/"
- },
- "servers": [
- {
- "url": "https://api-m.sandbox.paypal.com",
- "description": "PayPal Sandbox Environment"
- },
- {
- "url": "https://api-m.paypal.com",
- "description": "PayPal Live Environment"
- }
- ],
"components": {
"securitySchemes": {
"Oauth2": {
@@ -934,72 +945,6 @@
}
}
},
- "parameters": {
- "authorization_id": {
- "name": "authorization_id",
- "in": "path",
- "description": "The PayPal-generated ID for the authorized payment to void.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- "content_type": {
- "name": "Content-Type",
- "in": "header",
- "description": "Required for operations with a request body. The value is application/return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.", - "required": false, - "schema": { - "type": "string" - } - }, - "capture_id": { - "name": "capture_id", - "in": "path", - "description": "The PayPal-generated ID for the captured payment to refund.", - "required": true, - "schema": { - "type": "string" - } - }, - "refund_id": { - "name": "refund_id", - "in": "path", - "description": "The PayPal-generated ID for the refund for which to show details.", - "required": true, - "schema": { - "type": "string" - } - } - }, "responses": { "default": { "description": "The default response.", @@ -1552,9 +1497,7 @@ "description": "The value of the field that caused the error." }, "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" + "$ref": "#/components/schemas/error_location" }, "issue": { "type": "string", @@ -1569,6 +1512,16 @@ "issue" ] }, + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" + }, "error_default": { "description": "The default error response.", "oneOf": [ @@ -1628,17 +1581,14 @@ "description": "The HTTP method required to make the related call.", "type": "string", "minLength": 3, - "maxLength": 7, + "maxLength": 6, "pattern": "^[A-Z]*$", "enum": [ - "CONNECT", - "DELETE", "GET", - "HEAD", - "OPTIONS", - "PATCH", "POST", - "PUT" + "PUT", + "DELETE", + "PATCH" ] } } @@ -4012,47 +3962,62 @@ } } }, - "examples": { - "capture_request": { - "value": { - "amount": { - "value": "10.99", - "currency_code": "USD" - }, - "invoice_id": "INVOICE-123", - "final_capture": true, - "note_to_payer": "If the ordered color is not available, we will substitute with a different color free of charge.", - "soft_descriptor": "Bob's Custom Sweaters" + "parameters": { + "authorization_id": { + "name": "authorization_id", + "in": "path", + "description": "The PayPal-generated ID for the authorized payment to void.", + "required": true, + "schema": { + "type": "string" } }, - "refund_request": { - "value": { - "amount": { - "value": "10.00", - "currency_code": "USD" - }, - "invoice_id": "INVOICE-123", - "note_to_payer": "DefectiveProduct", - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "USD", - "value": "1.00" - } - } - ] - } + "paypal_request_id": { + "name": "PayPal-Request-Id", + "in": "header", + "description": "The server stores keys for 45 days.", + "required": false, + "schema": { + "type": "string" } }, - "reauthorize_request": { - "value": { - "amount": { - "value": "10.99", - "currency_code": "USD" - } + "prefer": { + "name": "Prefer", + "in": "header", + "description": "The preferred server response upon successful completion of the request. Value is:
return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id
, status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.", + "required": false, + "schema": { + "type": "string" + } + }, + "capture_id": { + "name": "capture_id", + "in": "path", + "description": "The PayPal-generated ID for the captured payment to refund.", + "required": true, + "schema": { + "type": "string" + } + }, + "refund_id": { + "name": "refund_id", + "in": "path", + "description": "The PayPal-generated ID for the refund for which to show details.", + "required": true, + "schema": { + "type": "string" } } } } -} +} \ No newline at end of file diff --git a/openapi/payments_payouts_batch_v1.json b/openapi/payments_payouts_batch_v1.json index 716407b..2222f0b 100644 --- a/openapi/payments_payouts_batch_v1.json +++ b/openapi/payments_payouts_batch_v1.json @@ -3,7 +3,39 @@ "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.9" + "version": "1.9", + "contact": {} + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "payouts", + "description": "Use the `/payouts` resource to create a batch payout, update the status for a batch payout, show the status of a batch payout with the transaction status and other data for individual payout items, and request approval for a batch payout." + }, + { + "name": "payouts-item", + "description": "Use the `/payouts-item` resource to show payout item details and cancel an unclaimed payout item." + }, + { + "name": "payouts-statistics", + "description": "Use the `/payouts-statistics` resource to show statistics for a batch payout by date range." + }, + { + "name": "payouts-disbursement-notifications", + "description": "Use the `payouts/disbursement-notifications` resource for status updates from
VENMO
"
+ }
+ ],
+ "externalDocs": {
+ "url": "https://developer.paypal.com/docs/api/payments.payouts-batch/v1/"
},
"paths": {
"/v1/payments/payouts": {
@@ -75,8 +107,53 @@
"$ref": "#/components/schemas/create_payout_request"
},
"examples": {
- "0": {
- "$ref": "#/components/examples/create_payout_request"
+ "create_payout_request": {
+ "value": {
+ "sender_batch_header": {
+ "sender_batch_id": "Payouts_2018_100007",
+ "email_subject": "You have a payout!",
+ "email_message": "You have received a payout! Thanks for using our service!"
+ },
+ "items": [
+ {
+ "recipient_type": "EMAIL",
+ "amount": {
+ "value": "9.87",
+ "currency": "USD"
+ },
+ "note": "Thanks for your patronage!",
+ "sender_item_id": "201403140001",
+ "receiver": "receiver@example.com",
+ "alternate_notification_method": {
+ "phone": {
+ "country_code": "91",
+ "national_number": "9999988888"
+ }
+ },
+ "notification_language": "fr-FR"
+ },
+ {
+ "recipient_type": "PHONE",
+ "amount": {
+ "value": "112.34",
+ "currency": "USD"
+ },
+ "note": "Thanks for your support!",
+ "sender_item_id": "201403140002",
+ "receiver": "91-734-234-1234"
+ },
+ {
+ "recipient_type": "PAYPAL_ID",
+ "amount": {
+ "value": "5.32",
+ "currency": "USD"
+ },
+ "note": "Thanks for your patronage!",
+ "sender_item_id": "201403140003",
+ "receiver": "G83JXTJ5EHCQ2"
+ }
+ ]
+ }
}
}
}
@@ -309,37 +386,6 @@
}
}
},
- "tags": [
- {
- "name": "payouts",
- "description": "Use the `/payouts` resource to create a batch payout, update the status for a batch payout, show the status of a batch payout with the transaction status and other data for individual payout items, and request approval for a batch payout."
- },
- {
- "name": "payouts-item",
- "description": "Use the `/payouts-item` resource to show payout item details and cancel an unclaimed payout item."
- },
- {
- "name": "payouts-statistics",
- "description": "Use the `/payouts-statistics` resource to show statistics for a batch payout by date range."
- },
- {
- "name": "payouts-disbursement-notifications",
- "description": "Use the `payouts/disbursement-notifications` resource for status updates from VENMO
"
- }
- ],
- "externalDocs": {
- "url": "https://developer.paypal.com/docs/api/payments.payouts-batch/v1/"
- },
- "servers": [
- {
- "url": "https://api-m.sandbox.paypal.com",
- "description": "PayPal Sandbox Environment"
- },
- {
- "url": "https://api-m.paypal.com",
- "description": "PayPal Live Environment"
- }
- ],
"components": {
"securitySchemes": {
"Oauth2": {
@@ -356,88 +402,6 @@
}
}
},
- "parameters": {
- "paypal_request_id": {
- "name": "PayPal-Request-Id",
- "in": "header",
- "description": "The server stores keys for 30 days.",
- "required": false,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 1000,
- "pattern": "^.*$"
- }
- },
- "id": {
- "name": "id",
- "in": "path",
- "description": "The ID of the payout for which to show details.",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 1000,
- "pattern": "^.*$"
- }
- },
- "fields": {
- "name": "fields",
- "in": "query",
- "description": "Shows details for only the specified fields.",
- "required": false,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 1000,
- "pattern": "^.*$"
- }
- },
- "page": {
- "name": "page",
- "in": "query",
- "description": "A non-zero integer representing the page of the results.",
- "required": false,
- "schema": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1000,
- "default": 1
- }
- },
- "page_size": {
- "name": "page_size",
- "in": "query",
- "description": "The maximum number of results to return at one time. Value is a non-negative, non-zero integer. If the user chooses pagination, the maximum page is `1000`.",
- "required": false,
- "schema": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1000
- }
- },
- "total_required": {
- "name": "total_required",
- "in": "query",
- "description": "Indicates whether to show the total items and total pages count in the response.",
- "schema": {
- "type": "boolean",
- "default": false
- }
- },
- "payout_item_id": {
- "name": "payout_item_id",
- "in": "path",
- "description": "The ID of the payout item to cancel.",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32,
- "pattern": "^.*$"
- }
- }
- },
"schemas": {
"error_details": {
"title": "Error Details",
@@ -453,9 +417,7 @@
"description": "The value of the field that caused the error."
},
"location": {
- "type": "string",
- "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
- "default": "body"
+ "$ref": "#/components/schemas/error_location"
},
"issue": {
"type": "string",
@@ -470,37 +432,15 @@
"issue"
]
},
- "error_default": {
- "description": "The default error response.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/error_400"
- },
- {
- "$ref": "#/components/schemas/error_401"
- },
- {
- "$ref": "#/components/schemas/error_403"
- },
- {
- "$ref": "#/components/schemas/error_404"
- },
- {
- "$ref": "#/components/schemas/error_409"
- },
- {
- "$ref": "#/components/schemas/error_415"
- },
- {
- "$ref": "#/components/schemas/error_422"
- },
- {
- "$ref": "#/components/schemas/error_500"
- },
- {
- "$ref": "#/components/schemas/error_503"
- }
- ]
+ "error_location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "enum": [
+ "body",
+ "path",
+ "query"
+ ],
+ "default": "body"
},
"error_link_description": {
"title": "Link Description",
@@ -529,17 +469,14 @@
"description": "The HTTP method required to make the related call.",
"type": "string",
"minLength": 3,
- "maxLength": 7,
+ "maxLength": 6,
"pattern": "^[A-Z]*$",
"enum": [
- "CONNECT",
- "DELETE",
"GET",
- "HEAD",
- "OPTIONS",
- "PATCH",
"POST",
- "PUT"
+ "PUT",
+ "DELETE",
+ "PATCH"
]
}
}
@@ -1143,6 +1080,37 @@
"items"
]
},
+ "error_details-2": {
+ "title": "Error Details",
+ "type": "object",
+ "description": "The error details. Required for client-side `4XX` errors.",
+ "properties": {
+ "field": {
+ "type": "string",
+ "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors."
+ },
+ "value": {
+ "type": "string",
+ "description": "The value of the field that caused the error."
+ },
+ "location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "default": "body"
+ },
+ "issue": {
+ "type": "string",
+ "description": "The unique, fine-grained application-level error code."
+ },
+ "description": {
+ "type": "string",
+ "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value."
+ }
+ },
+ "required": [
+ "issue"
+ ]
+ },
"link_description": {
"type": "object",
"title": "Link Description",
@@ -1202,7 +1170,7 @@
"type": "array",
"description": "An array of additional details about the error.",
"items": {
- "$ref": "#/components/schemas/error_details"
+ "$ref": "#/components/schemas/error_details-2"
}
},
"links": {
@@ -1755,55 +1723,87 @@
]
}
},
- "examples": {
- "create_payout_request": {
- "value": {
- "sender_batch_header": {
- "sender_batch_id": "Payouts_2018_100007",
- "email_subject": "You have a payout!",
- "email_message": "You have received a payout! Thanks for using our service!"
- },
- "items": [
- {
- "recipient_type": "EMAIL",
- "amount": {
- "value": "9.87",
- "currency": "USD"
- },
- "note": "Thanks for your patronage!",
- "sender_item_id": "201403140001",
- "receiver": "receiver@example.com",
- "alternate_notification_method": {
- "phone": {
- "country_code": "91",
- "national_number": "9999988888"
- }
- },
- "notification_language": "fr-FR"
- },
- {
- "recipient_type": "PHONE",
- "amount": {
- "value": "112.34",
- "currency": "USD"
- },
- "note": "Thanks for your support!",
- "sender_item_id": "201403140002",
- "receiver": "91-734-234-1234"
- },
- {
- "recipient_type": "PAYPAL_ID",
- "amount": {
- "value": "5.32",
- "currency": "USD"
- },
- "note": "Thanks for your patronage!",
- "sender_item_id": "201403140003",
- "receiver": "G83JXTJ5EHCQ2"
- }
- ]
+ "parameters": {
+ "paypal_request_id": {
+ "name": "PayPal-Request-Id",
+ "in": "header",
+ "description": "The server stores keys for 30 days.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 1000,
+ "pattern": "^.*$"
+ }
+ },
+ "id": {
+ "name": "id",
+ "in": "path",
+ "description": "The ID of the payout for which to show details.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 1000,
+ "pattern": "^.*$"
+ }
+ },
+ "fields": {
+ "name": "fields",
+ "in": "query",
+ "description": "Shows details for only the specified fields.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 1000,
+ "pattern": "^.*$"
+ }
+ },
+ "page": {
+ "name": "page",
+ "in": "query",
+ "description": "A non-zero integer representing the page of the results.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1000,
+ "default": 1
+ }
+ },
+ "page_size": {
+ "name": "page_size",
+ "in": "query",
+ "description": "The maximum number of results to return at one time. Value is a non-negative, non-zero integer. If the user chooses pagination, the maximum page is `1000`.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1000
+ }
+ },
+ "total_required": {
+ "name": "total_required",
+ "in": "query",
+ "description": "Indicates whether to show the total items and total pages count in the response.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ }
+ },
+ "payout_item_id": {
+ "name": "payout_item_id",
+ "in": "path",
+ "description": "The ID of the payout item to cancel.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 32,
+ "pattern": "^.*$"
}
}
}
}
-}
+}
\ No newline at end of file
diff --git a/openapi/reporting_transactions_v1.json b/openapi/reporting_transactions_v1.json
index bb96147..6b5316f 100644
--- a/openapi/reporting_transactions_v1.json
+++ b/openapi/reporting_transactions_v1.json
@@ -1,1737 +1,1738 @@
{
- "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": { - "/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:", - "operationId": "search.get", - "responses": { - "200": { - "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists transactions .", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/search_response" - } - } - } - }, - "default": { - "$ref": "#/components/responses/default" - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/transaction_id" - }, - { - "$ref": "#/components/parameters/transaction_type" - }, - { - "$ref": "#/components/parameters/transaction_status" - }, - { - "$ref": "#/components/parameters/transaction_amount" - }, - { - "$ref": "#/components/parameters/transaction_currency" - }, - { - "$ref": "#/components/parameters/start_date" - }, - { - "$ref": "#/components/parameters/end_date" - }, - { - "$ref": "#/components/parameters/payment_instrument_type" - }, - { - "$ref": "#/components/parameters/store_id" - }, - { - "$ref": "#/components/parameters/terminal_id" - }, - { - "$ref": "#/components/parameters/fields" - }, - { - "$ref": "#/components/parameters/balance_affecting_records_only" - }, - { - "$ref": "#/components/parameters/page_size" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/reporting/search/read" - ] - } - ], - "tags": [ - "transactions" - ] - } + "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.
- 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.
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", + "contact": {} }, - "/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:", - "operationId": "balances.get", - "responses": { - "200": { - "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists balances .", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/balances_response" - } - } - } - }, - "400": { - "description": "The request is not well-formed, is syntactically incorrect, or violates schema.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_400" - } - } + "paths": { + "/v1/reporting/transactions": { + "get": { + "summary": "List transactions", + "description": "Lists transactions. Specify one or more query parameters to filter the transaction that appear in the response.
- 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.
Notes:", + "operationId": "search.get", + "responses": { + "200": { + "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists transactions .", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/search_response" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/transaction_id" + }, + { + "$ref": "#/components/parameters/transaction_type" + }, + { + "$ref": "#/components/parameters/transaction_status" + }, + { + "$ref": "#/components/parameters/transaction_amount" + }, + { + "$ref": "#/components/parameters/transaction_currency" + }, + { + "$ref": "#/components/parameters/start_date" + }, + { + "$ref": "#/components/parameters/end_date" + }, + { + "$ref": "#/components/parameters/payment_instrument_type" + }, + { + "$ref": "#/components/parameters/store_id" + }, + { + "$ref": "#/components/parameters/terminal_id" + }, + { + "$ref": "#/components/parameters/fields" + }, + { + "$ref": "#/components/parameters/balance_affecting_records_only" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/reporting/search/read" + ] + } + ], + "tags": [ + "transactions" + ] } - }, - "403": { - "description": "Authorization failed due to insufficient permissions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_403" - } - } - } - }, - "500": { - "description": "An internal server error occurred.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_500" - } - } - } - }, - "default": { - "$ref": "#/components/responses/default" - } }, - "parameters": [ - { - "$ref": "#/components/parameters/as_of_time" - }, - { - "$ref": "#/components/parameters/currency_code" - } - ], - "security": [ - { - "Oauth2": [ - "https://uri.paypal.com/services/reporting/balances/read" - ] - } - ], - "tags": [ - "balances" - ] - } - } - }, - "tags": [ - { - "name": "transactions", - "description": "Use the `/transactions` resource to list transactions." - }, - { - "name": "partner-transactions", - "description": "Use the `/partner-transactions` resource to list transactions." - }, - { - "name": "balances", - "description": "Use the `/balances` resource to list balances." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/integration/direct/transaction-search/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Live Environment" - } - ], - "components": { - "securitySchemes": { - "Oauth2": { - "type": "oauth2", - "description": "Oauth 2.0 authentication", - "flows": { - "clientCredentials": { - "tokenUrl": "/v1/oauth2/token", - "scopes": { - "https://uri.paypal.com/services/reporting/search/read": "Transactions Search", - "https://uri.paypal.com/services/reporting/balances/read": "List Balances" - } - } - } - } - }, - "parameters": { - "transaction_id": { - "name": "transaction_id", - "in": "query", - "description": "Filters the transactions in the response by a PayPal transaction ID. A valid transaction ID is 17 characters long, except for an order ID, which is 19 characters long.
- 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.
Note: A transaction ID is not unique in the reporting system. The response can list two transactions with the same ID. One transaction can be balance affecting while the other is non-balance affecting.", - "schema": { - "type": "string", - "minLength": 17, - "maxLength": 19 - } - }, - "transaction_type": { - "name": "transaction_type", - "in": "query", - "description": "Filters the transactions in the response by a PayPal transaction event code. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/).", - "schema": { - "type": "string" - } - }, - "transaction_status": { - "name": "transaction_status", - "in": "query", - "description": "Filters the transactions in the response by a PayPal transaction status code. Value is:
Status code | Description |
---|---|
D | PayPal or merchant rules denied the transaction. |
P | The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S . |
S | The transaction successfully completed without a denial and after any pending statuses. |
V | A successful transaction was reversed and funds were refunded to the original sender. |
Note:The values must be URL encoded.", - "schema": { - "type": "string" - } - }, - "transaction_currency": { - "name": "transaction_currency", - "in": "query", - "description": "Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency.", - "schema": { - "type": "string" - } - }, - "start_date": { - "name": "start_date", - "in": "query", - "description": "Filters the transactions in the response by a start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional.", - "required": true, - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - "end_date": { - "name": "end_date", - "in": "query", - "description": "Filters the transactions in the response by an end date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional. The maximum supported range is 31 days.", - "required": true, - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - "payment_instrument_type": { - "name": "payment_instrument_type", - "in": "query", - "description": "Filters the transactions in the response by a payment instrument type. Value is either:
CREDITCARD
. Returns a direct credit card transaction with a corresponding value.DEBITCARD
. Returns a debit card transaction with a corresponding value.transaction_info
value returns only the transaction details in the response. To include all fields in the response, specify fields=all
. Valid fields are:transaction_info
. The transaction information. Includes the ID of the PayPal account of the payee, the PayPal-generated transaction ID, the PayPal-generated base ID, the PayPal reference ID type, the transaction event code, the date and time when the transaction was initiated and was last updated, the transaction amounts including the PayPal fee, any discounts, insurance, the transaction status, and other information about the transaction.payer_info
. The payer information. Includes the PayPal customer account ID and the payer's email address, primary phone number, name, country code, address, and whether the payer is verified or unverified.shipping_info
. The shipping information. Includes the recipient's name, the shipping method for this order, the shipping address for this order, and the secondary address associated with this order.auction_info
. The auction information. Includes the name of the auction site, the auction site URL, the ID of the customer who makes the purchase in the auction, and the date and time when the auction closes.cart_info
. The cart information. Includes an array of item details, whether the item amount or the shipping amount already includes tax, and the ID of the invoice for PayPal-generated invoices.incentive_info
. An array of incentive detail objects. Each object includes the incentive, such as a special offer or coupon, the incentive amount, and the incentive program code that identifies a merchant loyalty or incentive program.store_info
. The store information. Includes the ID of the merchant store and the terminal ID for the checkout stand in the merchant store.Y
. The default. The response includes only balance transactions.N
. The response includes all transactions.Notes:", + "operationId": "balances.get", + "responses": { + "200": { + "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that lists balances .", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/balances_response" + } + } + } + }, + "400": { + "description": "The request is not well-formed, is syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_400" + } + } + } + }, + "403": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_403" + } + } + } + }, + "500": { + "description": "An internal server error occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/as_of_time" + }, + { + "$ref": "#/components/parameters/currency_code" + } + ], + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/reporting/balances/read" + ] + } + ], + "tags": [ + "balances" + ] } - } } - } }, - "schemas": { - "error_details": { - "title": "Error Details", - "type": "object", - "description": "The error details. Required for client-side `4XX` errors.", - "properties": { - "field": { - "type": "string", - "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors." - }, - "value": { - "type": "string", - "description": "The value of the field that caused the error." - }, - "location": { - "type": "string", - "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", - "default": "body" - }, - "issue": { - "type": "string", - "description": "The unique, fine-grained application-level error code." - }, - "description": { - "type": "string", - "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value." - } + "tags": [ + { + "name": "transactions", + "description": "Use the `/transactions` resource to list transactions." }, - "required": [ - "issue" - ] - }, - "error_default": { - "description": "The default error response.", - "oneOf": [ - { - "$ref": "#/components/schemas/error_400" - }, - { - "$ref": "#/components/schemas/error_401" - }, - { - "$ref": "#/components/schemas/error_403" - }, - { - "$ref": "#/components/schemas/error_404" - }, - { - "$ref": "#/components/schemas/error_409" - }, - { - "$ref": "#/components/schemas/error_415" - }, - { - "$ref": "#/components/schemas/error_422" - }, - { - "$ref": "#/components/schemas/error_500" - }, - { - "$ref": "#/components/schemas/error_503" - } - ] - }, - "error_link_description": { - "title": "Link Description", - "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", - "type": "object", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", - "type": "string", - "minLength": 0, - "maxLength": 20000, - "pattern": "^.*$" - }, - "rel": { - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", - "type": "string", - "minLength": 0, - "maxLength": 100, - "pattern": "^.*$" - }, - "method": { - "description": "The HTTP method required to make the related call.", - "type": "string", - "minLength": 3, - "maxLength": 7, - "pattern": "^[A-Z]*$", - "enum": [ - "CONNECT", - "DELETE", - "GET", - "HEAD", - "OPTIONS", - "PATCH", - "POST", - "PUT" - ] - } - } - }, - "error_400": { - "type": "object", - "title": "Bad Request Error", - "description": "Request is not well-formed, syntactically incorrect, or violates schema.", - "properties": { - "name": { - "type": "string", - "enum": [ - "INVALID_REQUEST" - ] - }, - "message": { - "type": "string", - "enum": [ - "Request is not well-formed, syntactically incorrect, or violates schema." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } - } - }, - "error_401": { - "type": "object", - "title": "Unauthorized Error", - "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", - "properties": { - "name": { - "type": "string", - "enum": [ - "AUTHENTICATION_FAILURE" - ] - }, - "message": { - "type": "string", - "enum": [ - "Authentication failed due to missing authorization header, or invalid authentication credentials." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } - } - }, - "error_403": { - "type": "object", - "title": "Not Authorized Error", - "description": "The client is not authorized to access this resource, although it may have valid credentials. ", - "properties": { - "name": { - "type": "string", - "enum": [ - "NOT_AUTHORIZED" - ] - }, - "message": { - "type": "string", - "enum": [ - "Authorization failed due to insufficient permissions." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } - } - }, - "error_404": { - "type": "object", - "title": "Not found Error", - "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", - "properties": { - "name": { - "type": "string", - "enum": [ - "RESOURCE_NOT_FOUND" - ] - }, - "message": { - "type": "string", - "enum": [ - "The specified resource does not exist." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } - } - }, - "error_409": { - "type": "object", - "title": "Resource Conflict Error", - "description": "The server has detected a conflict while processing this request.", - "properties": { - "name": { - "type": "string", - "enum": [ - "RESOURCE_CONFLICT" - ] - }, - "message": { - "type": "string", - "enum": [ - "The server has detected a conflict while processing this request." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } - } - }, - "error_415": { - "type": "object", - "title": "Unsupported Media Type Error", - "description": "The server does not support the request payload's media type.", - "properties": { - "name": { - "type": "string", - "enum": [ - "UNSUPPORTED_MEDIA_TYPE" - ] - }, - "message": { - "type": "string", - "enum": [ - "The server does not support the request payload's media type." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } + { + "name": "partner-transactions", + "description": "Use the `/partner-transactions` resource to list transactions." + }, + { + "name": "balances", + "description": "Use the `/balances` resource to list balances." } - }, - "error_422": { - "type": "object", - "title": "Unprocessable Entity Error", - "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", - "properties": { - "name": { - "type": "string", - "enum": [ - "UNPROCESSABLE_ENTITY" - ] - }, - "message": { - "type": "string", - "enum": [ - "The requested action could not be performed, semantically incorrect, or failed business validation." - ] - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error_details" - } - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" - } - } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/integration/direct/transaction-search/" + }, + "servers": [ + { + "url": "https://api-m.paypal.com/v1/reporting" } - }, - "error_500": { - "type": "object", - "title": "Internal Server Error", - "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", - "properties": { - "name": { - "type": "string", - "enum": [ - "INTERNAL_SERVER_ERROR" - ] - }, - "message": { - "type": "string", - "enum": [ - "An internal server error occurred." - ] - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" + ], + "components": { + "securitySchemes": { + "Oauth2": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/reporting/search/read": "Transactions Search", + "https://uri.paypal.com/services/reporting/balances/read": "List Balances" + } + } + } } - } }, - "example": { - "name": "INTERNAL_SERVER_ERROR", - "message": "An internal server error occurred.", - "debug_id": "90957fca61718", - "links": [ - { - "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", - "rel": "information_link" - } - ] - } - }, - "error_503": { - "type": "object", - "title": "Service Unavailable Error", - "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", - "properties": { - "name": { - "type": "string", - "enum": [ - "SERVICE_UNAVAILABLE" - ] - }, - "message": { - "type": "string", - "enum": [ - "Service Unavailable." - ] - }, - "debug_id": { - "type": "string", - "description": "The PayPal internal ID. Used for correlation purposes." - }, - "links": { - "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", - "type": "array", - "minItems": 0, - "maxItems": 10000, - "items": { - "$ref": "#/components/schemas/error_link_description" + "responses": { + "default": { + "description": "The default response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_default" + } + } + } } - } - }, - "example": { - "name": "SERVICE_UNAVAILABLE", - "message": "Service Unavailable.", - "debug_id": "90957fca61718", - "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" - } - }, - "date_time": { - "type": "string", - "description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
- 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.
Note: The regular expression provides guidance but does not reject all invalid dates.", - "format": "ppaas_date_time_v3", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - }, - "currency_code": { - "description": "The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency.", - "type": "string", - "format": "ppaas_common_currency_code_v2", - "minLength": 3, - "maxLength": 3 - }, - "money": { - "type": "object", - "title": "Money", - "description": "The currency and amount for a financial transaction, such as a balance or payment due.", - "properties": { - "currency_code": { - "$ref": "#/components/schemas/currency_code" - }, - "value": { - "type": "string", - "description": "The value, which might be:
T0001
. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/)."
- },
- "transaction_initiation_date": {
- "description": "The date and time when work on a transaction began in the PayPal system, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
- "$ref": "#/components/schemas/date_time"
- },
- "transaction_updated_date": {
- "description": "The date and time when the transaction was last changed, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
- "$ref": "#/components/schemas/date_time"
- },
- "transaction_amount": {
- "$ref": "#/components/schemas/money",
- "description": "The all-inclusive gross transaction amount that was transferred between the sender and receiver through PayPal."
- },
- "fee_amount": {
- "$ref": "#/components/schemas/money",
- "description": "The PayPal fee amount. All transaction fees are included in this amount, which is the record of fee associated with the transaction.Note: This field contains a value only when a transaction fee is applied and processed for this transaction." - }, - "discount_amount": { - "$ref": "#/components/schemas/money", - "description": "The reduction in price offered for goods or services purchased.
Note: This discount is for a price reduction that is offered for other than that at a individual item level." - }, - "insurance_amount": { - "$ref": "#/components/schemas/money", - "description": "An insurance charge. Guarantees the quality or delivery of a product." - }, - "sales_tax_amount": { - "$ref": "#/components/schemas/money", - "description": "The PayPal- or merchant-reported sales tax amount for the transaction." - }, - "shipping_amount": { - "$ref": "#/components/schemas/money", - "description": "The PayPal- or merchant-reported shipping amount for the transaction." - }, - "shipping_discount_amount": { - "$ref": "#/components/schemas/money", - "description": "The discount on the shipping amount." - }, - "shipping_tax_amount": { - "$ref": "#/components/schemas/money", - "description": "The tax on the shipping service." - }, - "other_amount": { - "$ref": "#/components/schemas/money", - "description": "The special amount that is added to the transaction." - }, - "tip_amount": { - "$ref": "#/components/schemas/money", - "description": "The tip." - }, - "transaction_status": { - "type": "string", - "description": "A code that indicates the transaction status. Value is:
Status code | Description |
---|---|
D | PayPal or merchant rules denied the transaction. |
P | The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S . |
S | The transaction successfully completed without a denial and after any pending statuses. |
V | A successful transaction was fully reversed and funds were refunded to the original sender. |
Note: If you specify one or more optional query parameters, the ending_balance
response field is empty.
"
- },
- "available_balance": {
- "$ref": "#/components/schemas/money",
- "description": "The available amount of transaction currency during the completion of this transaction."
- },
- "invoice_id": {
- "type": "string",
- "description": "The invoice ID that is sent by the merchant with the transaction.Note: If an invoice ID was sent with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing transaction is reported.", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "custom_field": { - "type": "string", - "description": "The merchant-provided custom text.
Note: Usually, this field includes the unique ID for payments made with MassPay type transaction.", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "protection_eligibility": { - "type": "string", - "description": "Indicates whether the transaction is eligible for protection. Value is:
01
. Eligible.02
. Not eligible03
. Partially eligible.PUI
, installment
, or mEFT
.Note: Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners in the EMEA region can use this attribute to note transactions that attract turn-over tax." - }, - "instrument_type": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "A high-level classification of the type of financial instrument that was used to fund a payment. The pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD, DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods (APM)." - }, - "instrument_sub_type": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "A finer-grained classification of the financial instrument that was used to fund a payment. For example, `Visa card` or a `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is not provided because the value is defined by an external party." - } - } - }, - "email_address": { - "type": "string", - "description": "The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the", - "format": "ppaas_common_email_address_v2", - "minLength": 3, - "maxLength": 254, - "pattern": "^.+@[^\"\\-].+$" - }, - "phone": { - "type": "object", - "title": "Phone", - "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", - "properties": { - "country_code": { - "type": "string", - "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", - "minLength": 1, - "maxLength": 3, - "pattern": "^[0-9]{1,3}?$" - }, - "national_number": { - "type": "string", - "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", - "minLength": 1, - "maxLength": 14, - "pattern": "^[0-9]{1,14}?$" - }, - "extension_number": { - "type": "string", - "description": "The extension number.", - "minLength": 1, - "maxLength": 15, - "pattern": "^[0-9]{1,15}?$" - } - }, - "required": [ - "country_code", - "national_number" - ] - }, - "name": { - "type": "object", - "title": "Name", - "description": "The name of the party.", - "properties": { - "prefix": { - "type": "string", - "description": "The prefix, or title, to the party's name.", - "maxLength": 140 - }, - "given_name": { - "type": "string", - "description": "When the party is a person, the party's given, or first, name.", - "maxLength": 140 - }, - "surname": { - "type": "string", - "description": "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.", - "maxLength": 140 - }, - "middle_name": { - "type": "string", - "description": "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name.", - "maxLength": 140 - }, - "suffix": { - "type": "string", - "description": "The suffix for the party's name.", - "maxLength": 140 - }, - "alternate_full_name": { - "type": "string", - "description": "DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business.", - "maxLength": 300 - }, - "full_name": { - "type": "string", - "description": "When the party is a person, the party's full name.", - "maxLength": 300 - } - } - }, - "country_code": { - "type": "string", - "description": "The [two-character ISO 3166-1 code](/docs/integration/direct/rest/country-codes/) that identifies the country or region.@
sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@
sign exists.
Note: The country code for Great Britain is", - "format": "ppaas_common_country_code_v2", - "maxLength": 2, - "minLength": 2, - "pattern": "^([A-Z]{2}|C2)$" - }, - "address": { - "type": "object", - "title": "Simple Postal Address (Coarse-Grained)", - "description": "A simple postal address with coarse-grained fields. Do not use for an international address. Use for backward compatibility only. Does not contain phone.", - "properties": { - "line1": { - "type": "string", - "description": "The first line of the address. For example, number or street." - }, - "line2": { - "type": "string", - "description": "The second line of the address. For example, suite or apartment number." - }, - "city": { - "type": "string", - "description": "The city name." - }, - "state": { - "type": "string", - "description": "The [code](/docs/api/reference/state-codes/) for a US state or the equivalent for other countries. Required for transactions if the address is in one of these countries: [Argentina](/docs/api/reference/state-codes/#argentina), [Brazil](/docs/api/reference/state-codes/#brazil), [Canada](/docs/api/reference/state-codes/#canada), [China](/docs/api/reference/state-codes/#china), [India](/docs/api/reference/state-codes/#india), [Italy](/docs/api/reference/state-codes/#italy), [Japan](/docs/api/reference/state-codes/#japan), [Mexico](/docs/api/reference/state-codes/#mexico), [Thailand](/docs/api/reference/state-codes/#thailand), or [United States](/docs/api/reference/state-codes/#usa). Maximum length is 40 single-byte characters." - }, - "country_code": { - "$ref": "#/components/schemas/country_code" - }, - "postal_code": { - "type": "string", - "description": "The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code)." - } }, - "required": [ - "line1", - "city", - "country_code" - ] - }, - "payer_info": { - "type": "object", - "title": "Payer Information", - "description": "The payer information.", - "properties": { - "account_id": { - "type": "string", - "description": "The PayPal` customer account ID.", - "minLength": 1, - "maxLength": 13, - "pattern": "^[a-zA-Z0-9]*$" - }, - "email_address": { - "description": "The email address of the payer.", - "$ref": "#/components/schemas/email_address" - }, - "phone_number": { - "description": "The primary phone number of the payer.", - "$ref": "#/components/schemas/phone" - }, - "address_status": { - "type": "string", - "minLength": 1, - "maxLength": 1, - "pattern": "^[N|Y]$", - "description": "The address status of the payer. Value is either:GB
and notUK
as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Y
. Verified.N
. Not verified.Note: The country code for Great Britain is", - "$ref": "#/components/schemas/country_code" - }, - "address": { - "description": "The payer address.", - "$ref": "#/components/schemas/address" - } - } - }, - "shipping_info": { - "type": "object", - "title": "Shipping Information", - "description": "The shipping information.", - "properties": { - "name": { - "type": "string", - "description": "The recipient's name.", - "minLength": 1, - "maxLength": 500, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "method": { - "type": "string", - "description": "The shipping method that is associated with this order.", - "minLength": 1, - "maxLength": 500, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "address": { - "$ref": "#/components/schemas/address", - "description": "The shipping address that is associated with this order." - }, - "secondary_shipping_address": { - "$ref": "#/components/schemas/address", - "description": "The secondary shipping address that is associated with this order." - } - } - }, - "item_detail_tax_amount": { - "type": "object", - "title": "Tax Amount", - "description": "The tax levied by a government on the purchase of goods or services.", - "properties": { - "tax_amount": { - "$ref": "#/components/schemas/money", - "description": "The tax levied by a government on the purchase of goods or services." - } - } - }, - "checkout_option": { - "type": "object", - "title": "Checkout Option", - "description": "A checkout option as a name-and-value pair.", - "properties": { - "checkout_option_name": { - "type": "string", - "description": "The checkout option name, such as `color` or `texture`.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "checkout_option_value": { - "type": "string", - "description": "The checkout option value. For example, the checkout option `color` might be `blue` or `red` while the checkout option `texture` might be `smooth` or `rippled`.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - } - } - }, - "item_detail": { - "type": "object", - "title": "Item Details", - "description": "The item details.", - "properties": { - "item_code": { - "type": "string", - "description": "An item code that identifies a merchant's goods or service.", - "minLength": 1, - "maxLength": 1000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "item_name": { - "type": "string", - "description": "The item name.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "item_description": { - "type": "string", - "description": "The item description.", - "minLength": 1, - "maxLength": 2000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "item_options": { - "type": "string", - "description": "The item options. Describes option choices on the purchase of the item in some detail.", - "minLength": 1, - "maxLength": 4000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "item_quantity": { - "type": "string", - "description": "The number of purchased units of goods or a service.", - "minLength": 1, - "maxLength": 4000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "item_unit_price": { - "$ref": "#/components/schemas/money", - "description": "The cost for each instance of goods or a service." - }, - "item_amount": { - "$ref": "#/components/schemas/money", - "description": "The amount of the payment for the item." - }, - "discount_amount": { - "$ref": "#/components/schemas/money", - "description": "The reduction in price associated with goods or a service." - }, - "adjustment_amount": { - "$ref": "#/components/schemas/money", - "description": "An increment or decrement to a purchase amount." - }, - "gift_wrap_amount": { - "$ref": "#/components/schemas/money", - "description": "The amount of money charged for gift wrapping an item." - }, - "tax_percentage": { - "$ref": "#/components/schemas/percentage", - "description": "A rate, expressed in hundreds, that is used to calculate a levy for the purchase of goods or services.", - "maxLength": 10, - "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" - }, - "tax_amounts": { - "type": "array", - "description": "An array of tax amounts levied by a government on the purchase of goods or services.", - "maxItems": 32767, - "minItems": 1, - "items": { - "$ref": "#/components/schemas/item_detail_tax_amount", - "description": "A tax levied by a government on the purchase of goods or services." - } - }, - "basic_shipping_amount": { - "$ref": "#/components/schemas/money", - "description": "The delivery cost." - }, - "extra_shipping_amount": { - "$ref": "#/components/schemas/money", - "description": "The cost for expedited delivery of the goods." - }, - "handling_amount": { - "$ref": "#/components/schemas/money", - "description": "A charge for processing the purchase of goods or services." - }, - "insurance_amount": { - "$ref": "#/components/schemas/money", - "description": "A charge for guaranteeing the quality of a product or delivery of a product." - }, - "total_item_amount": { - "$ref": "#/components/schemas/money", - "description": "The sum of all factors, item cost, discounts, tax, shipping, and so on, that goes into the cost of an item." - }, - "invoice_number": { - "type": "string", - "description": "The invoice number. An alphanumeric string that identifies a billing for a merchant.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "checkout_options": { - "type": "array", - "description": "An array of checkout options. Each option has a name and value.", - "items": { - "$ref": "#/components/schemas/checkout_option", - "description": "A checkout option as a name-and-value pair." + "schemas": { + "error_details": { + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "$ref": "#/components/schemas/error_location" + }, + "issue": { + "type": "string", + "description": "The unique, fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value." + } + }, + "required": [ + "issue" + ] }, - "minItems": 1, - "maxItems": 32767 - } - } - }, - "cart_info": { - "type": "object", - "title": "Cart Information", - "description": "The cart information.", - "properties": { - "item_details": { - "type": "array", - "description": "An array of item details.", - "maxItems": 32767, - "minItems": 1, - "items": { - "$ref": "#/components/schemas/item_detail" - } - }, - "tax_inclusive": { - "type": "boolean", - "description": "Indicates whether the item amount or the shipping amount already includes tax.", - "default": false - }, - "paypal_invoice_id": { - "type": "string", - "description": "The ID of the invoice. Appears for only PayPal-generated invoices.", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - } - } - }, - "store_info": { - "type": "object", - "title": "Store Information", - "description": "The store information.", - "properties": { - "store_id": { - "type": "string", - "description": "The ID of a store for a merchant in the system of record.", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-zA-Z0-9]*$" - }, - "terminal_id": { - "type": "string", - "description": "The terminal ID for the checkout stand in a merchant store.", - "minLength": 1, - "maxLength": 60, - "pattern": "^[a-zA-Z0-9]*$" - } - } - }, - "auction_info": { - "type": "object", - "title": "Auction Information", - "description": "The auction information.", - "properties": { - "auction_site": { - "type": "string", - "description": "The name of the auction site.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "auction_item_site": { - "type": "string", - "description": "The auction site URL.", - "minLength": 1, - "maxLength": 4000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "auction_buyer_id": { - "type": "string", - "description": "The ID of the buyer who makes the purchase in the auction. This ID might be different from the payer ID provided for the payment.", - "minLength": 1, - "maxLength": 500, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "auction_closing_date": { - "description": "The date and time when the auction closes, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_time" - } - } - }, - "incentive_detail": { - "type": "object", - "title": "Incentive Details", - "description": "The incentive details.", - "properties": { - "incentive_type": { - "type": "string", - "description": "The type of incentive, such as a special offer or coupon.", - "minLength": 1, - "maxLength": 500, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "incentive_code": { - "type": "string", - "description": "The code that identifies an incentive, such as a coupon.", - "minLength": 1, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "incentive_amount": { - "$ref": "#/components/schemas/money", - "description": "The incentive amount." - }, - "incentive_program_code": { - "type": "string", - "description": "The incentive program code that identifies a merchant loyalty or incentive program.", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - } - } - }, - "incentive_info": { - "type": "object", - "title": "Incentive Information", - "description": "The incentive details.", - "properties": { - "incentive_details": { - "type": "array", - "description": "An array of incentive details.", - "items": { - "$ref": "#/components/schemas/incentive_detail" + "error_location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "enum": [ + "body", + "path", + "query" + ], + "default": "body" }, - "maxItems": 32767, - "minItems": 1 - } - } - }, - "transaction_detail": { - "type": "object", - "title": "Transaction Details", - "description": "The transaction details.", - "properties": { - "transaction_info": { - "$ref": "#/components/schemas/transaction_info", - "description": "The transaction information." - }, - "payer_info": { - "$ref": "#/components/schemas/payer_info", - "description": "The payer information." - }, - "shipping_info": { - "$ref": "#/components/schemas/shipping_info", - "description": "The shipping information." - }, - "cart_info": { - "$ref": "#/components/schemas/cart_info", - "description": "The cart information." - }, - "store_info": { - "$ref": "#/components/schemas/store_info", - "description": "The store information." - }, - "auction_info": { - "$ref": "#/components/schemas/auction_info", - "description": "The auction information." - }, - "incentive_info": { - "$ref": "#/components/schemas/incentive_info", - "description": "The incentive information." - } - } - }, - "link_description": { - "type": "object", - "title": "Link Description", - "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "type": "string", - "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." - }, - "rel": { - "type": "string", - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." - }, - "method": { - "type": "string", - "description": "The HTTP method required to make the related call.", - "enum": [ - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "CONNECT", - "OPTIONS", - "PATCH" - ] - } - } - }, - "search_response": { - "type": "object", - "title": "Search Response", - "description": "The search response information.", - "properties": { - "transaction_details": { - "type": "array", - "maxItems": 2147483647, - "minItems": 1, - "items": { - "$ref": "#/components/schemas/transaction_detail" + "error_default": { + "description": "The default error response.", + "oneOf": [ + { + "$ref": "#/components/schemas/error_400" + }, + { + "$ref": "#/components/schemas/error_401" + }, + { + "$ref": "#/components/schemas/error_403" + }, + { + "$ref": "#/components/schemas/error_404" + }, + { + "$ref": "#/components/schemas/error_409" + }, + { + "$ref": "#/components/schemas/error_415" + }, + { + "$ref": "#/components/schemas/error_422" + }, + { + "$ref": "#/components/schemas/error_500" + }, + { + "$ref": "#/components/schemas/error_503" + } + ] + }, + "error_link_description": { + "title": "Link Description", + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "minLength": 0, + "maxLength": 20000, + "pattern": "^.*$" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string", + "minLength": 0, + "maxLength": 100, + "pattern": "^.*$" + }, + "method": { + "description": "The HTTP method required to make the related call.", + "type": "string", + "minLength": 3, + "maxLength": 6, + "pattern": "^[A-Z]*$", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "PATCH" + ] + } + } }, - "description": "An array of transaction detail objects." - }, - "account_number": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[a-zA-Z0-9]*$", - "description": "The merchant account number." - }, - "start_date": { - "description": "The start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_time" - }, - "end_date": { - "description": "The end date and time or the last date when the data can be served, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_time" - }, - "last_refreshed_datetime": { - "description": "The date and time when the data was last refreshed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_time" - }, - "page": { - "type": "integer", - "description": "A zero-relative index of transactions.", - "maximum": 2147483647, - "minimum": 0 - }, - "total_items": { - "type": "integer", - "description": "The total number of transactions as an integer beginning with the specified `page` in the full result and not just in this response.", - "maximum": 2147483647, - "minimum": 0 - }, - "total_pages": { - "type": "integer", - "description": "The total number of pages, as an `integer`, when the `total_items` is divided into pages of the specified `page_size`.", - "maximum": 2147483647, - "minimum": 0 - }, - "links": { - "type": "array", - "description": "An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).", - "readOnly": true, - "items": { - "$ref": "#/components/schemas/link_description", - "readOnly": true + "error_400": { + "type": "object", + "title": "Bad Request Error", + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "properties": { + "name": { + "type": "string", + "enum": [ + "INVALID_REQUEST" + ] + }, + "message": { + "type": "string", + "enum": [ + "Request is not well-formed, syntactically incorrect, or violates schema." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } }, - "maxItems": 32767, - "minItems": 1 - } - } - }, - "balance_detail": { - "type": "object", - "title": "Balance Information", - "description": "The Balance information.", - "properties": { - "currency": { - "description": "Currency Code of the balances listed.", - "$ref": "#/components/schemas/currency_code" - }, - "primary": { - "type": "boolean", - "description": "Optional field representing if the currency is primary currency or not." - }, - "total_balance": { - "description": "The total amount in PayPal account. It is the sum of all the other balances.", - "$ref": "#/components/schemas/money" - }, - "available_balance": { - "description": "The amount of cash in an Account which is at the customer's disposal. This amount is captured at settlement cutoff time in the user's time zone as defined for the user.", - "$ref": "#/components/schemas/money" - }, - "withheld_balance": { - "description": "Balance withheld in the account. The portion of funds that PayPal holds for the customer that is not currently at the customer's disposal.", - "$ref": "#/components/schemas/money" - } + "error_401": { + "type": "object", + "title": "Unauthorized Error", + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials.", + "properties": { + "name": { + "type": "string", + "enum": [ + "AUTHENTICATION_FAILURE" + ] + }, + "message": { + "type": "string", + "enum": [ + "Authentication failed due to missing authorization header, or invalid authentication credentials." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_403": { + "type": "object", + "title": "Not Authorized Error", + "description": "The client is not authorized to access this resource, although it may have valid credentials. ", + "properties": { + "name": { + "type": "string", + "enum": [ + "NOT_AUTHORIZED" + ] + }, + "message": { + "type": "string", + "enum": [ + "Authorization failed due to insufficient permissions." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_404": { + "type": "object", + "title": "Not found Error", + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available.", + "properties": { + "name": { + "type": "string", + "enum": [ + "RESOURCE_NOT_FOUND" + ] + }, + "message": { + "type": "string", + "enum": [ + "The specified resource does not exist." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_409": { + "type": "object", + "title": "Resource Conflict Error", + "description": "The server has detected a conflict while processing this request.", + "properties": { + "name": { + "type": "string", + "enum": [ + "RESOURCE_CONFLICT" + ] + }, + "message": { + "type": "string", + "enum": [ + "The server has detected a conflict while processing this request." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_415": { + "type": "object", + "title": "Unsupported Media Type Error", + "description": "The server does not support the request payload's media type.", + "properties": { + "name": { + "type": "string", + "enum": [ + "UNSUPPORTED_MEDIA_TYPE" + ] + }, + "message": { + "type": "string", + "enum": [ + "The server does not support the request payload's media type." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_422": { + "type": "object", + "title": "Unprocessable Entity Error", + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request.", + "properties": { + "name": { + "type": "string", + "enum": [ + "UNPROCESSABLE_ENTITY" + ] + }, + "message": { + "type": "string", + "enum": [ + "The requested action could not be performed, semantically incorrect, or failed business validation." + ] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error_details" + } + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + } + }, + "error_500": { + "type": "object", + "title": "Internal Server Error", + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server.", + "properties": { + "name": { + "type": "string", + "enum": [ + "INTERNAL_SERVER_ERROR" + ] + }, + "message": { + "type": "string", + "enum": [ + "An internal server error occurred." + ] + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + }, + "example": { + "name": "INTERNAL_SERVER_ERROR", + "message": "An internal server error occurred.", + "debug_id": "90957fca61718", + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] + } + }, + "error_503": { + "type": "object", + "title": "Service Unavailable Error", + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime.", + "properties": { + "name": { + "type": "string", + "enum": [ + "SERVICE_UNAVAILABLE" + ] + }, + "message": { + "type": "string", + "enum": [ + "Service Unavailable." + ] + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes." + }, + "links": { + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS).", + "type": "array", + "minItems": 0, + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/error_link_description" + } + } + }, + "example": { + "name": "SERVICE_UNAVAILABLE", + "message": "Service Unavailable.", + "debug_id": "90957fca61718", + "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" + } + }, + "date_time": { + "type": "string", + "description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.GB
and notUK
as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Note: The regular expression provides guidance but does not reject all invalid dates.", + "format": "ppaas_date_time_v3", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "currency_code": { + "description": "The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency.", + "type": "string", + "format": "ppaas_common_currency_code_v2", + "minLength": 3, + "maxLength": 3 + }, + "money": { + "type": "object", + "title": "Money", + "description": "The currency and amount for a financial transaction, such as a balance or payment due.", + "properties": { + "currency_code": { + "$ref": "#/components/schemas/currency_code" + }, + "value": { + "type": "string", + "description": "The value, which might be:
T0001
. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/)."
+ },
+ "transaction_initiation_date": {
+ "description": "The date and time when work on a transaction began in the PayPal system, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
+ "$ref": "#/components/schemas/date_time"
+ },
+ "transaction_updated_date": {
+ "description": "The date and time when the transaction was last changed, as expressed in the time zone of the account on this side of the payment. Specify the value in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
+ "$ref": "#/components/schemas/date_time"
+ },
+ "transaction_amount": {
+ "$ref": "#/components/schemas/money",
+ "description": "The all-inclusive gross transaction amount that was transferred between the sender and receiver through PayPal."
+ },
+ "fee_amount": {
+ "$ref": "#/components/schemas/money",
+ "description": "The PayPal fee amount. All transaction fees are included in this amount, which is the record of fee associated with the transaction.Note: This field contains a value only when a transaction fee is applied and processed for this transaction." + }, + "discount_amount": { + "$ref": "#/components/schemas/money", + "description": "The reduction in price offered for goods or services purchased.
Note: This discount is for a price reduction that is offered for other than that at a individual item level." + }, + "insurance_amount": { + "$ref": "#/components/schemas/money", + "description": "An insurance charge. Guarantees the quality or delivery of a product." + }, + "sales_tax_amount": { + "$ref": "#/components/schemas/money", + "description": "The PayPal- or merchant-reported sales tax amount for the transaction." + }, + "shipping_amount": { + "$ref": "#/components/schemas/money", + "description": "The PayPal- or merchant-reported shipping amount for the transaction." + }, + "shipping_discount_amount": { + "$ref": "#/components/schemas/money", + "description": "The discount on the shipping amount." + }, + "shipping_tax_amount": { + "$ref": "#/components/schemas/money", + "description": "The tax on the shipping service." + }, + "other_amount": { + "$ref": "#/components/schemas/money", + "description": "The special amount that is added to the transaction." + }, + "tip_amount": { + "$ref": "#/components/schemas/money", + "description": "The tip." + }, + "transaction_status": { + "type": "string", + "description": "A code that indicates the transaction status. Value is:
Status code | Description |
---|---|
D | PayPal or merchant rules denied the transaction. |
P | The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S . |
S | The transaction successfully completed without a denial and after any pending statuses. |
V | A successful transaction was fully reversed and funds were refunded to the original sender. |
Note: If you specify one or more optional query parameters, the ending_balance
response field is empty.
"
+ },
+ "available_balance": {
+ "$ref": "#/components/schemas/money",
+ "description": "The available amount of transaction currency during the completion of this transaction."
+ },
+ "invoice_id": {
+ "type": "string",
+ "description": "The invoice ID that is sent by the merchant with the transaction.Note: If an invoice ID was sent with the capture request, the value is reported. Otherwise, the invoice ID of the authorizing transaction is reported.", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "custom_field": { + "type": "string", + "description": "The merchant-provided custom text.
Note: Usually, this field includes the unique ID for payments made with MassPay type transaction.", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "protection_eligibility": { + "type": "string", + "description": "Indicates whether the transaction is eligible for protection. Value is:
01
. Eligible.02
. Not eligible03
. Partially eligible.PUI
, installment
, or mEFT
.Note: Appears only for pay upon invoice (PUI), installment, and mEFT transactions. Merchants and partners in the EMEA region can use this attribute to note transactions that attract turn-over tax." + }, + "instrument_type": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "A high-level classification of the type of financial instrument that was used to fund a payment. The pattern is not provided because the value is defined by an external party. E.g. PAYPAL, CREDIT_CARD, DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay Later or Alternative Payment Methods (APM)." + }, + "instrument_sub_type": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "A finer-grained classification of the financial instrument that was used to fund a payment. For example, `Visa card` or a `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is not provided because the value is defined by an external party." + } + } + }, + "email_address": { + "type": "string", + "description": "The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the", + "format": "ppaas_common_email_address_v2", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "country_code": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "national_number": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extension_number": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "country_code", + "national_number" + ] + }, + "name": { + "type": "object", + "title": "Name", + "description": "The name of the party.", + "properties": { + "prefix": { + "type": "string", + "description": "The prefix, or title, to the party's name.", + "maxLength": 140 + }, + "given_name": { + "type": "string", + "description": "When the party is a person, the party's given, or first, name.", + "maxLength": 140 + }, + "surname": { + "type": "string", + "description": "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.", + "maxLength": 140 + }, + "middle_name": { + "type": "string", + "description": "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name.", + "maxLength": 140 + }, + "suffix": { + "type": "string", + "description": "The suffix for the party's name.", + "maxLength": 140 + }, + "alternate_full_name": { + "type": "string", + "description": "DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business.", + "maxLength": 300 + }, + "full_name": { + "type": "string", + "description": "When the party is a person, the party's full name.", + "maxLength": 300 + } + } + }, + "country_code": { + "type": "string", + "description": "The [two-character ISO 3166-1 code](/docs/integration/direct/rest/country-codes/) that identifies the country or region.@
sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@
sign exists.
Note: The country code for Great Britain is", + "format": "ppaas_common_country_code_v2", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "address": { + "type": "object", + "title": "Simple Postal Address (Coarse-Grained)", + "description": "A simple postal address with coarse-grained fields. Do not use for an international address. Use for backward compatibility only. Does not contain phone.", + "properties": { + "line1": { + "type": "string", + "description": "The first line of the address. For example, number or street." + }, + "line2": { + "type": "string", + "description": "The second line of the address. For example, suite or apartment number." + }, + "city": { + "type": "string", + "description": "The city name." + }, + "state": { + "type": "string", + "description": "The [code](/docs/api/reference/state-codes/) for a US state or the equivalent for other countries. Required for transactions if the address is in one of these countries: [Argentina](/docs/api/reference/state-codes/#argentina), [Brazil](/docs/api/reference/state-codes/#brazil), [Canada](/docs/api/reference/state-codes/#canada), [China](/docs/api/reference/state-codes/#china), [India](/docs/api/reference/state-codes/#india), [Italy](/docs/api/reference/state-codes/#italy), [Japan](/docs/api/reference/state-codes/#japan), [Mexico](/docs/api/reference/state-codes/#mexico), [Thailand](/docs/api/reference/state-codes/#thailand), or [United States](/docs/api/reference/state-codes/#usa). Maximum length is 40 single-byte characters." + }, + "country_code": { + "$ref": "#/components/schemas/country_code" + }, + "postal_code": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code)." + } + }, + "required": [ + "line1", + "city", + "country_code" + ] + }, + "payer_info": { + "type": "object", + "title": "Payer Information", + "description": "The payer information.", + "properties": { + "account_id": { + "type": "string", + "description": "The PayPal` customer account ID.", + "minLength": 1, + "maxLength": 13, + "pattern": "^[a-zA-Z0-9]*$" + }, + "email_address": { + "description": "The email address of the payer.", + "$ref": "#/components/schemas/email_address" + }, + "phone_number": { + "description": "The primary phone number of the payer.", + "$ref": "#/components/schemas/phone" + }, + "address_status": { + "type": "string", + "minLength": 1, + "maxLength": 1, + "pattern": "^[N|Y]$", + "description": "The address status of the payer. Value is either:GB
and notUK
as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Y
. Verified.N
. Not verified.Note: The country code for Great Britain is", + "$ref": "#/components/schemas/country_code" + }, + "address": { + "description": "The payer address.", + "$ref": "#/components/schemas/address" + } + } + }, + "shipping_info": { + "type": "object", + "title": "Shipping Information", + "description": "The shipping information.", + "properties": { + "name": { + "type": "string", + "description": "The recipient's name.", + "minLength": 1, + "maxLength": 500, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "method": { + "type": "string", + "description": "The shipping method that is associated with this order.", + "minLength": 1, + "maxLength": 500, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "address": { + "$ref": "#/components/schemas/address", + "description": "The shipping address that is associated with this order." + }, + "secondary_shipping_address": { + "$ref": "#/components/schemas/address", + "description": "The secondary shipping address that is associated with this order." + } + } + }, + "item_detail_tax_amount": { + "type": "object", + "title": "Tax Amount", + "description": "The tax levied by a government on the purchase of goods or services.", + "properties": { + "tax_amount": { + "$ref": "#/components/schemas/money", + "description": "The tax levied by a government on the purchase of goods or services." + } + } + }, + "checkout_option": { + "type": "object", + "title": "Checkout Option", + "description": "A checkout option as a name-and-value pair.", + "properties": { + "checkout_option_name": { + "type": "string", + "description": "The checkout option name, such as `color` or `texture`.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "checkout_option_value": { + "type": "string", + "description": "The checkout option value. For example, the checkout option `color` might be `blue` or `red` while the checkout option `texture` might be `smooth` or `rippled`.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + } + } + }, + "item_detail": { + "type": "object", + "title": "Item Details", + "description": "The item details.", + "properties": { + "item_code": { + "type": "string", + "description": "An item code that identifies a merchant's goods or service.", + "minLength": 1, + "maxLength": 1000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "item_name": { + "type": "string", + "description": "The item name.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "item_description": { + "type": "string", + "description": "The item description.", + "minLength": 1, + "maxLength": 2000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "item_options": { + "type": "string", + "description": "The item options. Describes option choices on the purchase of the item in some detail.", + "minLength": 1, + "maxLength": 4000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "item_quantity": { + "type": "string", + "description": "The number of purchased units of goods or a service.", + "minLength": 1, + "maxLength": 4000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "item_unit_price": { + "$ref": "#/components/schemas/money", + "description": "The cost for each instance of goods or a service." + }, + "item_amount": { + "$ref": "#/components/schemas/money", + "description": "The amount of the payment for the item." + }, + "discount_amount": { + "$ref": "#/components/schemas/money", + "description": "The reduction in price associated with goods or a service." + }, + "adjustment_amount": { + "$ref": "#/components/schemas/money", + "description": "An increment or decrement to a purchase amount." + }, + "gift_wrap_amount": { + "$ref": "#/components/schemas/money", + "description": "The amount of money charged for gift wrapping an item." + }, + "tax_percentage": { + "$ref": "#/components/schemas/percentage", + "description": "A rate, expressed in hundreds, that is used to calculate a levy for the purchase of goods or services.", + "maxLength": 10, + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "tax_amounts": { + "type": "array", + "description": "An array of tax amounts levied by a government on the purchase of goods or services.", + "maxItems": 32767, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/item_detail_tax_amount", + "description": "A tax levied by a government on the purchase of goods or services." + } + }, + "basic_shipping_amount": { + "$ref": "#/components/schemas/money", + "description": "The delivery cost." + }, + "extra_shipping_amount": { + "$ref": "#/components/schemas/money", + "description": "The cost for expedited delivery of the goods." + }, + "handling_amount": { + "$ref": "#/components/schemas/money", + "description": "A charge for processing the purchase of goods or services." + }, + "insurance_amount": { + "$ref": "#/components/schemas/money", + "description": "A charge for guaranteeing the quality of a product or delivery of a product." + }, + "total_item_amount": { + "$ref": "#/components/schemas/money", + "description": "The sum of all factors, item cost, discounts, tax, shipping, and so on, that goes into the cost of an item." + }, + "invoice_number": { + "type": "string", + "description": "The invoice number. An alphanumeric string that identifies a billing for a merchant.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "checkout_options": { + "type": "array", + "description": "An array of checkout options. Each option has a name and value.", + "items": { + "$ref": "#/components/schemas/checkout_option", + "description": "A checkout option as a name-and-value pair." + }, + "minItems": 1, + "maxItems": 32767 + } + } + }, + "cart_info": { + "type": "object", + "title": "Cart Information", + "description": "The cart information.", + "properties": { + "item_details": { + "type": "array", + "description": "An array of item details.", + "maxItems": 32767, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/item_detail" + } + }, + "tax_inclusive": { + "type": "boolean", + "description": "Indicates whether the item amount or the shipping amount already includes tax.", + "default": false + }, + "paypal_invoice_id": { + "type": "string", + "description": "The ID of the invoice. Appears for only PayPal-generated invoices.", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + } + } + }, + "store_info": { + "type": "object", + "title": "Store Information", + "description": "The store information.", + "properties": { + "store_id": { + "type": "string", + "description": "The ID of a store for a merchant in the system of record.", + "minLength": 1, + "maxLength": 100, + "pattern": "^[a-zA-Z0-9]*$" + }, + "terminal_id": { + "type": "string", + "description": "The terminal ID for the checkout stand in a merchant store.", + "minLength": 1, + "maxLength": 60, + "pattern": "^[a-zA-Z0-9]*$" + } + } + }, + "auction_info": { + "type": "object", + "title": "Auction Information", + "description": "The auction information.", + "properties": { + "auction_site": { + "type": "string", + "description": "The name of the auction site.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "auction_item_site": { + "type": "string", + "description": "The auction site URL.", + "minLength": 1, + "maxLength": 4000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "auction_buyer_id": { + "type": "string", + "description": "The ID of the buyer who makes the purchase in the auction. This ID might be different from the payer ID provided for the payment.", + "minLength": 1, + "maxLength": 500, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "auction_closing_date": { + "description": "The date and time when the auction closes, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + } + } + }, + "incentive_detail": { + "type": "object", + "title": "Incentive Details", + "description": "The incentive details.", + "properties": { + "incentive_type": { + "type": "string", + "description": "The type of incentive, such as a special offer or coupon.", + "minLength": 1, + "maxLength": 500, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "incentive_code": { + "type": "string", + "description": "The code that identifies an incentive, such as a coupon.", + "minLength": 1, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "incentive_amount": { + "$ref": "#/components/schemas/money", + "description": "The incentive amount." + }, + "incentive_program_code": { + "type": "string", + "description": "The incentive program code that identifies a merchant loyalty or incentive program.", + "minLength": 1, + "maxLength": 100, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + } + } + }, + "incentive_info": { + "type": "object", + "title": "Incentive Information", + "description": "The incentive details.", + "properties": { + "incentive_details": { + "type": "array", + "description": "An array of incentive details.", + "items": { + "$ref": "#/components/schemas/incentive_detail" + }, + "maxItems": 32767, + "minItems": 1 + } + } + }, + "transaction_detail": { + "type": "object", + "title": "Transaction Details", + "description": "The transaction details.", + "properties": { + "transaction_info": { + "$ref": "#/components/schemas/transaction_info", + "description": "The transaction information." + }, + "payer_info": { + "$ref": "#/components/schemas/payer_info", + "description": "The payer information." + }, + "shipping_info": { + "$ref": "#/components/schemas/shipping_info", + "description": "The shipping information." + }, + "cart_info": { + "$ref": "#/components/schemas/cart_info", + "description": "The cart information." + }, + "store_info": { + "$ref": "#/components/schemas/store_info", + "description": "The store information." + }, + "auction_info": { + "$ref": "#/components/schemas/auction_info", + "description": "The auction information." + }, + "incentive_info": { + "$ref": "#/components/schemas/incentive_info", + "description": "The incentive information." + } + } + }, + "link_description": { + "type": "object", + "title": "Link Description", + "description": "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information.", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call." + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)." + }, + "method": { + "type": "string", + "description": "The HTTP method required to make the related call.", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + } + } + }, + "search_response": { + "type": "object", + "title": "Search Response", + "description": "The search response information.", + "properties": { + "transaction_details": { + "type": "array", + "maxItems": 2147483647, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/transaction_detail" + }, + "description": "An array of transaction detail objects." + }, + "account_number": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[a-zA-Z0-9]*$", + "description": "The merchant account number." + }, + "start_date": { + "description": "The start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + }, + "end_date": { + "description": "The end date and time or the last date when the data can be served, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + }, + "last_refreshed_datetime": { + "description": "The date and time when the data was last refreshed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + }, + "page": { + "type": "integer", + "description": "A zero-relative index of transactions.", + "maximum": 2147483647, + "minimum": 0 + }, + "total_items": { + "type": "integer", + "description": "The total number of transactions as an integer beginning with the specified `page` in the full result and not just in this response.", + "maximum": 2147483647, + "minimum": 0 + }, + "total_pages": { + "type": "integer", + "description": "The total number of pages, as an `integer`, when the `total_items` is divided into pages of the specified `page_size`.", + "maximum": 2147483647, + "minimum": 0 + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + }, + "maxItems": 32767, + "minItems": 1 + } + } + }, + "balance_detail": { + "type": "object", + "title": "Balance Information", + "description": "The Balance information.", + "properties": { + "currency": { + "description": "Currency Code of the balances listed.", + "$ref": "#/components/schemas/currency_code" + }, + "primary": { + "type": "boolean", + "description": "Optional field representing if the currency is primary currency or not." + }, + "total_balance": { + "description": "The total amount in PayPal account. It is the sum of all the other balances.", + "$ref": "#/components/schemas/money" + }, + "available_balance": { + "description": "The amount of cash in an Account which is at the customer's disposal. This amount is captured at settlement cutoff time in the user's time zone as defined for the user.", + "$ref": "#/components/schemas/money" + }, + "withheld_balance": { + "description": "Balance withheld in the account. The portion of funds that PayPal holds for the customer that is not currently at the customer's disposal.", + "$ref": "#/components/schemas/money" + } + }, + "required": [ + "currency", + "total_balance" + ] + }, + "account_id": { + "type": "string", + "description": "The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.", + "format": "ppaas_payer_id_v3", + "minLength": 13, + "maxLength": 13, + "pattern": "^[2-9A-HJ-NP-Z]{13}$" + }, + "balances_response": { + "type": "object", + "title": "Balances Response", + "description": "The balances response information.", + "properties": { + "balances": { + "type": "array", + "description": "An array of balance detail objects.", + "maxItems": 200, + "minItems": 0, + "items": { + "$ref": "#/components/schemas/balance_detail" + } + }, + "account_id": { + "$ref": "#/components/schemas/account_id" + }, + "as_of_time": { + "description": "The requested date and time or the last date and time when the balances can be served, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + }, + "last_refresh_time": { + "description": "The date and time when the balances was last refreshed, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_time" + } + } + } }, - "required": [ - "currency", - "total_balance" - ] - }, - "account_id": { - "type": "string", - "description": "The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.", - "format": "ppaas_payer_id_v3", - "minLength": 13, - "maxLength": 13, - "pattern": "^[2-9A-HJ-NP-Z]{13}$" - }, - "balances_response": { - "type": "object", - "title": "Balances Response", - "description": "The balances response information.", - "properties": { - "balances": { - "type": "array", - "description": "An array of balance detail objects.", - "maxItems": 200, - "minItems": 0, - "items": { - "$ref": "#/components/schemas/balance_detail" + "parameters": { + "transaction_id": { + "name": "transaction_id", + "in": "query", + "description": "Filters the transactions in the response by a PayPal transaction ID. A valid transaction ID is 17 characters long, except for an order ID, which is 19 characters long.GB
and notUK
as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Note: A transaction ID is not unique in the reporting system. The response can list two transactions with the same ID. One transaction can be balance affecting while the other is non-balance affecting.", + "schema": { + "type": "string", + "minLength": 17, + "maxLength": 19 + } + }, + "transaction_type": { + "name": "transaction_type", + "in": "query", + "description": "Filters the transactions in the response by a PayPal transaction event code. See [Transaction event codes](/docs/integration/direct/transaction-search/transaction-event-codes/).", + "schema": { + "type": "string" + } + }, + "transaction_status": { + "name": "transaction_status", + "in": "query", + "description": "Filters the transactions in the response by a PayPal transaction status code. Value is:
Status code | Description |
---|---|
D | PayPal or merchant rules denied the transaction. |
P | The transaction is pending. The transaction was created but waits for another payment process to complete, such as an ACH transaction, before the status changes to S . |
S | The transaction successfully completed without a denial and after any pending statuses. |
V | A successful transaction was reversed and funds were refunded to the original sender. |
Note:The values must be URL encoded.", + "schema": { + "type": "string" + } + }, + "transaction_currency": { + "name": "transaction_currency", + "in": "query", + "description": "Filters the transactions in the response by a [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) for the PayPal transaction currency.", + "schema": { + "type": "string" + } + }, + "start_date": { + "name": "start_date", + "in": "query", + "description": "Filters the transactions in the response by a start date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional.", + "required": true, + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "end_date": { + "name": "end_date", + "in": "query", + "description": "Filters the transactions in the response by an end date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required. Fractional seconds are optional. The maximum supported range is 31 days.", + "required": true, + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "payment_instrument_type": { + "name": "payment_instrument_type", + "in": "query", + "description": "Filters the transactions in the response by a payment instrument type. Value is either:
CREDITCARD
. Returns a direct credit card transaction with a corresponding value.DEBITCARD
. Returns a debit card transaction with a corresponding value.transaction_info
value returns only the transaction details in the response. To include all fields in the response, specify fields=all
. Valid fields are:transaction_info
. The transaction information. Includes the ID of the PayPal account of the payee, the PayPal-generated transaction ID, the PayPal-generated base ID, the PayPal reference ID type, the transaction event code, the date and time when the transaction was initiated and was last updated, the transaction amounts including the PayPal fee, any discounts, insurance, the transaction status, and other information about the transaction.payer_info
. The payer information. Includes the PayPal customer account ID and the payer's email address, primary phone number, name, country code, address, and whether the payer is verified or unverified.shipping_info
. The shipping information. Includes the recipient's name, the shipping method for this order, the shipping address for this order, and the secondary address associated with this order.auction_info
. The auction information. Includes the name of the auction site, the auction site URL, the ID of the customer who makes the purchase in the auction, and the date and time when the auction closes.cart_info
. The cart information. Includes an array of item details, whether the item amount or the shipping amount already includes tax, and the ID of the invoice for PayPal-generated invoices.incentive_info
. An array of incentive detail objects. Each object includes the incentive, such as a special offer or coupon, the incentive amount, and the incentive program code that identifies a merchant loyalty or incentive program.store_info
. The store information. Includes the ID of the merchant store and the terminal ID for the checkout stand in the merchant store.Y
. The default. The response includes only balance transactions.N
. The response includes all transactions.transaction_id-tracking_number
format.",
- "required": true,
- "schema": {
- "type": "string",
- "minLength": 1,
- "maxLength": 100,
- "pattern": "^[a-zA-Z0-9-_]*$"
- }
- },
- "account_id": {
- "name": "account_id",
- "in": "query",
- "description": "Encrypted PayPal Account ID of the buyer or seller.",
- "required": false,
- "schema": {
- "type": "string",
- "minLength": 13,
- "maxLength": 13,
- "pattern": "^[2-9A-HJ-NP-Z]{13}$"
- }
- }
- },
"schemas": {
"error_details": {
"title": "Error Details",
@@ -259,9 +328,7 @@
"description": "The value of the field that caused the error."
},
"location": {
- "type": "string",
- "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
- "default": "body"
+ "$ref": "#/components/schemas/error_location"
},
"issue": {
"type": "string",
@@ -276,37 +343,15 @@
"issue"
]
},
- "error_default": {
- "description": "The default error response.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/error_400"
- },
- {
- "$ref": "#/components/schemas/error_401"
- },
- {
- "$ref": "#/components/schemas/error_403"
- },
- {
- "$ref": "#/components/schemas/error_404"
- },
- {
- "$ref": "#/components/schemas/error_409"
- },
- {
- "$ref": "#/components/schemas/error_415"
- },
- {
- "$ref": "#/components/schemas/error_422"
- },
- {
- "$ref": "#/components/schemas/error_500"
- },
- {
- "$ref": "#/components/schemas/error_503"
- }
- ]
+ "error_location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "enum": [
+ "body",
+ "path",
+ "query"
+ ],
+ "default": "body"
},
"error_link_description": {
"title": "Link Description",
@@ -335,17 +380,14 @@
"description": "The HTTP method required to make the related call.",
"type": "string",
"minLength": 3,
- "maxLength": 7,
+ "maxLength": 6,
"pattern": "^[A-Z]*$",
"enum": [
- "CONNECT",
- "DELETE",
"GET",
- "HEAD",
- "OPTIONS",
- "PATCH",
"POST",
- "PUT"
+ "PUT",
+ "DELETE",
+ "PATCH"
]
}
}
@@ -1758,6 +1800,37 @@
}
}
},
+ "error_details-2": {
+ "title": "Error Details",
+ "type": "object",
+ "description": "The error details. Required for client-side `4XX` errors.",
+ "properties": {
+ "field": {
+ "type": "string",
+ "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors."
+ },
+ "value": {
+ "type": "string",
+ "description": "The value of the field that caused the error."
+ },
+ "location": {
+ "type": "string",
+ "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
+ "default": "body"
+ },
+ "issue": {
+ "type": "string",
+ "description": "The unique, fine-grained application-level error code."
+ },
+ "description": {
+ "type": "string",
+ "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value."
+ }
+ },
+ "required": [
+ "issue"
+ ]
+ },
"link_description-2": {
"type": "object",
"title": "Link Description",
@@ -1817,7 +1890,7 @@
"type": "array",
"description": "An array of additional details about the error.",
"items": {
- "$ref": "#/components/schemas/error_details"
+ "$ref": "#/components/schemas/error_details-2"
}
},
"links": {
@@ -1901,37 +1974,76 @@
}
}
}
+ },
+ "tracker_identifier_collection": {
+ "type": "object",
+ "title": "Tracker Identifier Collection",
+ "description": "The add tracking information for a PayPal transaction response details.",
+ "properties": {
+ "tracker_identifiers": {
+ "type": "array",
+ "description": "An array of tracking IDs.",
+ "items": {
+ "$ref": "#/components/schemas/tracker_identifier"
+ },
+ "minItems": 1,
+ "maxItems": 100
+ },
+ "links": {
+ "type": "array",
+ "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).",
+ "readOnly": true,
+ "items": {
+ "$ref": "#/components/schemas/link_description",
+ "readOnly": true
+ }
+ }
+ }
}
},
- "examples": {
- "tracker": {
- "value": {
- "transaction_id": "8MC585209K746392H",
- "tracking_number": "443844607820",
- "status": "SHIPPED",
- "carrier": "FEDEX",
- "shipment_direction": "FORWARD"
+ "parameters": {
+ "transaction_id": {
+ "name": "transaction_id",
+ "in": "query",
+ "description": "Filters the tracking information that appears in the response by a PayPal transaction ID.",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
- "tracker_collection": {
- "value": {
- "trackers": [
- {
- "transaction_id": "8MC585209K746392H",
- "tracking_number": "443844607820",
- "status": "SHIPPED",
- "carrier": "FEDEX",
- "shipment_direction": "FORWARD"
- },
- {
- "transaction_id": "53Y56775AE587553X",
- "tracking_number": "443844607821",
- "status": "SHIPPED",
- "carrier": "FEDEX"
- }
- ]
+ "tracking_number": {
+ "name": "tracking_number",
+ "in": "query",
+ "description": "Filters the tracking information that appears in the response by a tracking number.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "account_id": {
+ "name": "account_id",
+ "in": "query",
+ "description": "Encrypted PayPal Account ID of the buyer or seller.",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "minLength": 13,
+ "maxLength": 13,
+ "pattern": "^[2-9A-HJ-NP-Z]{13}$"
+ }
+ },
+ "id": {
+ "name": "id",
+ "in": "path",
+ "description": "The ID of the tracker in the transaction_id-tracking_number
format.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 100,
+ "pattern": "^[a-zA-Z0-9-_]*$"
}
}
}
}
-}
+}
\ No newline at end of file
diff --git a/openapi/vault_payment_tokens_v3.json b/openapi/vault_payment_tokens_v3.json
index 2811506..58c5380 100644
--- a/openapi/vault_payment_tokens_v3.json
+++ b/openapi/vault_payment_tokens_v3.json
@@ -3,7 +3,39 @@
"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.