From fb6f12627e27331d8fb9117a0bc077cef632cc69 Mon Sep 17 00:00:00 2001 From: sraj Date: Fri, 2 Feb 2024 14:03:54 -0800 Subject: [PATCH] Update OpenAPI 3.0 Specifications --- openapi/billing_subscriptions_v1.json | 1249 +++--- openapi/catalogs_products_v1.json | 243 +- openapi/checkout_orders_v1.json | 295 +- openapi/checkout_orders_v2.json | 465 ++- openapi/customer_disputes_v1.json | 542 ++- openapi/customer_partner_referrals_v1.json | 666 ++-- openapi/customer_partner_referrals_v2.json | 650 ++-- openapi/invoicing_v1.json | 5 +- openapi/invoicing_v2.json | 3 +- openapi/notifications_webhooks_v1.json | 536 ++- ...experience_web_experience_profiles_v1.json | 207 +- openapi/payments_payment_v1.json | 762 ++-- openapi/payments_payment_v2.json | 331 +- openapi/payments_payouts_batch_v1.json | 412 +- openapi/reporting_transactions_v1.json | 3431 +++++++++-------- openapi/shipping_shipment_tracking_v1.json | 400 +- openapi/vault_payment_tokens_v3.json | 957 ++--- package-lock.json | 4 +- package.json | 2 +- 19 files changed, 5465 insertions(+), 5695 deletions(-) diff --git a/openapi/billing_subscriptions_v1.json b/openapi/billing_subscriptions_v1.json index 0c5c02b..943d919 100644 --- a/openapi/billing_subscriptions_v1.json +++ b/openapi/billing_subscriptions_v1.json @@ -3,7 +3,31 @@ "info": { "title": "Subscriptions", "description": "You can use billing plans and subscriptions to create subscriptions that process recurring PayPal payments for physical or digital goods, or services. A plan includes pricing and billing cycle information that defines the amount and frequency of charge for a subscription. You can also define a fixed plan, such as a $5 basic plan or a volume- or graduated-based plan with pricing tiers based on the quantity purchased. For more information, see Subscriptions Overview.", - "version": "1.6" + "version": "1.6", + "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": "plans", + "description": "Use the `/billing/plans` resource to create and manage plans." + }, + { + "name": "subscriptions", + "description": "Use the `/billing/subscriptions` resource to create and manage subscriptions." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/subscriptions/v1/" }, "paths": { "/v1/billing/plans": { @@ -20,8 +44,107 @@ "$ref": "#/components/schemas/plan" }, "examples": { - "0": { - "$ref": "#/components/examples/plan" + "plan": { + "value": { + "id": "P-5ML4271244454362WXNWU5NQ", + "product_id": "PROD-XXCD1234QWER65782", + "name": "Video Streaming Service Plan", + "description": "Video Streaming Service basic plan", + "status": "ACTIVE", + "billing_cycles": [ + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "TRIAL", + "sequence": 1, + "total_cycles": 2, + "pricing_scheme": { + "fixed_price": { + "value": "3", + "currency_code": "USD" + }, + "version": 1, + "create_time": "2020-05-27T12:13:51Z", + "update_time": "2020-05-27T12:13:51Z" + } + }, + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "TRIAL", + "sequence": 2, + "total_cycles": 3, + "pricing_scheme": { + "fixed_price": { + "currency_code": "USD", + "value": "6" + }, + "version": 1, + "create_time": "2020-05-27T12:13:51Z", + "update_time": "2020-05-27T12:13:51Z" + } + }, + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "REGULAR", + "sequence": 3, + "total_cycles": 12, + "pricing_scheme": { + "fixed_price": { + "currency_code": "USD", + "value": "10" + }, + "version": 1, + "create_time": "2020-05-27T12:13:51Z", + "update_time": "2020-05-27T12:13:51Z" + } + } + ], + "payment_preferences": { + "auto_bill_outstanding": true, + "setup_fee": { + "value": "10", + "currency_code": "USD" + }, + "setup_fee_failure_action": "CONTINUE", + "payment_failure_threshold": 3 + }, + "taxes": { + "percentage": "10", + "inclusive": false + }, + "create_time": "2020-05-27T12:13:51Z", + "update_time": "2020-05-27T12:13:51Z", + "links": [ + { + "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ", + "rel": "edit", + "method": "PATCH" + }, + { + "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ/deactivate", + "rel": "deactivate", + "method": "POST" + }, + { + "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ/update-pricing-schemes", + "rel": "edit", + "method": "POST" + } + ] + } } } } @@ -120,9 +243,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/prefer" }, @@ -137,8 +257,73 @@ "$ref": "#/components/schemas/plan_request_POST" }, "examples": { - "0": { - "$ref": "#/components/examples/plan_request_POST" + "plan_request_post": { + "value": { + "product_id": "PROD-XXCD1234QWER65782", + "name": "Video Streaming Service Plan", + "description": "Video Streaming Service basic plan", + "status": "ACTIVE", + "billing_cycles": [ + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "TRIAL", + "sequence": 1, + "total_cycles": 2, + "pricing_scheme": { + "fixed_price": { + "value": "3", + "currency_code": "USD" + } + } + }, + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "TRIAL", + "sequence": 2, + "total_cycles": 3, + "pricing_scheme": { + "fixed_price": { + "value": "6", + "currency_code": "USD" + } + } + }, + { + "frequency": { + "interval_unit": "MONTH", + "interval_count": 1 + }, + "tenure_type": "REGULAR", + "sequence": 3, + "total_cycles": 12, + "pricing_scheme": { + "fixed_price": { + "value": "10", + "currency_code": "USD" + } + } + } + ], + "payment_preferences": { + "auto_bill_outstanding": true, + "setup_fee": { + "value": "10", + "currency_code": "USD" + }, + "setup_fee_failure_action": "CONTINUE", + "payment_failure_threshold": 3 + }, + "taxes": { + "percentage": "10", + "inclusive": false + } + } } } } @@ -246,9 +431,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/prefer" }, @@ -362,9 +544,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -488,9 +667,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -602,9 +778,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -713,9 +886,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -841,9 +1011,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -855,8 +1022,47 @@ "$ref": "#/components/schemas/update_pricing_schemes_list_request" }, "examples": { - "0": { - "$ref": "#/components/examples/update_pricing_schemes_list_request" + "update_pricing_schemes_list_request": { + "value": { + "pricing_schemes": [ + { + "billing_cycle_sequence": 1, + "pricing_scheme": { + "fixed_price": { + "value": "50", + "currency_code": "USD" + } + } + }, + { + "billing_cycle_sequence": 2, + "pricing_scheme": { + "fixed_price": { + "value": "100", + "currency_code": "USD" + }, + "pricing_model": "VOLUME", + "tiers": [ + { + "starting_quantity": "1", + "ending_quantity": "1000", + "amount": { + "value": "150", + "currency_code": "USD" + } + }, + { + "starting_quantity": "1001", + "amount": { + "value": "250", + "currency_code": "USD" + } + } + ] + } + } + ] + } } } } @@ -888,8 +1094,59 @@ "$ref": "#/components/schemas/subscription" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription" + "subscription": { + "value": { + "id": "I-BW452GLLEP1G", + "status": "APPROVAL_PENDING", + "status_update_time": "2018-12-10T21:20:49Z", + "plan_id": "P-5ML4271244454362WXNWU5NQ", + "plan_overridden": false, + "start_time": "2018-11-01T00:00:00Z", + "quantity": "20", + "shipping_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "subscriber": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "email_address": "customer@example.com", + "payer_id": "2J6QB8YJQSJRJ", + "shipping_address": { + "name": { + "full_name": "John Doe" + }, + "address": { + "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" + } + } + }, + "create_time": "2018-12-10T21:20:49Z", + "links": [ + { + "href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J", + "rel": "approve", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "edit", + "method": "PATCH" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "self", + "method": "GET" + } + ] + } } } } @@ -903,8 +1160,59 @@ "$ref": "#/components/schemas/subscription" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription" + "subscription": { + "value": { + "id": "I-BW452GLLEP1G", + "status": "APPROVAL_PENDING", + "status_update_time": "2018-12-10T21:20:49Z", + "plan_id": "P-5ML4271244454362WXNWU5NQ", + "plan_overridden": false, + "start_time": "2018-11-01T00:00:00Z", + "quantity": "20", + "shipping_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "subscriber": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "email_address": "customer@example.com", + "payer_id": "2J6QB8YJQSJRJ", + "shipping_address": { + "name": { + "full_name": "John Doe" + }, + "address": { + "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" + } + } + }, + "create_time": "2018-12-10T21:20:49Z", + "links": [ + { + "href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J", + "rel": "approve", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "edit", + "method": "PATCH" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "self", + "method": "GET" + } + ] + } } } } @@ -993,9 +1301,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/prefer" }, @@ -1010,8 +1315,48 @@ "$ref": "#/components/schemas/subscription_request_post" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_request_post" + "subscription_request_post": { + "value": { + "plan_id": "P-5ML4271244454362WXNWU5NQ", + "start_time": "2018-11-01T00:00:00Z", + "quantity": "20", + "shipping_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "subscriber": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "email_address": "customer@example.com", + "shipping_address": { + "name": { + "full_name": "John Doe" + }, + "address": { + "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" + } + } + }, + "application_context": { + "brand_name": "walmart", + "locale": "en-US", + "shipping_preference": "SET_PROVIDED_ADDRESS", + "user_action": "SUBSCRIBE_NOW", + "payment_method": { + "payer_selected": "PAYPAL", + "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" + }, + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } } } } @@ -1111,9 +1456,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" }, @@ -1240,9 +1582,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -1276,8 +1615,60 @@ "$ref": "#/components/schemas/subscription_revise_response" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_revise_response" + "subscription_revise_response": { + "value": { + "plan_id": "P-5ML4271244454362WXNWU5NQ", + "plan_overridden": false, + "shipping_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "shipping_address": { + "name": { + "full_name": "John Doe" + }, + "address": { + "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" + } + }, + "links": [ + { + "href": "https://www.paypal.com/webapps/billing/subscriptions/update?ba_token=BA-2M539689T3856352J", + "rel": "approve", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "edit", + "method": "PATCH" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", + "rel": "self", + "method": "GET" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/cancel", + "rel": "cancel", + "method": "POST" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/suspend", + "rel": "suspend", + "method": "POST" + }, + { + "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/capture", + "rel": "capture", + "method": "POST" + } + ] + } } } } @@ -1383,9 +1774,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -1397,8 +1785,38 @@ "$ref": "#/components/schemas/subscription_revise_request" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_revise_request" + "subscription_revise_request": { + "value": { + "plan_id": "P-5ML4271244454362WXNWU5NQ", + "shipping_amount": { + "currency_code": "USD", + "value": "10.00" + }, + "shipping_address": { + "name": { + "full_name": "John Doe" + }, + "address": { + "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" + } + }, + "application_context": { + "brand_name": "walmart", + "locale": "en-US", + "shipping_preference": "SET_PROVIDED_ADDRESS", + "payment_method": { + "payer_selected": "PAYPAL", + "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" + }, + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } } } } @@ -1525,9 +1943,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -1539,8 +1954,10 @@ "$ref": "#/components/schemas/subscription_suspend_request" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_suspend_request" + "subscription_suspend_request": { + "value": { + "reason": "Item out of stock" + } } } } @@ -1667,9 +2084,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -1681,8 +2095,10 @@ "$ref": "#/components/schemas/subscription_cancel_request" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_cancel_request" + "subscription_cancel_request": { + "value": { + "reason": "Not satisfied with the service" + } } } } @@ -1809,9 +2225,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" } @@ -1823,8 +2236,10 @@ "$ref": "#/components/schemas/subscription_activate_request" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_activate_request" + "subscription_activate_request": { + "value": { + "reason": "Reactivating the subscription" + } } } } @@ -1961,9 +2376,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/paypal_request_id" }, @@ -1978,8 +2390,15 @@ "$ref": "#/components/schemas/subscription_capture_request" }, "examples": { - "0": { - "$ref": "#/components/examples/subscription_capture_request" + "subscription_capture_request": { + "value": { + "note": "Charging as the balance reached the limit", + "capture_type": "OUTSTANDING_BALANCE", + "amount": { + "currency_code": "USD", + "value": "100" + } + } } } } @@ -2096,9 +2515,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/id" }, @@ -2122,29 +2538,6 @@ } } }, - "tags": [ - { - "name": "plans", - "description": "Use the `/billing/plans` resource to create and manage plans." - }, - { - "name": "subscriptions", - "description": "Use the `/billing/subscriptions` resource to create and manage subscriptions." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/subscriptions/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": { "patch_request": { @@ -2171,134 +2564,6 @@ } } }, - "parameters": { - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "The media type. Required for operations with a request body. The value is `application/`, where the `format` is `json`.", - "required": true, - "schema": { - "type": "string" - } - }, - "prefer": { - "name": "Prefer", - "in": "header", - "description": "The preferred server response upon successful completion of the request. Value is:", - "required": false, - "schema": { - "type": "string", - "default": "return=minimal" - } - }, - "paypal_request_id": { - "name": "PayPal-Request-Id", - "in": "header", - "description": "The server stores keys for 72 hours.", - "required": false, - "schema": { - "type": "string" - } - }, - "product_id": { - "name": "product_id", - "in": "query", - "description": "Filters the response by a Product ID.", - "required": false, - "schema": { - "type": "string", - "minLength": 6, - "maxLength": 50 - } - }, - "plan_ids": { - "name": "plan_ids", - "in": "query", - "description": "Filters the response by list of plan IDs. Filter supports upto 10 plan IDs.", - "required": false, - "schema": { - "type": "string", - "minimum": 3, - "maximum": 270 - } - }, - "page_size": { - "name": "page_size", - "in": "query", - "description": "The number of items to return in the response.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 20, - "default": 10 - } - }, - "page": { - "name": "page", - "in": "query", - "description": "A non-zero integer which is the start index of the entire list of items to return in the response. The combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100000, - "default": 1 - } - }, - "total_required": { - "name": "total_required", - "in": "query", - "description": "Indicates whether to show the total count in the response.", - "schema": { - "type": "boolean", - "default": false - } - }, - "id": { - "name": "id", - "in": "path", - "required": true, - "description": "The ID of the subscription.", - "schema": { - "type": "string" - } - }, - "fields": { - "name": "fields", - "in": "query", - "description": "List of fields that are to be returned in the response. Possible value for fields are last_failed_payment and plan.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 100 - } - }, - "start_time": { - "name": "start_time", - "in": "query", - "required": true, - "description": "The start time of the range of transactions to list.", - "schema": { - "type": "string", - "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})$" - } - }, - "end_time": { - "name": "end_time", - "in": "query", - "required": true, - "description": "The end time of the range of transactions to list.", - "schema": { - "type": "string", - "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})$" - } - } - }, "responses": { "default": { "description": "The default response.", @@ -2772,9 +3037,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", @@ -2789,6 +3052,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": [ @@ -2848,17 +3121,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" ] } } @@ -7616,441 +7886,122 @@ } } }, - "examples": { - "plan": { - "value": { - "id": "P-5ML4271244454362WXNWU5NQ", - "product_id": "PROD-XXCD1234QWER65782", - "name": "Video Streaming Service Plan", - "description": "Video Streaming Service basic plan", - "status": "ACTIVE", - "billing_cycles": [ - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "TRIAL", - "sequence": 1, - "total_cycles": 2, - "pricing_scheme": { - "fixed_price": { - "value": "3", - "currency_code": "USD" - }, - "version": 1, - "create_time": "2020-05-27T12:13:51Z", - "update_time": "2020-05-27T12:13:51Z" - } - }, - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "TRIAL", - "sequence": 2, - "total_cycles": 3, - "pricing_scheme": { - "fixed_price": { - "currency_code": "USD", - "value": "6" - }, - "version": 1, - "create_time": "2020-05-27T12:13:51Z", - "update_time": "2020-05-27T12:13:51Z" - } - }, - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "REGULAR", - "sequence": 3, - "total_cycles": 12, - "pricing_scheme": { - "fixed_price": { - "currency_code": "USD", - "value": "10" - }, - "version": 1, - "create_time": "2020-05-27T12:13:51Z", - "update_time": "2020-05-27T12:13:51Z" - } - } - ], - "payment_preferences": { - "auto_bill_outstanding": true, - "setup_fee": { - "value": "10", - "currency_code": "USD" - }, - "setup_fee_failure_action": "CONTINUE", - "payment_failure_threshold": 3 - }, - "taxes": { - "percentage": "10", - "inclusive": false - }, - "create_time": "2020-05-27T12:13:51Z", - "update_time": "2020-05-27T12:13:51Z", - "links": [ - { - "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ", - "rel": "edit", - "method": "PATCH" - }, - { - "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ/deactivate", - "rel": "deactivate", - "method": "POST" - }, - { - "href": "https://api-m.paypal.com/v1/billing/plans/P-5ML4271244454362WXNWU5NQ/update-pricing-schemes", - "rel": "edit", - "method": "POST" - } - ] + "parameters": { + "prefer": { + "name": "Prefer", + "in": "header", + "description": "The preferred server response upon successful completion of the request. Value is:", + "required": false, + "schema": { + "type": "string", + "default": "return=minimal" } }, - "plan_request_POST": { - "value": { - "product_id": "PROD-XXCD1234QWER65782", - "name": "Video Streaming Service Plan", - "description": "Video Streaming Service basic plan", - "status": "ACTIVE", - "billing_cycles": [ - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "TRIAL", - "sequence": 1, - "total_cycles": 2, - "pricing_scheme": { - "fixed_price": { - "value": "3", - "currency_code": "USD" - } - } - }, - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "TRIAL", - "sequence": 2, - "total_cycles": 3, - "pricing_scheme": { - "fixed_price": { - "value": "6", - "currency_code": "USD" - } - } - }, - { - "frequency": { - "interval_unit": "MONTH", - "interval_count": 1 - }, - "tenure_type": "REGULAR", - "sequence": 3, - "total_cycles": 12, - "pricing_scheme": { - "fixed_price": { - "value": "10", - "currency_code": "USD" - } - } - } - ], - "payment_preferences": { - "auto_bill_outstanding": true, - "setup_fee": { - "value": "10", - "currency_code": "USD" - }, - "setup_fee_failure_action": "CONTINUE", - "payment_failure_threshold": 3 - }, - "taxes": { - "percentage": "10", - "inclusive": false - } + "paypal_request_id": { + "name": "PayPal-Request-Id", + "in": "header", + "description": "The server stores keys for 72 hours.", + "required": false, + "schema": { + "type": "string" } }, - "patch_request": { - "value": [ - { - "op": "replace", - "path": "/payment_preferences/payment_failure_threshold", - "value": 7 - }, - { - "op": "replace", - "path": "/name", - "value": "Updated Video Streaming Service Plan" - } - ] - }, - "update_pricing_schemes_list_request": { - "value": { - "pricing_schemes": [ - { - "billing_cycle_sequence": 1, - "pricing_scheme": { - "fixed_price": { - "value": "50", - "currency_code": "USD" - } - } - }, - { - "billing_cycle_sequence": 2, - "pricing_scheme": { - "fixed_price": { - "value": "100", - "currency_code": "USD" - }, - "pricing_model": "VOLUME", - "tiers": [ - { - "starting_quantity": "1", - "ending_quantity": "1000", - "amount": { - "value": "150", - "currency_code": "USD" - } - }, - { - "starting_quantity": "1001", - "amount": { - "value": "250", - "currency_code": "USD" - } - } - ] - } - } - ] + "product_id": { + "name": "product_id", + "in": "query", + "description": "Filters the response by a Product ID.", + "required": false, + "schema": { + "type": "string", + "minLength": 6, + "maxLength": 50 } }, - "subscription": { - "value": { - "id": "I-BW452GLLEP1G", - "status": "APPROVAL_PENDING", - "status_update_time": "2018-12-10T21:20:49Z", - "plan_id": "P-5ML4271244454362WXNWU5NQ", - "plan_overridden": false, - "start_time": "2018-11-01T00:00:00Z", - "quantity": "20", - "shipping_amount": { - "currency_code": "USD", - "value": "10.00" - }, - "subscriber": { - "name": { - "given_name": "John", - "surname": "Doe" - }, - "email_address": "customer@example.com", - "payer_id": "2J6QB8YJQSJRJ", - "shipping_address": { - "name": { - "full_name": "John Doe" - }, - "address": { - "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" - } - } - }, - "create_time": "2018-12-10T21:20:49Z", - "links": [ - { - "href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J", - "rel": "approve", - "method": "GET" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", - "rel": "edit", - "method": "PATCH" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", - "rel": "self", - "method": "GET" - } - ] + "plan_ids": { + "name": "plan_ids", + "in": "query", + "description": "Filters the response by list of plan IDs. Filter supports upto 10 plan IDs.", + "required": false, + "schema": { + "type": "string", + "minimum": 3, + "maximum": 270 } }, - "subscription_request_post": { - "value": { - "plan_id": "P-5ML4271244454362WXNWU5NQ", - "start_time": "2018-11-01T00:00:00Z", - "quantity": "20", - "shipping_amount": { - "currency_code": "USD", - "value": "10.00" - }, - "subscriber": { - "name": { - "given_name": "John", - "surname": "Doe" - }, - "email_address": "customer@example.com", - "shipping_address": { - "name": { - "full_name": "John Doe" - }, - "address": { - "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" - } - } - }, - "application_context": { - "brand_name": "walmart", - "locale": "en-US", - "shipping_preference": "SET_PROVIDED_ADDRESS", - "user_action": "SUBSCRIBE_NOW", - "payment_method": { - "payer_selected": "PAYPAL", - "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" - }, - "return_url": "https://example.com/returnUrl", - "cancel_url": "https://example.com/cancelUrl" - } + "page_size": { + "name": "page_size", + "in": "query", + "description": "The number of items to return in the response.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 20, + "default": 10 } }, - "subscription_revise_response": { - "value": { - "plan_id": "P-5ML4271244454362WXNWU5NQ", - "plan_overridden": false, - "shipping_amount": { - "currency_code": "USD", - "value": "10.00" - }, - "shipping_address": { - "name": { - "full_name": "John Doe" - }, - "address": { - "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" - } - }, - "links": [ - { - "href": "https://www.paypal.com/webapps/billing/subscriptions/update?ba_token=BA-2M539689T3856352J", - "rel": "approve", - "method": "GET" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", - "rel": "edit", - "method": "PATCH" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G", - "rel": "self", - "method": "GET" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/cancel", - "rel": "cancel", - "method": "POST" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/suspend", - "rel": "suspend", - "method": "POST" - }, - { - "href": "https://api-m.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G/capture", - "rel": "capture", - "method": "POST" - } - ] + "page": { + "name": "page", + "in": "query", + "description": "A non-zero integer which is the start index of the entire list of items to return in the response. The combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100000, + "default": 1 } }, - "subscription_revise_request": { - "value": { - "plan_id": "P-5ML4271244454362WXNWU5NQ", - "shipping_amount": { - "currency_code": "USD", - "value": "10.00" - }, - "shipping_address": { - "name": { - "full_name": "John Doe" - }, - "address": { - "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" - } - }, - "application_context": { - "brand_name": "walmart", - "locale": "en-US", - "shipping_preference": "SET_PROVIDED_ADDRESS", - "payment_method": { - "payer_selected": "PAYPAL", - "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED" - }, - "return_url": "https://example.com/returnUrl", - "cancel_url": "https://example.com/cancelUrl" - } + "total_required": { + "name": "total_required", + "in": "query", + "description": "Indicates whether to show the total count in the response.", + "schema": { + "type": "boolean", + "default": false } }, - "subscription_suspend_request": { - "value": { - "reason": "Item out of stock" + "id": { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the subscription.", + "schema": { + "type": "string" } }, - "subscription_cancel_request": { - "value": { - "reason": "Not satisfied with the service" + "fields": { + "name": "fields", + "in": "query", + "description": "List of fields that are to be returned in the response. Possible value for fields are last_failed_payment and plan.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 100 } }, - "subscription_activate_request": { - "value": { - "reason": "Reactivating the subscription" + "start_time": { + "name": "start_time", + "in": "query", + "required": true, + "description": "The start time of the range of transactions to list.", + "schema": { + "type": "string", + "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})$" } }, - "subscription_capture_request": { - "value": { - "note": "Charging as the balance reached the limit", - "capture_type": "OUTSTANDING_BALANCE", - "amount": { - "currency_code": "USD", - "value": "100" - } + "end_time": { + "name": "end_time", + "in": "query", + "required": true, + "description": "The end time of the range of transactions to list.", + "schema": { + "type": "string", + "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})$" } } } diff --git a/openapi/catalogs_products_v1.json b/openapi/catalogs_products_v1.json index 911f1d0..784ba91 100644 --- a/openapi/catalogs_products_v1.json +++ b/openapi/catalogs_products_v1.json @@ -3,7 +3,27 @@ "info": { "title": "Catalog Products", "description": "Merchants can use the Catalog Products API to create products, which are goods and services.", - "version": "1.0" + "version": "1.0", + "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": "products", + "description": "Use `/products` resource to create and manage products." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/catalog-products/v1/" }, "paths": { "/v1/catalogs/products": { @@ -115,9 +135,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/prefer" }, @@ -132,8 +149,15 @@ "$ref": "#/components/schemas/product_request_POST" }, "examples": { - "0": { - "$ref": "#/components/examples/product_request_POST" + "product_request_POST": { + "value": { + "name": "Video Streaming Service", + "description": "Video streaming service", + "type": "SERVICE", + "category": "SOFTWARE", + "image_url": "https://example.com/streaming.jpg", + "home_url": "https://example.com/home" + } } } } @@ -231,9 +255,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/page_size" }, @@ -338,9 +359,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/product_id" } @@ -464,9 +482,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/product_id" } @@ -478,8 +493,14 @@ "$ref": "#/components/schemas/patch_request" }, "examples": { - "0": { - "$ref": "#/components/examples/patch_request" + "patch_request": { + "value": [ + { + "op": "replace", + "path": "/description", + "value": "Premium video streaming service" + } + ] } } } @@ -498,25 +519,6 @@ } } }, - "tags": [ - { - "name": "products", - "description": "Use `/products` resource to create and manage products." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/catalog-products/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": { @@ -532,76 +534,6 @@ } } }, - "parameters": { - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "The media type. Required for operations with a request body. The value is `application/`, where `format` is `json`.", - "required": true, - "schema": { - "type": "string" - } - }, - "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.
", - "required": false, - "schema": { - "type": "string", - "default": "return=minimal" - } - }, - "paypal_request_id": { - "name": "PayPal-Request-Id", - "in": "header", - "description": "The server stores keys for 72 hours.", - "required": false, - "schema": { - "type": "string" - } - }, - "page_size": { - "name": "page_size", - "in": "query", - "description": "The number of items to return in the response.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 20, - "default": 10 - } - }, - "page": { - "name": "page", - "in": "query", - "description": "A non-zero integer which is the start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100000, - "default": 1 - } - }, - "total_required": { - "name": "total_required", - "in": "query", - "description": "Indicates whether to show the total items and total pages in the response.", - "schema": { - "type": "boolean", - "default": false - } - }, - "product_id": { - "name": "product_id", - "in": "path", - "required": true, - "description": "The product ID.", - "schema": { - "type": "string" - } - } - }, "responses": { "default": { "description": "The default response.", @@ -803,9 +735,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", @@ -820,6 +750,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": [ @@ -879,17 +819,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" ] } } @@ -2245,24 +2182,64 @@ } } }, - "examples": { - "patch_request": { - "value": [ - { - "op": "replace", - "path": "/description", - "value": "Premium video streaming service" - } - ] + "parameters": { + "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.
", + "required": false, + "schema": { + "type": "string", + "default": "return=minimal" + } }, - "product_request_POST": { - "value": { - "name": "Video Streaming Service", - "description": "Video streaming service", - "type": "SERVICE", - "category": "SOFTWARE", - "image_url": "https://example.com/streaming.jpg", - "home_url": "https://example.com/home" + "paypal_request_id": { + "name": "PayPal-Request-Id", + "in": "header", + "description": "The server stores keys for 72 hours.", + "required": false, + "schema": { + "type": "string" + } + }, + "page_size": { + "name": "page_size", + "in": "query", + "description": "The number of items to return in the response.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 20, + "default": 10 + } + }, + "page": { + "name": "page", + "in": "query", + "description": "A non-zero integer which is the start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100000, + "default": 1 + } + }, + "total_required": { + "name": "total_required", + "in": "query", + "description": "Indicates whether to show the total items and total pages in the response.", + "schema": { + "type": "boolean", + "default": false + } + }, + "product_id": { + "name": "product_id", + "in": "path", + "required": true, + "description": "The product ID.", + "schema": { + "type": "string" } } } diff --git a/openapi/checkout_orders_v1.json b/openapi/checkout_orders_v1.json index c76ba98..76b1f10 100644 --- a/openapi/checkout_orders_v1.json +++ b/openapi/checkout_orders_v1.json @@ -3,7 +3,31 @@ "info": { "title": "Orders", "description": "Partners can use the Orders API to create, show details for, authorize, and capture payment for orders.
Orders API integration note: The PayPal Commerce Platform is a limited-release solution aimed at partners, crowd funding, and multi-party commerce platforms. To use Orders API for Partners, see Multiparty Payments. v1 of the API will be deprecated soon. A new version is available at Orders API v2.
", - "version": "1.1" + "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.
", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 25, - "pattern": "^[a-zA-Z=]*$", - "default": "return=minimal" - } - }, - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "The media type. Required for operations with a request body. The value is `application/`, where `format` is `json`.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "The ID of the order that the tracking information is associated with.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 36, - "pattern": "^[A-Z0-9]+$" - } - }, - "fields": { - "name": "fields", - "description": "A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "pattern": "^[a-z_]*$" - } - }, - "paypal_auth_assertion": { - "name": "PayPal-Auth-Assertion", - "in": "header", - "description": "An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.", - "required": false, - "schema": { - "type": "string" - } - }, - "tracker_id": { - "name": "tracker_id", - "in": "path", - "description": "The order tracking ID.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 36, - "pattern": "^[A-Z0-9]+$" - } - } - }, "responses": { "default": { "description": "The default response.", @@ -3211,9 +3163,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", @@ -3228,6 +3178,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": [ @@ -3287,17 +3247,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" ] } } @@ -6997,6 +6954,13 @@ "minLength": 1, "maxLength": 127 }, + "url": { + "type": "string", + "format": "uri", + "minLength": 1, + "maxLength": 2048, + "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences." + }, "image_url": { "type": "string", "format": "uri", @@ -14603,89 +14567,94 @@ } } }, - "examples": { - "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" - } - } - ] + "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 + } }, - "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" - } - } - } + "paypal_partner_attribution_id": { + "name": "PayPal-Partner-Attribution-Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 36 } }, - "order_request_create": { - "value": { - "intent": "CAPTURE", - "purchase_units": [ - { - "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", - "amount": { - "currency_code": "USD", - "value": "100.00" - } - } - ] + "paypal_client_metadata_id": { + "name": "PayPal-Client-Metadata-Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 36 } }, - "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" - } - } - } + "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.
", + "required": false, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 25, + "pattern": "^[a-zA-Z=]*$", + "default": "return=minimal" + } + }, + "id": { + "name": "id", + "in": "path", + "description": "The ID of the order that the tracking information is associated with.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[A-Z0-9]+$" + } + }, + "fields": { + "name": "fields", + "description": "A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "pattern": "^[a-z_]*$" + } + }, + "paypal_auth_assertion": { + "name": "PayPal-Auth-Assertion", + "in": "header", + "description": "An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.", + "required": false, + "schema": { + "type": "string" + } + }, + "tracker_id": { + "name": "tracker_id", + "in": "path", + "description": "The order tracking ID.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 36, + "pattern": "^[A-Z0-9]+$" } } } } -} +} \ No newline at end of file diff --git a/openapi/customer_disputes_v1.json b/openapi/customer_disputes_v1.json index 469b661..22651fa 100644 --- a/openapi/customer_disputes_v1.json +++ b/openapi/customer_disputes_v1.json @@ -3,7 +3,71 @@ "info": { "title": "Disputes", "description": "Occasionally, something goes wrong with a customer's order. To dispute a charge, a customer can create a dispute with PayPal. PayPal merchants, partners, and external developers can use the PayPal Disputes API to manage customer disputes.
Note: In the live environment, merchants cannot create disputes but can only respond to customer-created disputes. However, merchants can create disputes in the sandbox environment. When you create an app, enable Disputes in the App feature options section.
A customer can also ask his or her bank or credit card company to dispute and reverse a charge, which is known as a chargeback. For more information, see Disputes, claims, chargebacks, and bank reversals.

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

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

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

For details, see Disputes Overview documentation.", - "version": "1.10" + "version": "1.10", + "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": "disputes", + "description": "Use the `/disputes` resource to list disputes, create disputes, show dispute details, and partially a dispute. Normally, an agent at PayPal creates disputes but now you can run test cases in the sandbox that create disputes." + }, + { + "name": "disputes-actions", + "description": "Use the `/disputes` resource with a dispute ID and an action to:
  • Accept a claim.
  • Accept an offer to resolve a dispute.
  • Acknowledge the return of an item related to a dispute.
  • Settle a dispute.
  • Appeal a dispute.
  • Cancel a dispute.
  • Change the reason for a dispute.
  • Deny an offer to resolve dispute.
  • Escalate a dispute to a claim.
  • Make an offer to resolve a dispute.
  • Make an offer to resolve a dispute.
  • Provide evidence for a dispute.
  • Provide supporting information for dispute.
  • In the sandbox, update the dispute status.
  • Send a message about a dispute to the other party in the dispute.
    • " + }, + { + "name": "referred-disputes", + "description": "Use the `/customer/referred-disputes` resource to create a dispute for a referred case that was created by a partner or marketplace, show details for a referred dispute, by ID, notify referred refunds completed to PayPal, notify PayPal about referred dispute adjudication updates, and determine the dispute eligibility for referred disputes." + }, + { + "name": "validate-eligibility", + "description": "Use the `/validate-eligibility/` resource to determine whether you can create a case for a transaction." + }, + { + "name": "compute-metrics", + "description": "Use the `/compute-metrics` resource to provide metrics for all disputes." + }, + { + "name": "validate-referred-dispute-eligibility", + "description": "Use the `/validate-referred-dispute-eligibility` resource to determine whether you can create a referred case for a transaction, by encrypted transaction ID." + }, + { + "name": "referred-disputes", + "description": "Use the `/referred-disputes` resource to create a dispute for a referred case that was created by a partner or marketplace, show details for a referred dispute, by ID, notify referred refunds completed to PayPal, notify PayPal about referred dispute adjudication updates, and determine the dispute eligibility for referred disputes." + }, + { + "name": "referred-disputes-actions", + "description": "Use the `/referred-disputes` resource with a dispute ID and an action to notify PayPal about adjudication updates for a referred dispute and notify PayPal about a refund for a referred dispute." + }, + { + "name": "partner-actions", + "description": "Use the `/disputes/{id}/partner-actions/` resource to show dispute action details and partially update a dispute action." + }, + { + "name": "search-suggestions", + "description": "Use the `/search-suggestions` resource to show search suggestions." + }, + { + "name": "dispute-events", + "description": "Use the `/dispute-events` resource to send dispute events." + }, + { + "name": "refund-preference", + "description": "Use the `/disputes/{id}/provide-refund-preference` resource to provide refund preferences for the dispute." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/customer-disputes/v1/" }, "paths": { "/v1/customer/disputes": { @@ -233,9 +297,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -314,9 +375,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -384,9 +442,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -449,9 +504,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -542,9 +594,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -554,8 +603,10 @@ "$ref": "#/components/schemas/adjudicate" }, "examples": { - "0": { - "$ref": "#/components/examples/adjudicate" + "adjudicate": { + "value": { + "adjudication_outcome": "BUYER_FAVOR" + } } } }, @@ -653,9 +704,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -665,8 +713,10 @@ "$ref": "#/components/schemas/require_evidence" }, "examples": { - "0": { - "$ref": "#/components/examples/require_evidence" + "escalate": { + "value": { + "note": "Escalating to PayPal claim for resolution." + } } } }, @@ -765,9 +815,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -777,8 +824,10 @@ "$ref": "#/components/schemas/escalate" }, "examples": { - "0": { - "$ref": "#/components/examples/escalate" + "require_evidence": { + "value": { + "action": "BUYER_EVIDENCE" + } } } }, @@ -876,9 +925,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -974,9 +1020,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -986,8 +1029,15 @@ "$ref": "#/components/schemas/make_offer" }, "examples": { - "0": { - "$ref": "#/components/examples/make_offer" + "make_offer": { + "value": { + "note": "Offer refund with replacement item.", + "offer_amount": { + "currency_code": "USD", + "value": "23" + }, + "offer_type": "REFUND_WITH_REPLACEMENT" + } } } }, @@ -1095,9 +1145,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -1107,8 +1154,10 @@ "$ref": "#/components/schemas/accept_offer" }, "examples": { - "0": { - "$ref": "#/components/examples/accept_offer" + "accept_offer": { + "value": { + "note": "I am ok with the refund offered." + } } } }, @@ -1201,9 +1250,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -1213,8 +1259,10 @@ "$ref": "#/components/schemas/deny_offer" }, "examples": { - "0": { - "$ref": "#/components/examples/deny_offer" + "deny_offer": { + "value": { + "note": "refund offer is very low." + } } } }, @@ -1307,9 +1355,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -1410,9 +1455,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "requestBody": { @@ -1446,69 +1488,6 @@ } } }, - "tags": [ - { - "name": "disputes", - "description": "Use the `/disputes` resource to list disputes, create disputes, show dispute details, and partially a dispute. Normally, an agent at PayPal creates disputes but now you can run test cases in the sandbox that create disputes." - }, - { - "name": "disputes-actions", - "description": "Use the `/disputes` resource with a dispute ID and an action to:
      • Accept a claim.
      • Accept an offer to resolve a dispute.
      • Acknowledge the return of an item related to a dispute.
      • Settle a dispute.
      • Appeal a dispute.
      • Cancel a dispute.
      • Change the reason for a dispute.
      • Deny an offer to resolve dispute.
      • Escalate a dispute to a claim.
      • Make an offer to resolve a dispute.
      • Make an offer to resolve a dispute.
      • Provide evidence for a dispute.
      • Provide supporting information for dispute.
      • In the sandbox, update the dispute status.
      • Send a message about a dispute to the other party in the dispute.
        • " - }, - { - "name": "referred-disputes", - "description": "Use the `/customer/referred-disputes` resource to create a dispute for a referred case that was created by a partner or marketplace, show details for a referred dispute, by ID, notify referred refunds completed to PayPal, notify PayPal about referred dispute adjudication updates, and determine the dispute eligibility for referred disputes." - }, - { - "name": "validate-eligibility", - "description": "Use the `/validate-eligibility/` resource to determine whether you can create a case for a transaction." - }, - { - "name": "compute-metrics", - "description": "Use the `/compute-metrics` resource to provide metrics for all disputes." - }, - { - "name": "validate-referred-dispute-eligibility", - "description": "Use the `/validate-referred-dispute-eligibility` resource to determine whether you can create a referred case for a transaction, by encrypted transaction ID." - }, - { - "name": "referred-disputes", - "description": "Use the `/referred-disputes` resource to create a dispute for a referred case that was created by a partner or marketplace, show details for a referred dispute, by ID, notify referred refunds completed to PayPal, notify PayPal about referred dispute adjudication updates, and determine the dispute eligibility for referred disputes." - }, - { - "name": "referred-disputes-actions", - "description": "Use the `/referred-disputes` resource with a dispute ID and an action to notify PayPal about adjudication updates for a referred dispute and notify PayPal about a refund for a referred dispute." - }, - { - "name": "partner-actions", - "description": "Use the `/disputes/{id}/partner-actions/` resource to show dispute action details and partially update a dispute action." - }, - { - "name": "search-suggestions", - "description": "Use the `/search-suggestions` resource to show search suggestions." - }, - { - "name": "dispute-events", - "description": "Use the `/dispute-events` resource to send dispute events." - }, - { - "name": "refund-preference", - "description": "Use the `/disputes/{id}/provide-refund-preference` resource to provide refund preferences for the dispute." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/customer-disputes/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": { "evidences": { @@ -1552,123 +1531,6 @@ } } }, - "parameters": { - "start_time": { - "name": "start_time", - "in": "query", - "description": "Filters the disputes in the response by a creation date and time. The start time must be within the last 180 days. Value is in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`.

          You can specify either but not both the `start_time` and `disputed_transaction_id` query parameters.", - "deprecated": 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})$", - "default": "Current date and time" - } - }, - "disputed_transaction_id": { - "name": "disputed_transaction_id", - "in": "query", - "description": "Filters the disputes in the response by a transaction, by ID.

          You can specify either but not both the `start_time` and `disputed_transaction_id` query parameter.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9A-Z_]+$" - } - }, - "page_size": { - "name": "page_size", - "in": "query", - "description": "Limits the number of disputes in the response to this value.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 50, - "default": 10 - } - }, - "next_page_token": { - "name": "next_page_token", - "in": "query", - "description": "The token that describes the next page of results to fetch. The list disputes call returns this token in the HATEOAS links in the response.", - "deprecated": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Za-z0-9+\\/=]+$", - "default": "The first page of data" - } - }, - "dispute_state": { - "name": "dispute_state", - "in": "query", - "description": "Filters the disputes in the response by a state. Separate multiple values with a comma (`,`). When you specify more than one dispute_state, the response lists disputes that belong to any of the specified dispute_state.", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 2000, - "pattern": "^[0-9A-Z_]+$", - "enum": [ - "REQUIRED_ACTION", - "REQUIRED_OTHER_PARTY_ACTION", - "UNDER_PAYPAL_REVIEW", - "RESOLVED", - "OPEN_INQUIRIES", - "APPEALABLE" - ] - } - }, - "update_time_before": { - "name": "update_time_before", - "in": "query", - "description": "The date and time when the dispute was last updated, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`. update_time_before must be within the last 180 days and the default is the current time.", - "schema": { - "type": "string", - "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})$" - } - }, - "update_time_after": { - "name": "update_time_after", - "in": "query", - "description": "The date and time when the dispute was last updated, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`. update_time_after must be within the last 180 days and the default is the maximum time (180 days) supported.", - "schema": { - "type": "string", - "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})$" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "The ID of the dispute for which to provide the supporting information.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Za-z0-9-]+$" - } - }, - "content_type": { - "name": "Content-Type", - "in": "header", - "description": "Content type of the request payload.", - "required": true, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "\\w+\\/[-+.\\w]+" - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -1684,9 +1546,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", @@ -1701,37 +1561,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", @@ -1760,17 +1598,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" ] } } @@ -2122,6 +1957,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", @@ -2181,7 +2047,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": { @@ -5653,55 +5519,109 @@ ] } }, - "examples": { - "make_offer": { - "value": { - "note": "Offer refund with replacement item.", - "offer_amount": { - "currency_code": "USD", - "value": "23" - }, - "offer_type": "REFUND_WITH_REPLACEMENT" + "parameters": { + "start_time": { + "name": "start_time", + "in": "query", + "description": "Filters the disputes in the response by a creation date and time. The start time must be within the last 180 days. Value is in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`.

          You can specify either but not both the `start_time` and `disputed_transaction_id` query parameters.", + "deprecated": 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})$", + "default": "Current date and time" } }, - "escalate": { - "value": { - "note": "Escalating to PayPal claim for resolution." + "disputed_transaction_id": { + "name": "disputed_transaction_id", + "in": "query", + "description": "Filters the disputes in the response by a transaction, by ID.

          You can specify either but not both the `start_time` and `disputed_transaction_id` query parameter.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[0-9A-Z_]+$" } }, - "accept_offer": { - "value": { - "note": "I am ok with the refund offered." + "page_size": { + "name": "page_size", + "in": "query", + "description": "Limits the number of disputes in the response to this value.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 50, + "default": 10 } }, - "require_evidence": { - "value": { - "action": "BUYER_EVIDENCE" + "next_page_token": { + "name": "next_page_token", + "in": "query", + "description": "The token that describes the next page of results to fetch. The list disputes call returns this token in the HATEOAS links in the response.", + "deprecated": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Za-z0-9+\\/=]+$", + "default": "The first page of data" } }, - "adjudicate": { - "value": { - "adjudication_outcome": "BUYER_FAVOR" + "dispute_state": { + "name": "dispute_state", + "in": "query", + "description": "Filters the disputes in the response by a state. Separate multiple values with a comma (`,`). When you specify more than one dispute_state, the response lists disputes that belong to any of the specified dispute_state.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 2000, + "pattern": "^[0-9A-Z_]+$" + }, + "enum": [ + "REQUIRED_ACTION", + "REQUIRED_OTHER_PARTY_ACTION", + "UNDER_PAYPAL_REVIEW", + "RESOLVED", + "OPEN_INQUIRIES", + "APPEALABLE" + ] + }, + "update_time_before": { + "name": "update_time_before", + "in": "query", + "description": "The date and time when the dispute was last updated, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`. update_time_before must be within the last 180 days and the default is the current time.", + "schema": { + "type": "string", + "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})$" } }, - "deny_offer": { - "value": { - "note": "refund offer is very low." + "update_time_after": { + "name": "update_time_after", + "in": "query", + "description": "The date and time when the dispute was last updated, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). For example, *`yyyy`*-*`MM`*-*`dd`*`T`*`HH`*:*`mm`*:*`ss`*.*`SSS`*`Z`. update_time_after must be within the last 180 days and the default is the maximum time (180 days) supported.", + "schema": { + "type": "string", + "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})$" } }, - "patch_request": { - "value": [ - { - "op": "add", - "path": "/partner_actions/-", - "value": { - "id": "AMX-22345", - "name": "ACCEPT_DISPUTE", - "create_time": "2018-01-12T10:41:35.000Z", - "status": "PENDING" - } - } - ] + "id": { + "name": "id", + "in": "path", + "description": "The ID of the dispute for which to provide the supporting information.", + "required": true, + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Za-z0-9-]+$" + } } } } diff --git a/openapi/customer_partner_referrals_v1.json b/openapi/customer_partner_referrals_v1.json index 5e44d0b..111fd8d 100644 --- a/openapi/customer_partner_referrals_v1.json +++ b/openapi/customer_partner_referrals_v1.json @@ -3,7 +3,43 @@ "info": { "title": "Partner Referrals", "description": "
          Deprecation notice: This integration method is deprecated. PayPal continues to support existing merchants using this method, but be advised that new features and enhancements will not be applied to these integrations. For details, see Onboard Sellers.
          Partners can use the Partner Referrals API to add PayPal seller accounts using the before payment onboarding model. With this API, you collect seller data and pass it to the account creation and setup forms, reducing the burden on sellers during the signup and setup process.", - "version": "1.4" + "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: The /v1/invoices endpoint is deprecated. Use the /v2/invoices endpoint instead. For details, see PayPal Invoicing Basic Integration.
          Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a customer, the invoice moves from draft to payable state. PayPal then emails the customer a link to the invoice on the PayPal website. Customers with a PayPal account can log in and pay the invoice with PayPal. Alternatively, customers can pay as a guest with a debit card or credit card. For more information, see Invoicing Overview and the Invoicing Integration Guide.", - "version": "1.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 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/. Where the 'format' is 'json'.", - "required": true, - "schema": { - "type": "string" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "The ID of the profile to delete.", - "required": true, - "schema": { - "type": "string" - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -472,9 +429,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", @@ -489,37 +444,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", @@ -548,17 +481,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" ] } } @@ -1136,35 +1066,24 @@ } } }, - "examples": { - "web_profile": { - "value": { - "name": "exampleProfile", - "presentation": { - "logo_image": "https://example.com/logo_image/" - }, - "input_fields": { - "no_shipping": 1, - "address_override": 1 - }, - "flow_config": { - "landing_page_type": "billing", - "bank_txn_pending_url": "https://example.com/flow_config/" - } + "parameters": { + "paypal_request_id": { + "name": "PayPal-Request-Id", + "in": "header", + "description": "The server stores keys for three hours.", + "required": true, + "schema": { + "type": "string" } }, - "patch_request": { - "value": [ - { - "op": "add", - "path": "/presentation/brand_name", - "value": "new_brand_name" - }, - { - "op": "remove", - "path": "/flow_config/landing_page_type" - } - ] + "id": { + "name": "id", + "in": "path", + "description": "The ID of the profile to delete.", + "required": true, + "schema": { + "type": "string" + } } } } diff --git a/openapi/payments_payment_v1.json b/openapi/payments_payment_v1.json index 7592d8a..e0906fb 100644 --- a/openapi/payments_payment_v1.json +++ b/openapi/payments_payment_v1.json @@ -3,9 +3,52 @@ "info": { "title": "Payments", "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the Payments REST API to easily and securely accept online and mobile payments. The payments name space contains resource collections for payments, sales, refunds, authorizations, captures, and orders.
          Important: The use of the PayPal REST /payments APIs to accept credit card payments is restricted. Instead, you can accept credit card payments with Braintree Direct.
          You can enable customers to make PayPal and credit card payments with only a few clicks, depending on the country. You can accept an immediate payment or authorize a payment and capture it later. You can show details for completed payments, refunds, and authorizations. You can make full or partial refunds. You also can void or re-authorize authorizations. For more information, see the Payments overview.", - "version": "1.12" + "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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          A sale is a completed payment. Use the /sale resource to show sale details and refund a sale. For more information, see also Refund payments." + }, + { + "name": "authorization", + "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /authorization resource and related sub-resources to show details for, capture, void, and reauthorize an authorization." + }, + { + "name": "orders", + "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /capture resource and sub-resources to show details for and refund captured payments." + }, + { + "name": "refund", + "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /refund resource to show details for a refund on direct and captured payments." + }, + { + "name": "receipt", + "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          A sale is a completed payment. Use the /sale resource to show sale details and refund a sale. For more information, see also Refund payments." - }, - { - "name": "authorization", - "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /authorization resource and related sub-resources to show details for, capture, void, and reauthorize an authorization." - }, - { - "name": "orders", - "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /capture resource and sub-resources to show details for and refund captured payments." - }, - { - "name": "refund", - "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /refund resource to show details for a refund on direct and captured payments." - }, - { - "name": "receipt", - "description": "
          Deprecation notice: The /v1/payments endpoint is deprecated. Use the /v2/payments endpoint instead. For details, see PayPal Checkout Basic Integration.
          Use the /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/. Where the 'format' is 'json'.", - "required": true, - "schema": { - "type": "string" - } - }, - "paypal_request_id": { - "name": "PayPal-Request-Id", - "in": "header", - "description": "The server stores keys for 45 days.", - "required": false, - "schema": { - "type": "string" - } - }, - "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.
          ", - "required": false, - "schema": { - "type": "string", - "default": "return=minimal" - } - }, - "paypal_auth_assertion": { - "name": "PayPal-Auth-Assertion", - "in": "header", - "description": "An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
          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.
          ", + "required": false, + "schema": { + "type": "string", + "default": "return=minimal" + } + }, + "paypal_auth_assertion": { + "name": "PayPal-Auth-Assertion", + "in": "header", + "description": "An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
          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:
          • 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.
          ", - "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.
          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:
          • 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.
          ", - "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.
          Notes:
          • If you specify one or more optional query parameters, the ending_balance response field is empty.
          • It takes a maximum of three hours for executed transactions to appear in the list transactions call.
          • This call lists transaction for the previous three years.
          ", + "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.
          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 codeDescription
          DPayPal or merchant rules denied the transaction.
          PThe 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.
          SThe transaction successfully completed without a denial and after any pending statuses.
          VA successful transaction was reversed and funds were refunded to the original sender.
          ", - "schema": { - "type": "string" - } - }, - "transaction_amount": { - "name": "transaction_amount", - "in": "query", - "description": "Filters the transactions in the response by a gross transaction amount range. Specify the range as ` TO `, where `` is the lower limit of the gross PayPal transaction amount and `` is the upper limit of the gross transaction amount. Specify the amounts in lower denominations. For example, to search for transactions from $5.00 to $10.05, specify `[500 TO 1005]`.
          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.
          If you omit this parameter, the API does not apply this filter.", - "required": false, - "schema": { - "type": "string" - } - }, - "store_id": { - "name": "store_id", - "in": "query", - "description": "Filters the transactions in the response by a store ID.", - "schema": { - "type": "string" - } - }, - "terminal_id": { - "name": "terminal_id", - "in": "query", - "description": "Filters the transactions in the response by a terminal ID.", - "schema": { - "type": "string" - } - }, - "fields": { - "name": "fields", - "in": "query", - "description": "Indicates which fields appear in the response. Value is a single field or a comma-separated list of fields. The 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.
          ", - "schema": { - "type": "string", - "default": "transaction_info" - } - }, - "balance_affecting_records_only": { - "name": "balance_affecting_records_only", - "in": "query", - "description": "Indicates whether the response includes only balance-impacting transactions or all transactions. Value is either:
          • Y. The default. The response includes only balance transactions.
          • N. The response includes all transactions.
          ", - "schema": { - "type": "string", - "default": "Y" - } - }, - "page_size": { - "name": "page_size", - "in": "query", - "description": "The number of items to return in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 500, - "default": 100 - } - }, - "page": { - "name": "page", - "in": "query", - "description": "The zero-relative start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "default": 1 - } - }, - "as_of_time": { - "name": "as_of_time", - "in": "query", - "description": "List balances in the response at the date time provided, will return the last refreshed balance in the system when not provided.", - "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})$" - } - }, - "currency_code": { - "name": "currency_code", - "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", - "format": "ppaas_common_currency_code_v2", - "minLength": 3, - "maxLength": 3 - } - } - }, - "responses": { - "default": { - "description": "The default response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_default" + "/v1/reporting/balances": { + "get": { + "summary": "List all balances", + "description": "List all balances. Specify date time to list balances for that time that appear in the response.
          Notes:
          • It takes a maximum of three hours for balances to appear in the list balances call.
          • This call lists balances upto the previous three years.
          ", + "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.
          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:
          • An integer for currencies like `JPY` that are not typically fractional.
          • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
          For the required number of decimal places for a currency code, see [Currency Codes](/docs/integration/direct/rest/currency-codes/).", - "maxLength": 32, - "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" - } - }, - "required": [ - "currency_code", - "value" - ] - }, - "percentage": { - "type": "string", - "description": "The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99`.", - "format": "ppaas_common_percentage_v2", - "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" - }, - "transaction_info": { - "type": "object", - "title": "Transaction Information", - "description": "The transaction information.", - "properties": { - "paypal_account_id": { - "type": "string", - "description": "The ID of the PayPal account of the counterparty.", - "minLength": 1, - "maxLength": 24, - "pattern": "^[a-zA-Z0-9]*$" - }, - "transaction_id": { - "type": "string", - "description": "The PayPal-generated transaction ID.", - "readOnly": true, - "minLength": 1, - "maxLength": 24, - "pattern": "^[a-zA-Z0-9]*$" - }, - "paypal_reference_id": { - "type": "string", - "description": "The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-existing transaction or event.", - "minLength": 1, - "maxLength": 24, - "pattern": "^[a-zA-Z0-9]*$" - }, - "paypal_reference_id_type": { - "type": "string", - "description": "The PayPal reference ID type.", - "minLength": 3, - "maxLength": 3, - "pattern": "^[a-zA-Z0-9]*$", - "enum": [ - "ODR", - "TXN", - "SUB", - "PAP" - ] - }, - "transaction_event_code": { - "type": "string", - "minLength": 1, - "maxLength": 5, - "pattern": "^[a-zA-Z0-9]*$", - "description": "A five-digit transaction event code that classifies the transaction type based on money movement and debit or credit. For example, 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 codeDescription
          DPayPal or merchant rules denied the transaction.
          PThe 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.
          SThe transaction successfully completed without a denial and after any pending statuses.
          VA successful transaction was fully reversed and funds were refunded to the original sender.
          ", - "minLength": 1, - "maxLength": 1, - "pattern": "^[a-zA-Z0-9]*$" - }, - "transaction_subject": { - "type": "string", - "description": "The subject of payment. The payer passes this value to the payee. The payer controls this data through the interface through which he or she sends the data.", - "minLength": 1, - "maxLength": 256, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "transaction_note": { - "type": "string", - "description": "A special note that the payer passes to the payee. Might contain special customer requests, such as shipping instructions.", - "minLength": 1, - "maxLength": 4000, - "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" - }, - "payment_tracking_id": { - "type": "string", - "description": "The payment tracking ID, which is a unique ID that partners specify to either get information about a payment or request a refund.", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9]*$" - }, - "bank_reference_id": { - "type": "string", - "description": "The bank reference ID. The bank provides this value for an ACH transaction.", - "minLength": 1, - "maxLength": 127, - "pattern": "^[a-zA-Z0-9]*$" - }, - "ending_balance": { - "$ref": "#/components/schemas/money", - "description": "The ending balance.
          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 eligible
          • 03. Partially eligible.
          ", - "minLength": 1, - "maxLength": 2, - "pattern": "^[a-zA-Z0-9]*$" - }, - "credit_term": { - "type": "string", - "description": "The credit term. The time span covered by the installment payments as expressed in the term length plus the length time unit code.", - "minLength": 1, - "maxLength": 25, - "pattern": "^[a-zA-Z0-9.]*$" - }, - "credit_transactional_fee": { - "$ref": "#/components/schemas/money", - "description": "The overall amount of the credit transaction fee." - }, - "credit_promotional_fee": { - "$ref": "#/components/schemas/money", - "description": "The overall amount of the credit promotional fee." - }, - "annual_percentage_rate": { - "$ref": "#/components/schemas/percentage", - "description": "The annual percentage rate (APR). Determines the amount of interest a consumer pays to finance a purchase at a merchant." - }, - "payment_method_type": { - "type": "string", - "minLength": 1, - "maxLength": 20, - "pattern": "^[a-zA-Z0-9-]*$", - "description": "The payment method that was used for a transaction. Value is 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 @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
          ", - "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.
          Note: The country code for Great Britain is GB and not UK 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.
          ", - "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:
          • Y. Verified.
          • N. Not verified.
          " - }, - "payer_status": { - "type": "string", - "minLength": 1, - "maxLength": 1, - "pattern": "^[N|Y]$", - "description": "The status of the payer. Value is `Y` or `N`." - }, - "payer_name": { - "description": "The payer name.", - "$ref": "#/components/schemas/name" - }, - "country_code": { - "description": "The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region of the payer.
          Note: The country code for Great Britain is GB and not UK 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.
          ", - "$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.
          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:
          • An integer for currencies like `JPY` that are not typically fractional.
          • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
          For the required number of decimal places for a currency code, see [Currency Codes](/docs/integration/direct/rest/currency-codes/).", + "maxLength": 32, + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + }, + "required": [ + "currency_code", + "value" + ] + }, + "percentage": { + "type": "string", + "description": "The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99`.", + "format": "ppaas_common_percentage_v2", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "transaction_info": { + "type": "object", + "title": "Transaction Information", + "description": "The transaction information.", + "properties": { + "paypal_account_id": { + "type": "string", + "description": "The ID of the PayPal account of the counterparty.", + "minLength": 1, + "maxLength": 24, + "pattern": "^[a-zA-Z0-9]*$" + }, + "transaction_id": { + "type": "string", + "description": "The PayPal-generated transaction ID.", + "readOnly": true, + "minLength": 1, + "maxLength": 24, + "pattern": "^[a-zA-Z0-9]*$" + }, + "paypal_reference_id": { + "type": "string", + "description": "The PayPal-generated base ID. PayPal exclusive. Cannot be altered. Defined as a related, pre-existing transaction or event.", + "minLength": 1, + "maxLength": 24, + "pattern": "^[a-zA-Z0-9]*$" + }, + "paypal_reference_id_type": { + "type": "string", + "description": "The PayPal reference ID type.", + "minLength": 3, + "maxLength": 3, + "pattern": "^[a-zA-Z0-9]*$", + "enum": [ + "ODR", + "TXN", + "SUB", + "PAP" + ] + }, + "transaction_event_code": { + "type": "string", + "minLength": 1, + "maxLength": 5, + "pattern": "^[a-zA-Z0-9]*$", + "description": "A five-digit transaction event code that classifies the transaction type based on money movement and debit or credit. For example, 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 codeDescription
          DPayPal or merchant rules denied the transaction.
          PThe 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.
          SThe transaction successfully completed without a denial and after any pending statuses.
          VA successful transaction was fully reversed and funds were refunded to the original sender.
          ", + "minLength": 1, + "maxLength": 1, + "pattern": "^[a-zA-Z0-9]*$" + }, + "transaction_subject": { + "type": "string", + "description": "The subject of payment. The payer passes this value to the payee. The payer controls this data through the interface through which he or she sends the data.", + "minLength": 1, + "maxLength": 256, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "transaction_note": { + "type": "string", + "description": "A special note that the payer passes to the payee. Might contain special customer requests, such as shipping instructions.", + "minLength": 1, + "maxLength": 4000, + "pattern": "^[a-zA-Z0-9_'\\-., \":;\\!?]*$" + }, + "payment_tracking_id": { + "type": "string", + "description": "The payment tracking ID, which is a unique ID that partners specify to either get information about a payment or request a refund.", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9]*$" + }, + "bank_reference_id": { + "type": "string", + "description": "The bank reference ID. The bank provides this value for an ACH transaction.", + "minLength": 1, + "maxLength": 127, + "pattern": "^[a-zA-Z0-9]*$" + }, + "ending_balance": { + "$ref": "#/components/schemas/money", + "description": "The ending balance.
          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 eligible
          • 03. Partially eligible.
          ", + "minLength": 1, + "maxLength": 2, + "pattern": "^[a-zA-Z0-9]*$" + }, + "credit_term": { + "type": "string", + "description": "The credit term. The time span covered by the installment payments as expressed in the term length plus the length time unit code.", + "minLength": 1, + "maxLength": 25, + "pattern": "^[a-zA-Z0-9.]*$" + }, + "credit_transactional_fee": { + "$ref": "#/components/schemas/money", + "description": "The overall amount of the credit transaction fee." + }, + "credit_promotional_fee": { + "$ref": "#/components/schemas/money", + "description": "The overall amount of the credit promotional fee." + }, + "annual_percentage_rate": { + "$ref": "#/components/schemas/percentage", + "description": "The annual percentage rate (APR). Determines the amount of interest a consumer pays to finance a purchase at a merchant." + }, + "payment_method_type": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "pattern": "^[a-zA-Z0-9-]*$", + "description": "The payment method that was used for a transaction. Value is 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 @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
          ", + "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.
          Note: The country code for Great Britain is GB and not UK 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.
          ", + "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:
          • Y. Verified.
          • N. Not verified.
          " + }, + "payer_status": { + "type": "string", + "minLength": 1, + "maxLength": 1, + "pattern": "^[N|Y]$", + "description": "The status of the payer. Value is `Y` or `N`." + }, + "payer_name": { + "description": "The payer name.", + "$ref": "#/components/schemas/name" + }, + "country_code": { + "description": "The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region of the payer.
          Note: The country code for Great Britain is GB and not UK 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.
          ", + "$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.
          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 codeDescription
          DPayPal or merchant rules denied the transaction.
          PThe 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.
          SThe transaction successfully completed without a denial and after any pending statuses.
          VA successful transaction was reversed and funds were refunded to the original sender.
          ", + "schema": { + "type": "string" + } + }, + "transaction_amount": { + "name": "transaction_amount", + "in": "query", + "description": "Filters the transactions in the response by a gross transaction amount range. Specify the range as ` TO `, where `` is the lower limit of the gross PayPal transaction amount and `` is the upper limit of the gross transaction amount. Specify the amounts in lower denominations. For example, to search for transactions from $5.00 to $10.05, specify `[500 TO 1005]`.
          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.
          If you omit this parameter, the API does not apply this filter.", + "required": false, + "schema": { + "type": "string" + } + }, + "store_id": { + "name": "store_id", + "in": "query", + "description": "Filters the transactions in the response by a store ID.", + "schema": { + "type": "string" + } + }, + "terminal_id": { + "name": "terminal_id", + "in": "query", + "description": "Filters the transactions in the response by a terminal ID.", + "schema": { + "type": "string" + } + }, + "fields": { + "name": "fields", + "in": "query", + "description": "Indicates which fields appear in the response. Value is a single field or a comma-separated list of fields. The 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.
          ", + "schema": { + "type": "string", + "default": "transaction_info" + } + }, + "balance_affecting_records_only": { + "name": "balance_affecting_records_only", + "in": "query", + "description": "Indicates whether the response includes only balance-impacting transactions or all transactions. Value is either:
          • Y. The default. The response includes only balance transactions.
          • N. The response includes all transactions.
          ", + "schema": { + "type": "string", + "default": "Y" + } + }, + "page_size": { + "name": "page_size", + "in": "query", + "description": "The number of items to return in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 100 + } + }, + "page": { + "name": "page", + "in": "query", + "description": "The zero-relative start index of the entire list of items that are returned in the response. So, the combination of `page=1` and `page_size=20` returns the first 20 items.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "default": 1 + } + }, + "as_of_time": { + "name": "as_of_time", + "in": "query", + "description": "List balances in the response at the date time provided, will return the last refreshed balance in the system when not provided.", + "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})$" + } + }, + "currency_code": { + "name": "currency_code", + "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", + "format": "ppaas_common_currency_code_v2", + "minLength": 3, + "maxLength": 3 + } } - }, - "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" - } } - } } - } -} \ No newline at end of file +} diff --git a/openapi/shipping_shipment_tracking_v1.json b/openapi/shipping_shipment_tracking_v1.json index 7269f1d..85a8b56 100644 --- a/openapi/shipping_shipment_tracking_v1.json +++ b/openapi/shipping_shipment_tracking_v1.json @@ -3,7 +3,51 @@ "info": { "title": "Shipment Tracking", "description": "Merchants can use the PayPal Add Tracking API to manage tracking information. Merchants can add tracking numbers and associated information to PayPal. After adding these details to PayPal, merchants can:
          • Update tracking details.
          • Show tracking details.
          • Cancel tracking numbers.
          For more information, see the Add Tracking API Overview and Add Tracking API Integration Guide.", - "version": "1.4" + "version": "1.6", + "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": "trackers", + "description": "Use the `/trackers` resource to create and manage tracking information for PayPal transactions." + }, + { + "name": "trackers-batch", + "description": "Use the `/trackers-batch` resource to add tracking information for multiple PayPal transactions." + }, + { + "name": "carriers-recommend", + "description": "Use the `/carriers-recommendations` to detect the possible carriers corresponding the tracking info from tracking aggregator." + }, + { + "name": "carriers", + "description": "Use the `/carriers` resource to list/detect all the carriers available for tracking in PayPal and its subsidiary." + }, + { + "name": "shipments", + "description": "Use the `/shipments` resource to fetch all the shipments associated with a given Paypal Account Id." + }, + { + "name": "shipment-tracker", + "description": "Use the `/shipment-tracker` resource to track the shipment." + }, + { + "name": "unsubscribe-shipment-tracking", + "description": "Use the `/unsubscribe-shipment-tracking` resource to unsubscribe from multiple shipments." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/tracking/v1/" }, "paths": { "/v1/shipping/trackers-batch": { @@ -46,14 +90,50 @@ } }, "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/tracker_collection" + "$ref": "#/components/requestBodies/tracker_collection" + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/shipping/trackers/readwrite" + ] + } + ], + "tags": [ + "trackers-batch" + ] + } + }, + "/v1/shipping/trackers": { + "post": { + "summary": "Add tracking information for PayPal transaction", + "description": "Adds tracking information for a PayPal transaction.", + "operationId": "trackers.post", + "responses": { + "200": { + "description": "A successful request returns the HTTP 200 OK status code and a JSON response body that shows tracking information.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tracker_identifier_collection" + } + } + } + }, + "default": { + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } } } } }, + "requestBody": { + "$ref": "#/components/requestBodies/tracker_collection" + }, "security": [ { "Oauth2": [ @@ -62,7 +142,55 @@ } ], "tags": [ - "trackers-batch" + "trackers" + ] + }, + "get": { + "summary": "List tracking information", + "description": "Lists tracking information that meet search criteria. The tracking ID is required but the tracking number is optional.", + "operationId": "trackers-batch.get", + "responses": { + "200": { + "description": "A successful request returns the HTTP 200 OK status code and a JSON response body that lists tracking information that meets search criteria.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tracker" + } + } + } + }, + "default": { + "description": "The error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/transaction_id" + }, + { + "$ref": "#/components/parameters/tracking_number" + }, + { + "$ref": "#/components/parameters/account_id" + } + ], + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/shipping/trackers/read" + ] + } + ], + "tags": [ + "trackers" ] } }, @@ -122,11 +250,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/tracker" - }, - "examples": { - "0": { - "$ref": "#/components/examples/tracker" - } } } } @@ -163,46 +286,18 @@ } } }, - "tags": [ - { - "name": "trackers", - "description": "Use the `/trackers` resource to create and manage tracking information for PayPal transactions." - }, - { - "name": "trackers-batch", - "description": "Use the `/trackers-batch` resource to add tracking information for multiple PayPal transactions." - }, - { - "name": "carriers-recommend", - "description": "Use the `/carriers-recommendations` to detect the possible carriers corresponding the tracking info from tracking aggregator." - }, - { - "name": "carriers", - "description": "Use the `/carriers` resource to list/detect all the carriers available for tracking in PayPal and its subsidiary." - }, - { - "name": "shipments", - "description": "Use the `/shipments` resource to fetch all the shipments associated with a given Paypal Account Id." - }, - { - "name": "shipment-tracker", - "description": "Use the `/shipment-tracker` resource to track the shipment." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/tracking/v1/" - }, - "servers": [ - { - "url": "https://api-m.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api-m.paypal.com", - "description": "PayPal Production Environment" - } - ], "components": { + "requestBodies": { + "tracker_collection": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tracker_collection" + } + } + } + } + }, "securitySchemes": { "Oauth2": { "type": "oauth2", @@ -218,32 +313,6 @@ } } }, - "parameters": { - "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-_]*$" - } - }, - "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.

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

          The permanent token represents a payment method that's saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.", - "version": "3.1" + "version": "3.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": "payment-tokens", + "description": "Use the `/vault/payment-tokens` resource to create, retrieve, and delete a payment token that may optionally be associated with a customer." + }, + { + "name": "setup-tokens", + "description": "Use the `/vault/setup-tokens` resource to create and retrieve temporary vault payment methods." + }, + { + "name": "tokens", + "description": "Use the `/vault/tokens` resource to detokenize a vault token to retrieve details associated to the underlying payment source." + }, + { + "name": "customers", + "description": "Use the `/vault/customers` resource to create, update, get and delete a customer." + } + ], + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/vault/v3/" }, "paths": { "/v3/vault/payment-tokens": { @@ -20,8 +52,43 @@ "$ref": "#/components/schemas/payment_token_response" }, "examples": { - "0": { - "$ref": "#/components/examples/payment_token_response" + "payment_token_response": { + "value": { + "id": "8kk8451t", + "customer": { + "id": "customer_4029352050" + }, + "payment_source": { + "card": { + "last_digits": "1111", + "expiry": "2027-02", + "brand": "VISA", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "delete", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "DELETE", + "encType": "application/json" + } + ] + } } } } @@ -35,8 +102,43 @@ "$ref": "#/components/schemas/payment_token_response" }, "examples": { - "0": { - "$ref": "#/components/examples/payment_token_response" + "payment_token_response": { + "value": { + "id": "8kk8451t", + "customer": { + "id": "customer_4029352050" + }, + "payment_source": { + "card": { + "last_digits": "1111", + "expiry": "2027-02", + "brand": "VISA", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "delete", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "DELETE", + "encType": "application/json" + } + ] + } } } } @@ -94,9 +196,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -108,8 +207,15 @@ "$ref": "#/components/schemas/payment_token_request" }, "examples": { - "0": { - "$ref": "#/components/examples/payment_token_request" + "payment_token_request": { + "value": { + "payment_source": { + "token": { + "id": "5C991763VB2781612", + "type": "BILLING_AGREEMENT" + } + } + } } } } @@ -141,8 +247,181 @@ "$ref": "#/components/schemas/customer_vault_payment_tokens_response" }, "examples": { - "0": { - "$ref": "#/components/examples/customer_vault_payment_tokens_response" + "customer_vault_payment_tokens_response": { + "value": { + "customer": { + "id": "customer_4029352050" + }, + "payment_tokens": [ + { + "id": "8kk8451t", + "customer": { + "id": "customer_4029352050" + }, + "payment_source": { + "card": { + "brand": "VISA", + "last_digits": "1111", + "expiry": "2027-02", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "delete", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", + "method": "DELETE", + "encType": "application/json" + } + ] + }, + { + "id": "fgh6561t", + "customer": { + "id": "customer_4029352050" + }, + "payment_source": { + "paypal": { + "description": "Description for PayPal to be shown to PayPal payer", + "email_address": "john.doe@example.com", + "account_id": "VYYFH3WJ4JPJQ", + "shipping": { + "name": { + "full_name": "John Doe" + }, + "address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + }, + "usage_pattern": "IMMEDIATE", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "name": { + "given_name": "John", + "surname": "Doe" + }, + "address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/fgh6561t", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "delete", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/fgh6561t", + "method": "DELETE", + "encType": "application/json" + } + ] + }, + { + "id": "hg654s1t", + "customer": { + "id": "customer_4029352050" + }, + "payment_source": { + "venmo": { + "description": "Description for Venmo to be shown to Venmo payer", + "shipping": { + "name": { + "full_name": "John Doe" + }, + "address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + }, + "usage_pattern": "IMMEDIATE", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "email_address": "john.doe@example.com", + "user_name": "johndoe", + "name": { + "given_name": "John", + "surname": "Doe" + }, + "account_id": "VYYFH3WJ4JPJQ", + "address": { + "address_line_1": "PayPal", + "address_line_2": "2211 North 1st Street", + "admin_area_1": "CA", + "admin_area_2": "San Jose", + "postal_code": "96112", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/hg654s1t", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "delete", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens/hg654s1t", + "method": "DELETE", + "encType": "application/json" + } + ] + } + ], + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "first", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "last", + "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", + "method": "GET", + "encType": "application/json" + } + ] + } } } } @@ -191,9 +470,6 @@ }, { "$ref": "#/components/parameters/total_required" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -268,9 +544,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -326,9 +599,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -357,8 +627,43 @@ "$ref": "#/components/schemas/setup_token_response" }, "examples": { - "0": { - "$ref": "#/components/examples/setup_token_response" + "setup_token_response": { + "value": { + "id": "5C991763VB2781612", + "customer": { + "id": "customer_4029352050" + }, + "status": "APPROVED", + "payment_source": { + "card": { + "last_digits": "1111", + "expiry": "2027-02", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_1": "CA", + "admin_area_2": "San Jose", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/setup-tokens/5C991763VB2781612", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "confirm", + "href": "https://api-m.paypal.com/v3/vault/payment-token", + "method": "POST", + "encType": "application/json" + } + ] + } } } } @@ -372,8 +677,43 @@ "$ref": "#/components/schemas/setup_token_response" }, "examples": { - "0": { - "$ref": "#/components/examples/setup_token_response" + "setup_token_response": { + "value": { + "id": "5C991763VB2781612", + "customer": { + "id": "customer_4029352050" + }, + "status": "APPROVED", + "payment_source": { + "card": { + "last_digits": "1111", + "expiry": "2027-02", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_1": "CA", + "admin_area_2": "San Jose", + "postal_code": "95131", + "country_code": "US" + } + } + }, + "links": [ + { + "rel": "self", + "href": "https://api-m.paypal.com/v3/vault/setup-tokens/5C991763VB2781612", + "method": "GET", + "encType": "application/json" + }, + { + "rel": "confirm", + "href": "https://api-m.paypal.com/v3/vault/payment-token", + "method": "POST", + "encType": "application/json" + } + ] + } } } } @@ -421,9 +761,6 @@ } }, "parameters": [ - { - "$ref": "#/components/parameters/content_type" - }, { "$ref": "#/components/parameters/paypal_request_id" } @@ -435,8 +772,30 @@ "$ref": "#/components/schemas/setup_token_request" }, "examples": { - "0": { - "$ref": "#/components/examples/setup_token_request" + "setup_token_request": { + "value": { + "payment_source": { + "card": { + "number": "4111111111111111", + "expiry": "2027-02", + "name": "John Doe", + "billing_address": { + "address_line_1": "2211 N First Street", + "address_line_2": "17.3.160", + "admin_area_1": "CA", + "admin_area_2": "San Jose", + "postal_code": "95131", + "country_code": "US" + }, + "experience_context": { + "brand_name": "YourBrandName", + "locale": "en-US", + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } + } + } } } } @@ -516,9 +875,6 @@ "parameters": [ { "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/content_type" } ], "security": [ @@ -534,37 +890,6 @@ } } }, - "tags": [ - { - "name": "payment-tokens", - "description": "Use the `/vault/payment-tokens` resource to create, retrieve, and delete a payment token that may optionally be associated with a customer." - }, - { - "name": "setup-tokens", - "description": "Use the `/vault/setup-tokens` resource to create and retrieve temporary vault payment methods." - }, - { - "name": "tokens", - "description": "Use the `/vault/tokens` resource to detokenize a vault token to retrieve details associated to the underlying payment source." - }, - { - "name": "customers", - "description": "Use the `/vault/customers` resource to create, update, get and delete a customer." - } - ], - "externalDocs": { - "url": "https://developer.paypal.com/docs/api/vault/v3/" - }, - "servers": [ - { - "url": "https://api.sandbox.paypal.com", - "description": "PayPal Sandbox Environment" - }, - { - "url": "https://api.paypal.com", - "description": "PayPal Live Environment" - } - ], "components": { "securitySchemes": { "Oauth2": { @@ -583,85 +908,6 @@ } } }, - "parameters": { - "content_type": { - "name": "Content-Type", - "description": "Specifies the request format.", - "in": "header", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Za-z0-9/+-]+$" - } - }, - "paypal_request_id": { - "name": "PayPal-Request-Id", - "description": "The server stores keys for 3 hours.", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - }, - "customer_id": { - "name": "customer_id", - "description": "A unique identifier representing a specific customer in merchant's/partner's system or records.", - "in": "query", - "required": true, - "schema": { - "type": "string", - "minLength": 7, - "maxLength": 36, - "pattern": "^[0-9a-zA-Z_-]+$" - } - }, - "page_size": { - "name": "page_size", - "description": "A non-negative, non-zero integer indicating the maximum number of results to return at one time.", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "default": 5 - } - }, - "page": { - "name": "page", - "description": "A non-negative, non-zero integer representing the page of the results.", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } - }, - "total_required": { - "name": "total_required", - "description": "A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response.", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - "id": { - "name": "id", - "description": "ID of the setup token.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "minLength": 7, - "maxLength": 36, - "pattern": "^[0-9a-zA-Z_-]+$" - } - } - }, "schemas": { "error_details": { "title": "Error Details", @@ -677,9 +923,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", @@ -694,37 +938,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", @@ -753,17 +975,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" ] } } @@ -2046,8 +2265,7 @@ "type": "string", "default": "NOT_VERIFIED", "minLength": 1, - "maxLength": 255, - "enum": [] + "maxLength": 255 }, "ach_debit_response-2": { "title": "ACH Debit Response", @@ -2196,6 +2414,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" + ] + }, "error": { "type": "object", "title": "Error", @@ -2222,7 +2471,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": { @@ -2525,292 +2774,70 @@ } } }, - "examples": { - "payment_token_request": { - "value": { - "payment_source": { - "token": { - "id": "5C991763VB2781612", - "type": "BILLING_AGREEMENT" - } - } + "parameters": { + "paypal_request_id": { + "name": "PayPal-Request-Id", + "description": "The server stores keys for 3 hours.", + "in": "header", + "required": true, + "schema": { + "type": "string" } }, - "payment_token_response": { - "value": { - "id": "8kk8451t", - "customer": { - "id": "customer_4029352050" - }, - "payment_source": { - "card": { - "last_digits": "1111", - "expiry": "2027-02", - "brand": "VISA", - "name": "John Doe", - "billing_address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95131", - "country_code": "US" - } - } - }, - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "delete", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", - "method": "DELETE", - "encType": "application/json" - } - ] + "customer_id": { + "name": "customer_id", + "description": "A unique identifier representing a specific customer in merchant's/partner's system or records.", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 7, + "maxLength": 36, + "pattern": "^[0-9a-zA-Z_-]+$" } }, - "setup_token_request": { - "value": { - "payment_source": { - "card": { - "number": "4111111111111111", - "expiry": "2027-02", - "name": "John Doe", - "billing_address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_1": "CA", - "admin_area_2": "San Jose", - "postal_code": "95131", - "country_code": "US" - }, - "experience_context": { - "brand_name": "YourBrandName", - "locale": "en-US", - "return_url": "https://example.com/returnUrl", - "cancel_url": "https://example.com/cancelUrl" - } - } - } + "page_size": { + "name": "page_size", + "description": "A non-negative, non-zero integer indicating the maximum number of results to return at one time.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 5 } }, - "customer_vault_payment_tokens_response": { - "value": { - "customer": { - "id": "customer_4029352050" - }, - "payment_tokens": [ - { - "id": "8kk8451t", - "customer": { - "id": "customer_4029352050" - }, - "payment_source": { - "card": { - "brand": "VISA", - "last_digits": "1111", - "expiry": "2027-02", - "name": "John Doe", - "billing_address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95131", - "country_code": "US" - } - } - }, - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "delete", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/8kk8451t", - "method": "DELETE", - "encType": "application/json" - } - ] - }, - { - "id": "fgh6561t", - "customer": { - "id": "customer_4029352050" - }, - "payment_source": { - "paypal": { - "description": "Description for PayPal to be shown to PayPal payer", - "email_address": "john.doe@example.com", - "account_id": "VYYFH3WJ4JPJQ", - "shipping": { - "name": { - "full_name": "John Doe" - }, - "address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95131", - "country_code": "US" - } - }, - "usage_pattern": "IMMEDIATE", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "name": { - "given_name": "John", - "surname": "Doe" - }, - "address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95131", - "country_code": "US" - } - } - }, - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/fgh6561t", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "delete", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/fgh6561t", - "method": "DELETE", - "encType": "application/json" - } - ] - }, - { - "id": "hg654s1t", - "customer": { - "id": "customer_4029352050" - }, - "payment_source": { - "venmo": { - "description": "Description for Venmo to be shown to Venmo payer", - "shipping": { - "name": { - "full_name": "John Doe" - }, - "address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_2": "San Jose", - "admin_area_1": "CA", - "postal_code": "95131", - "country_code": "US" - } - }, - "usage_pattern": "IMMEDIATE", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "email_address": "john.doe@example.com", - "user_name": "johndoe", - "name": { - "given_name": "John", - "surname": "Doe" - }, - "account_id": "VYYFH3WJ4JPJQ", - "address": { - "address_line_1": "PayPal", - "address_line_2": "2211 North 1st Street", - "admin_area_1": "CA", - "admin_area_2": "San Jose", - "postal_code": "96112", - "country_code": "US" - } - } - }, - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/hg654s1t", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "delete", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens/hg654s1t", - "method": "DELETE", - "encType": "application/json" - } - ] - } - ], - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "first", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "last", - "href": "https://api-m.paypal.com/v3/vault/payment-tokens?customer_id=customer_4029352050&page=1&page_size=5&total_required=false", - "method": "GET", - "encType": "application/json" - } - ] + "page": { + "name": "page", + "description": "A non-negative, non-zero integer representing the page of the results.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 } }, - "setup_token_response": { - "value": { - "id": "5C991763VB2781612", - "customer": { - "id": "customer_4029352050" - }, - "status": "APPROVED", - "payment_source": { - "card": { - "last_digits": "1111", - "expiry": "2027-02", - "name": "John Doe", - "billing_address": { - "address_line_1": "2211 N First Street", - "address_line_2": "17.3.160", - "admin_area_1": "CA", - "admin_area_2": "San Jose", - "postal_code": "95131", - "country_code": "US" - } - } - }, - "links": [ - { - "rel": "self", - "href": "https://api-m.paypal.com/v3/vault/setup-tokens/5C991763VB2781612", - "method": "GET", - "encType": "application/json" - }, - { - "rel": "confirm", - "href": "https://api-m.paypal.com/v3/vault/payment-token", - "method": "POST", - "encType": "application/json" - } - ] + "total_required": { + "name": "total_required", + "description": "A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response.", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "id": { + "name": "id", + "description": "ID of the setup token.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 7, + "maxLength": 36, + "pattern": "^[0-9a-zA-Z_-]+$" } } } diff --git a/package-lock.json b/package-lock.json index 51d815e..a7013a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@paypal/paypal-rest-api-specifications", - "version": "1.0.0", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@paypal/paypal-rest-api-specifications", - "version": "1.0.0", + "version": "1.2.0", "license": "Apache-2.0", "dependencies": { "@openapitools/openapi-generator-cli": "^2.7.0", diff --git a/package.json b/package.json index 5b6b185..9b7b223 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paypal/paypal-rest-api-specifications", - "version": "1.1.0", + "version": "1.2.0", "description": "This repository contains the specification files for PayPal's REST APIs.", "license": "Apache-2.0", "repository": {