From 9d3825c0f4ccd898f0c0278151e754729a3bf0e6 Mon Sep 17 00:00:00 2001 From: sraj Date: Mon, 16 Oct 2023 23:48:35 -0700 Subject: [PATCH] Update OpenAPI 3.0 Specifications --- openapi/checkout_orders_v1.json | 76 +++ openapi/checkout_orders_v2.json | 364 +++++++++- openapi/customer_partner_referrals_v2.json | 27 +- openapi/payments_payment_v2.json | 2 +- openapi/vault_payment_tokens_v3.json | 745 ++++++++++----------- 5 files changed, 808 insertions(+), 406 deletions(-) diff --git a/openapi/checkout_orders_v1.json b/openapi/checkout_orders_v1.json index 5d2846c..71fb507 100644 --- a/openapi/checkout_orders_v1.json +++ b/openapi/checkout_orders_v1.json @@ -1491,6 +1491,82 @@ "redirect_urls" ] }, + "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 the field is in the body, set this value to the JSON pointer to that field. 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 and fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients **MUST NOT** depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "error": { + "type": "object", + "title": "Error", + "description": "The error details.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "debug_id": { + "type": "string", + "description": "The PayPal internal ID that is used for correlation purposes." + }, + "information_link": { + "type": "string", + "description": "The information link, or URI, that shows detailed information about this error for the developer.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "An array of additional details about the error.", + "items": { + "$ref": "#/components/schemas/error_details-2" + } + }, + "links": { + "type": "array", + "description": "An array of request-related [HATEOAS links](/docs/api/overview/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/link_description", + "readOnly": true + } + } + }, + "required": [ + "name", + "message", + "debug_id" + ] + }, "credit_card": { "type": "object", "title": "Credit Card", diff --git a/openapi/checkout_orders_v2.json b/openapi/checkout_orders_v2.json index 5158f43..f8fb86d 100644 --- a/openapi/checkout_orders_v2.json +++ b/openapi/checkout_orders_v2.json @@ -918,7 +918,7 @@ "/v2/checkout/orders/{id}/trackers/{tracker_id}": { "patch": { "summary": "Update or cancel tracking information for a PayPal order", - "description": "Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
", + "description": "Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
statusreplaceOnly patching status to CANCELLED is currently supported.
", "operationId": "orders.trackers.patch", "responses": { "204": { @@ -3157,6 +3157,40 @@ ] } } + }, + { + "title": "ALIAS_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": [ + "ALIAS_DECLINED_BY_PROCESSOR" + ] + }, + "description": { + "type": "string", + "enum": [ + "The provided alias was declined by the processor. Please create a new order with a different alias_key and/or alias_label and try again." + ] + } + } + }, + { + "title": "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": [ + "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER" + ] + }, + "description": { + "type": "string", + "enum": [ + "Blik's one_click flow requires one_click.auth_code and one_click.alias_label parameters for the buyer's first transaction. For all subsequent transactions,only the one_click.alias_key parameter is required." + ] + } + } } ] } @@ -4075,6 +4109,49 @@ "quantity" ] }, + "shipping_type": { + "type": "string", + "title": "Shipping Type", + "description": "The method by which the payer wants to get their items.", + "enum": [ + "SHIPPING", + "PICKUP" + ] + }, + "shipping_option": { + "type": "object", + "title": "Shipping Option", + "description": "The options that the payee or merchant offers to the payer to ship or pick up their items.", + "properties": { + "id": { + "type": "string", + "description": "A unique ID that identifies a payer-selected shipping option.", + "maxLength": 127 + }, + "label": { + "type": "string", + "description": "A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale.", + "maxLength": 127 + }, + "type": { + "description": "The method by which the payer wants to get their items.", + "$ref": "#/components/schemas/shipping_type" + }, + "amount": { + "description": "The shipping cost for the selected option.", + "$ref": "#/components/schemas/money" + }, + "selected": { + "type": "boolean", + "description": "If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true`." + } + }, + "required": [ + "id", + "label", + "selected" + ] + }, "shipping_detail": { "type": "object", "description": "The shipping details.", @@ -4095,6 +4172,16 @@ "PICKUP_IN_PERSON" ] }, + "options": { + "type": "array", + "description": "An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.", + "minItems": 0, + "maxItems": 10, + "items": { + "description": "The option that the payee or merchant offers to the payer to ship or pick up their items.", + "$ref": "#/components/schemas/shipping_option" + } + }, "address": { "description": "The address of the person to whom to ship the items. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", "$ref": "#/components/schemas/address_portable" @@ -4518,7 +4605,7 @@ "type": "string", "minLength": 9, "maxLength": 36, - "pattern": "^[a-zA-Z0-9-]+$", + "pattern": "^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$", "description": "Transaction reference id returned by the scheme. For Visa and Amex, this is the \"Tran id\" field in response. For MasterCard, this is the \"BankNet reference id\" field in response. For Discover, this is the \"NRID\" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -." }, "date": { @@ -4567,6 +4654,82 @@ "payment_type" ] }, + "eci_flag": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[0-9A-Z_]+$", + "description": "Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor.", + "enum": [ + "MASTERCARD_NON_3D_SECURE_TRANSACTION", + "MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION", + "MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION", + "FULLY_AUTHENTICATED_TRANSACTION", + "ATTEMPTED_AUTHENTICATION_TRANSACTION", + "NON_3D_SECURE_TRANSACTION" + ] + }, + "network_token_request": { + "type": "object", + "title": "Network Token", + "description": "The Third Party Network token used to fund a payment.", + "properties": { + "number": { + "type": "string", + "description": "Third party network token number.", + "pattern": "^[0-9]{13,19}$", + "minLength": 13, + "maxLength": 19 + }, + "expiry": { + "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_year_month" + }, + "cryptogram": { + "type": "string", + "description": "An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions.", + "pattern": "^.*$", + "minLength": 28, + "maxLength": 32 + }, + "eci_flag": { + "$ref": "#/components/schemas/eci_flag" + }, + "token_requestor_id": { + "type": "string", + "description": "A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud.", + "pattern": "^[0-9A-Z_]+$", + "minLength": 1, + "maxLength": 11 + } + }, + "required": [ + "number", + "expiry" + ] + }, + "url": { + "type": "string", + "description": "Describes the URL.", + "format": "uri" + }, + "card_experience_context": { + "type": "object", + "title": "Card Experience Context", + "description": "Customizes the payer experience during the 3DS Approval for payment.", + "properties": { + "return_url": { + "description": "The URL where the customer will be redirected upon successfully completing the 3DS challenge.", + "format": "uri", + "$ref": "#/components/schemas/url" + }, + "cancel_url": { + "description": "The URL where the customer will be redirected upon cancelling the 3DS challenge.", + "format": "uri", + "$ref": "#/components/schemas/url" + } + } + }, "card_request": { "type": "object", "title": "Card Request", @@ -4583,6 +4746,13 @@ }, "stored_credential": { "$ref": "#/components/schemas/card_stored_credential" + }, + "network_token": { + "description": "A 3rd party network token refers to a network token that the merchant provisions from and vaults with an external TSP (Token Service Provider) other than PayPal.", + "$ref": "#/components/schemas/network_token_request" + }, + "experience_context": { + "$ref": "#/components/schemas/card_experience_context" } } } @@ -4842,11 +5012,6 @@ "minLength": 2, "pattern": "^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$" }, - "url": { - "type": "string", - "description": "Describes the URL.", - "format": "uri" - }, "paypal_wallet_experience_context": { "type": "object", "title": "PayPal Wallet Experience Context", @@ -4877,12 +5042,12 @@ ] }, "return_url": { - "description": "The URL where the customer is redirected after the customer approves the payment.", + "description": "The URL where the customer will be redirected upon approving a payment.", "format": "uri", "$ref": "#/components/schemas/url" }, "cancel_url": { - "description": "The URL where the customer is redirected after the customer cancels the payment.", + "description": "The URL where the customer will be redirected upon cancelling the payment approval.", "format": "uri", "$ref": "#/components/schemas/url" }, @@ -5024,6 +5189,7 @@ } } }, + "altpay_recurring_attributes_request": {}, "bancontact_request": { "type": "object", "title": "Bancontact payment object", @@ -5040,6 +5206,10 @@ "experience_context": { "description": "Customizes the payer experience during the approval process for the payment.", "$ref": "#/components/schemas/experience_context_base" + }, + "attributes": { + "description": "Attributes for altpay recurring.", + "$ref": "#/components/schemas/altpay_recurring_attributes_request" } }, "required": [ @@ -5055,6 +5225,95 @@ "maxLength": 254, "pattern": "^.+@[^\"\\-].+$" }, + "ip_address": { + "type": "string", + "title": "IP Address", + "description": "An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses.", + "format": "ppaas_ip_address_v1", + "minLength": 7, + "maxLength": 39, + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$|^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$" + }, + "blik_experience_context": { + "type": "object", + "title": "BLIK Experience Context", + "description": "Customizes the payer experience during the approval process for the BLIK payment.", + "allOf": [ + { + "$ref": "#/components/schemas/experience_context_base" + }, + { + "properties": { + "consumer_ip": { + "description": "The IP address of the consumer. It could be either IPv4 or IPv6.", + "$ref": "#/components/schemas/ip_address" + }, + "consumer_user_agent": { + "type": "string", + "description": "The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).", + "minLength": 1, + "maxLength": 256, + "pattern": "^.*$" + } + } + } + ] + }, + "blik_seamless": { + "type": "object", + "title": "BLIK level_0 payment object", + "description": "Information used to pay using BLIK level_0 flow.", + "properties": { + "auth_code": { + "type": "string", + "description": "6-digit code used to authenticate a consumer within BLIK.", + "minLength": 6, + "maxLength": 6, + "pattern": "^[0-9]{6}$" + } + }, + "required": [ + "auth_code" + ] + }, + "blik_one_click": { + "type": "object", + "title": "BLIK one-click payment object", + "description": "Information used to pay using BLIK one-click flow.", + "properties": { + "auth_code": { + "type": "string", + "description": "6-digit code used to authenticate a consumer within BLIK.", + "minLength": 6, + "maxLength": 6, + "pattern": "^[0-9]{6}$" + }, + "consumer_reference": { + "type": "string", + "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.", + "minLength": 3, + "maxLength": 64, + "pattern": "^[ -~]{3,64}$" + }, + "alias_label": { + "type": "string", + "description": "A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts.", + "minLength": 8, + "maxLength": 35, + "pattern": "^[ -~]{8,35}$" + }, + "alias_key": { + "type": "string", + "description": "A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference.", + "minLength": 1, + "maxLength": 19, + "pattern": "^[0-9]+$" + } + }, + "required": [ + "consumer_reference" + ] + }, "blik_request": { "type": "object", "title": "BLIK payment object", @@ -5074,7 +5333,15 @@ }, "experience_context": { "description": "Customizes the payer experience during the approval process for the payment.", - "$ref": "#/components/schemas/experience_context_base" + "$ref": "#/components/schemas/blik_experience_context" + }, + "level_0": { + "description": "The level_0 integration flow object.", + "$ref": "#/components/schemas/blik_seamless" + }, + "one_click": { + "description": "The one-click integration flow object.", + "$ref": "#/components/schemas/blik_one_click" } }, "required": [ @@ -5156,6 +5423,10 @@ "experience_context": { "description": "Customizes the payer experience during the approval process for the payment.", "$ref": "#/components/schemas/experience_context_base" + }, + "attributes": { + "description": "Attributes for altpay recurring.", + "$ref": "#/components/schemas/altpay_recurring_attributes_request" } }, "required": [ @@ -5320,7 +5591,8 @@ "maxLength": 2000, "pattern": "^.*$" } - } + }, + "required": [] }, "apple_pay_decrypted_token_data": { "type": "object", @@ -5865,6 +6137,7 @@ } }, "authentication_flow": {}, + "exemption_details": {}, "authentication_response": { "type": "object", "title": "Authentication Response", @@ -5878,6 +6151,10 @@ }, "authentication_flow": { "$ref": "#/components/schemas/authentication_flow" + }, + "exemption_details": { + "description": "Exemption details of 3D Secure Authentication.", + "$ref": "#/components/schemas/exemption_details" } } }, @@ -6214,6 +6491,7 @@ "maxLength": 34, "pattern": "[a-zA-Z0-9]{4}" }, + "altpay_recurring_attributes": {}, "bancontact": { "type": "object", "title": "Bancontact payment object", @@ -6240,6 +6518,24 @@ "maxLength": 4, "pattern": "[0-9]{4}", "description": "The last digits of the card used to fund the Bancontact payment." + }, + "attributes": { + "description": "Attributes for SEPA direct debit object.", + "$ref": "#/components/schemas/altpay_recurring_attributes" + } + } + }, + "blik_one_click_response": { + "type": "object", + "title": "BLIK one-click payment object", + "description": "Information used to pay using BLIK one-click flow.", + "properties": { + "consumer_reference": { + "type": "string", + "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.", + "minLength": 3, + "maxLength": 64, + "pattern": "^[ -~]{3,64}$" } } }, @@ -6259,6 +6555,10 @@ "email": { "description": "The email address of the account holder associated with this payment method.", "$ref": "#/components/schemas/email_address" + }, + "one_click": { + "description": "The one-click integration flow object.", + "$ref": "#/components/schemas/blik_one_click_response" } } }, @@ -6319,6 +6619,10 @@ }, "iban_last_chars": { "$ref": "#/components/schemas/iban_last_chars" + }, + "attributes": { + "description": "Attributes for SEPA direct debit object.", + "$ref": "#/components/schemas/altpay_recurring_attributes" } } }, @@ -6529,6 +6833,7 @@ "NO_INSTRUCTION" ] }, + "tracker_status": {}, "universal_product_code": {}, "tracker_item": { "type": "object", @@ -6580,6 +6885,9 @@ "description": "The tracker id.", "readOnly": true }, + "status": { + "$ref": "#/components/schemas/tracker_status" + }, "items": { "type": "array", "description": "An array of details of items in the shipment.", @@ -9527,6 +9835,40 @@ ] } } + }, + { + "title": "ALIAS_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": [ + "ALIAS_DECLINED_BY_PROCESSOR" + ] + }, + "description": { + "type": "string", + "enum": [ + "The provided alias was declined by the processor. Please create a new order with a different alias_key and/or alias_label and try again." + ] + } + } + }, + { + "title": "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": [ + "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER" + ] + }, + "description": { + "type": "string", + "enum": [ + "Blik's one_click flow requires one_click.auth_code and one_click.alias_label parameters for the buyer's first transaction. For all subsequent transactions,only the one_click.alias_key parameter is required." + ] + } + } } ] } diff --git a/openapi/customer_partner_referrals_v2.json b/openapi/customer_partner_referrals_v2.json index c93c9f3..2fd188f 100644 --- a/openapi/customer_partner_referrals_v2.json +++ b/openapi/customer_partner_referrals_v2.json @@ -2,14 +2,14 @@ "openapi": "3.0.3", "info": { "title": "Partner Referrals", - "description": "The Partner Referrals API enables a marketplace to add PayPal seller accounts. It supports the Connected Path marketplace models.
Important: PayPal for Marketplaces is a limited-release solution at this time. It is available to select partners for approved use cases. For more information, reach out to your PayPal account manager.
In the Connected Path, you host a button on your website that takes sellers to PayPal to create and configure a PayPal account. The Onboarding API enables you to collect seller data and pass it to the account creation and setup forms, reducing the burden on sellers during the signup and setup process. Call the create partner referral and show referral data methods for the Connected Path.", + "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" }, "paths": { "/v2/customer/partner-referrals": { "post": { "summary": "Create partner referral", - "description": "Creates a partner referral that is shared by the API caller. The referrals contains the client's personal, business, financial and operations that the partner wants to onboard the client.", + "description": "Creates a partner referral that is shared by the partner or API caller. The partner referral is used to onboard the seller, and contains the seller's personal, business, financial and operations.", "operationId": "partner-referrals.create", "responses": { "201": { @@ -57,7 +57,7 @@ } }, "403": { - "description": "Authorization failed due to insufficient permissions or missing scopes on the caller Account.", + "description": "Authorization failed due to insufficient permissions or missing scopes on the caller account.", "content": { "application/json": { "schema": { @@ -129,7 +129,7 @@ "/v2/customer/partner-referrals/{partner_referral_id}": { "get": { "summary": "Show referral data", - "description": "Shows details for referral data, by ID, that was shared by the API caller.", + "description": "Shows details by ID for referral data that was shared by the partner or API caller.", "operationId": "partner-referrals.read", "responses": { "200": { @@ -1084,6 +1084,18 @@ "national_number" ] }, + "phone_type": { + "type": "string", + "title": "Phone Type", + "description": "The phone type.", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "PAGER" + ] + }, "phone_number_tag": { "description": "Tag associated with the phone number.", "title": "Phone number tag", @@ -1125,6 +1137,10 @@ "type": "boolean", "description": "Whether this is the primary mobile phone number of the user." }, + "type": { + "$ref": "#/components/schemas/phone_type", + "description": "The type of phone number provided. For example, home, work, or mobile." + }, "tags": { "type": "array", "description": "Array of tags for this phone number.", @@ -2571,7 +2587,8 @@ "WEBSITE_PAYMENT_PRO", "PAYMENT_METHODS", "PPCP", - "ADVANCED_VAULTING" + "ADVANCED_VAULTING", + "IZETTLE" ] }, "capabilities": { diff --git a/openapi/payments_payment_v2.json b/openapi/payments_payment_v2.json index f443759..c76eca5 100644 --- a/openapi/payments_payment_v2.json +++ b/openapi/payments_payment_v2.json @@ -3,7 +3,7 @@ "info": { "title": "Payments", "description": "Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview.", - "version": "2.4" + "version": "2.5" }, "paths": { "/v2/payments/authorizations/{authorization_id}": { diff --git a/openapi/vault_payment_tokens_v3.json b/openapi/vault_payment_tokens_v3.json index da2669f..d0a714f 100644 --- a/openapi/vault_payment_tokens_v3.json +++ b/openapi/vault_payment_tokens_v3.json @@ -2,8 +2,8 @@ "openapi": "3.0.3", "info": { "title": "Payment Method Tokens", - "description": "The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

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

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

The Payment Method Tokens API is available in the US only.", - "version": "3.0" + "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" }, "paths": { "/v3/vault/payment-tokens": { @@ -192,9 +192,6 @@ { "$ref": "#/components/parameters/total_required" }, - { - "$ref": "#/components/parameters/payment_source" - }, { "$ref": "#/components/parameters/content_type" } @@ -549,6 +546,10 @@ { "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": { @@ -574,7 +575,9 @@ "tokenUrl": "/v1/oauth2/token", "scopes": { "https://uri.paypal.com/services/vault/payment-tokens/readwrite": "Manage payment instruments", - "https://uri.paypal.com/services/vault/payment-tokens/read": "Permission to only read from vault" + "https://uri.paypal.com/services/vault/payment-tokens/read": "Permission to only read from vault", + "https://uri.paypal.com/services/vault/customers/read": "Permission to read customer information.", + "https://uri.paypal.com/services/vault/customers/readwrite": "Permission to create/update customer information." } } } @@ -585,7 +588,7 @@ "name": "Content-Type", "description": "Specifies the request format.", "in": "header", - "required": true, + "required": false, "schema": { "type": "string", "minLength": 1, @@ -607,7 +610,7 @@ "name": "customer_id", "description": "A unique identifier representing a specific customer in merchant's/partner's system or records.", "in": "query", - "required": false, + "required": true, "schema": { "type": "string", "minLength": 7, @@ -647,18 +650,6 @@ "default": false } }, - "payment_source": { - "name": "payment_source", - "description": "Filters the records for a specific payment token source.", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 1024, - "pattern": "^[a-zA-Z-]+$" - } - }, "id": { "name": "id", "description": "A representation of a vault token.", @@ -1059,7 +1050,7 @@ }, "merchant_partner_customer_id": { "type": "string", - "description": "The unique ID for a customer in merchant's or partner's system of records.", + "description": "The unique ID for a customer generated by PayPal.", "minLength": 1, "maxLength": 22, "pattern": "^[0-9a-zA-Z_-]+$" @@ -1078,108 +1069,10 @@ "vault_id": { "type": "string", "description": "The PayPal-generated ID for the vault token.", - "minLength": 7, + "minLength": 1, "maxLength": 36, "pattern": "^[0-9a-zA-Z_-]+$" }, - "country_code": { - "type": "string", - "description": "The [two-character ISO 3166-1 code](/api/rest/reference/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_portable": { - "type": "object", - "title": "Portable Postal Address (Medium-Grained)", - "description": "The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", - "properties": { - "address_line_1": { - "type": "string", - "description": "The first line of the address. For example, number or street. For example, `173 Drury Lane`. Required for data entry and compliance and risk checks. Must contain the full address.", - "maxLength": 300 - }, - "address_line_2": { - "type": "string", - "description": "The second line of the address. For example, suite or apartment number.", - "maxLength": 300 - }, - "address_line_3": { - "type": "string", - "description": "The third line of the address, if needed. For example, a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address.", - "maxLength": 100 - }, - "admin_area_4": { - "type": "string", - "description": "The neighborhood, ward, or district. Smaller than `admin_area_level_3` or `sub_locality`. Value is:", - "maxLength": 100 - }, - "admin_area_3": { - "type": "string", - "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `admin_area_level_2`. Value is:", - "maxLength": 100 - }, - "admin_area_2": { - "type": "string", - "description": "A city, town, or village. Smaller than `admin_area_level_1`.", - "maxLength": 120 - }, - "admin_area_1": { - "type": "string", - "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:", - "maxLength": 300 - }, - "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).", - "maxLength": 60 - }, - "country_code": { - "$ref": "#/components/schemas/country_code" - }, - "address_details": { - "type": "object", - "title": "Address Details", - "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.
For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type`.", - "properties": { - "street_number": { - "type": "string", - "description": "The street number.", - "maxLength": 100 - }, - "street_name": { - "type": "string", - "description": "The street name. Just `Drury` in `Drury Lane`.", - "maxLength": 100 - }, - "street_type": { - "type": "string", - "description": "The street type. For example, avenue, boulevard, road, or expressway.", - "maxLength": 100 - }, - "delivery_service": { - "type": "string", - "description": "The delivery service. Post office box, bag number, or post office name.", - "maxLength": 100 - }, - "building_name": { - "type": "string", - "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", - "maxLength": 100 - }, - "sub_building": { - "type": "string", - "description": "The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", - "maxLength": 100 - } - } - } - }, - "required": [ - "country_code" - ] - }, "card_brand": { "type": "string", "title": "Card Brand", @@ -1206,119 +1099,6 @@ "CHINA_UNION_PAY" ] }, - "liability_shift": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9A-Z_]+$", - "description": "Liability shift indicator. The outcome of the issuer's authentication.", - "enum": [ - "YES", - "NO", - "POSSIBLE", - "UNKNOWN" - ] - }, - "pares_status": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9A-Z_]+$", - "description": "Transactions status result identifier. The outcome of the issuer's authentication.", - "enum": [ - "Y", - "N", - "U", - "A", - "C", - "R", - "D", - "I" - ] - }, - "enrolled": { - "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9A-Z_]+$", - "description": "Status of Authentication eligibility.", - "enum": [ - "Y", - "N", - "U", - "B" - ] - }, - "three_d_secure_authentication_response": { - "type": "object", - "title": "The 3D Secure Authentication Response", - "description": "Results of 3D Secure Authentication.", - "properties": { - "authentication_status": { - "description": "The outcome of the issuer's authentication.", - "$ref": "#/components/schemas/pares_status" - }, - "enrollment_status": { - "description": "Status of authentication eligibility.", - "$ref": "#/components/schemas/enrolled" - } - } - }, - "authentication_response": { - "type": "object", - "title": "Authentication Response", - "description": "Results of Authentication such as 3D Secure.", - "properties": { - "liability_shift": { - "$ref": "#/components/schemas/liability_shift" - }, - "three_d_secure": { - "$ref": "#/components/schemas/three_d_secure_authentication_response" - } - } - }, - "card_response": { - "type": "object", - "title": "Card Response", - "description": "The payment card to use to fund a payment. Card can be a credit or debit card.", - "properties": { - "name": { - "type": "string", - "description": "The card holder's name as it appears on the card.", - "minLength": 2, - "maxLength": 300 - }, - "billing_address": { - "$ref": "#/components/schemas/address_portable", - "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties." - }, - "last_digits": { - "type": "string", - "description": "The last digits of the payment card.", - "pattern": "[0-9]{2,}", - "readOnly": true - }, - "brand": { - "description": "The card brand or network. Typically used in the response.", - "readOnly": true, - "$ref": "#/components/schemas/card_brand" - }, - "type": { - "type": "string", - "description": "The payment card type.", - "readOnly": true, - "enum": [ - "CREDIT", - "DEBIT", - "PREPAID", - "UNKNOWN" - ] - }, - "authentication_result": { - "$ref": "#/components/schemas/authentication_response" - } - } - }, "date_year_month": { "type": "string", "description": "The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).", @@ -1326,6 +1106,7 @@ "maxLength": 7, "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$" }, + "address_entity": {}, "card_verification_status": { "title": "Card Verification Status", "type": "string", @@ -1602,7 +1383,7 @@ "type": "string", "minLength": 1, "maxLength": 1024, - "pattern": "^[0-9]+$" + "pattern": "^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$" }, "time": { "description": "The date and time when the instrument was verified.", @@ -1622,34 +1403,47 @@ } } }, - "card_response-2": { + "card_response": { "type": "object", "title": "Card Response", "description": "Full representation of a Card Payment Token.", - "allOf": [ - { - "$ref": "#/components/schemas/card_response" + "properties": { + "name": { + "type": "string", + "description": "The card holder's name as it appears on the card.", + "minLength": 2, + "maxLength": 300, + "pattern": "^[A-Za-z ]+$" }, - { - "properties": { - "expiry": { - "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_year_month" - }, - "billing_address": { - "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", - "$ref": "#/components/schemas/address_portable" - }, - "verification_status": { - "description": "Card Verification status.", - "$ref": "#/components/schemas/card_verification_status" - }, - "verification": { - "$ref": "#/components/schemas/card_verification_details" - } - } + "last_digits": { + "type": "string", + "description": "The last digits of the payment card.", + "pattern": "[0-9]{2,}", + "minLength": 2, + "maxLength": 4, + "readOnly": true + }, + "brand": { + "description": "The card brand or network. Typically used in the response.", + "readOnly": true, + "$ref": "#/components/schemas/card_brand" + }, + "expiry": { + "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_year_month" + }, + "billing_address": { + "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", + "$ref": "#/components/schemas/address_entity" + }, + "verification_status": { + "description": "Card Verification status.", + "$ref": "#/components/schemas/card_verification_status" + }, + "verification": { + "$ref": "#/components/schemas/card_verification_details" } - ] + } }, "name": { "type": "object", @@ -1693,28 +1487,126 @@ } } }, - "shipping_detail": { + "country_code": { + "type": "string", + "description": "The [two-character ISO 3166-1 code](/api/rest/reference/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_portable": { "type": "object", - "description": "The shipping details.", - "title": "Shipping Details", + "title": "Portable Postal Address (Medium-Grained)", + "description": "The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", "properties": { - "name": { - "description": "The name of the person to whom to ship the items. Supports only the `full_name` property.", - "$ref": "#/components/schemas/name" - }, - "type": { - "description": "The method by which the payer wants to get their items from the payee e.g shipping, in-person pickup. Either type or options but not both may be present.", + "address_line_1": { "type": "string", - "minLength": 1, - "maxLength": 255, - "pattern": "^[0-9A-Z_]+$", - "enum": [ - "SHIPPING", - "PICKUP_IN_PERSON" - ] + "description": "The first line of the address. For example, number or street. For example, `173 Drury Lane`. Required for data entry and compliance and risk checks. Must contain the full address.", + "maxLength": 300 }, - "address": { - "description": "The address of the person to whom to ship the items. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", + "address_line_2": { + "type": "string", + "description": "The second line of the address. For example, suite or apartment number.", + "maxLength": 300 + }, + "address_line_3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address.", + "maxLength": 100 + }, + "admin_area_4": { + "type": "string", + "description": "The neighborhood, ward, or district. Smaller than `admin_area_level_3` or `sub_locality`. Value is:", + "maxLength": 100 + }, + "admin_area_3": { + "type": "string", + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `admin_area_level_2`. Value is:", + "maxLength": 100 + }, + "admin_area_2": { + "type": "string", + "description": "A city, town, or village. Smaller than `admin_area_level_1`.", + "maxLength": 120 + }, + "admin_area_1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:", + "maxLength": 300 + }, + "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).", + "maxLength": 60 + }, + "country_code": { + "$ref": "#/components/schemas/country_code" + }, + "address_details": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.
For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type`.", + "properties": { + "street_number": { + "type": "string", + "description": "The street number.", + "maxLength": 100 + }, + "street_name": { + "type": "string", + "description": "The street name. Just `Drury` in `Drury Lane`.", + "maxLength": 100 + }, + "street_type": { + "type": "string", + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "maxLength": 100 + }, + "delivery_service": { + "type": "string", + "description": "The delivery service. Post office box, bag number, or post office name.", + "maxLength": 100 + }, + "building_name": { + "type": "string", + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "maxLength": 100 + }, + "sub_building": { + "type": "string", + "description": "The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "maxLength": 100 + } + } + } + }, + "required": [ + "country_code" + ] + }, + "shipping_detail": { + "type": "object", + "description": "The shipping details.", + "title": "Shipping Details", + "properties": { + "name": { + "description": "The name of the person to whom to ship the items. Supports only the `full_name` property.", + "$ref": "#/components/schemas/name" + }, + "type": { + "description": "The method by which the payer wants to get their items from the payee e.g shipping, in-person pickup. Either type or options but not both may be present.", + "type": "string", + "minLength": 1, + "maxLength": 255, + "pattern": "^[0-9A-Z_]+$", + "enum": [ + "SHIPPING", + "PICKUP_IN_PERSON" + ] + }, + "address": { + "description": "The address of the person to whom to ship the items. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", "$ref": "#/components/schemas/address_portable" } } @@ -1761,6 +1653,7 @@ "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": "merchant_common_email_address_v2", "maxLength": 254, + "minLength": 3, "pattern": "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])" }, "account_id": { @@ -1866,13 +1759,15 @@ "type": "string", "description": "The customer's tax ID value.", "minLength": 1, - "maxLength": 14 + "maxLength": 14, + "pattern": "([a-zA-Z0-9])" }, "tax_id_type": { "type": "string", "description": "The customer's tax ID type.", "minLength": 1, "maxLength": 14, + "pattern": "^[A-Z0-9_]+$", "enum": [ "BR_CPF", "BR_CNPJ" @@ -1972,6 +1867,149 @@ } ] }, + "instrument_id": { + "type": "string", + "description": "The identifier of the instrument.", + "minLength": 1, + "maxLength": 256, + "pattern": "^[A-Za-z0-9-_.+=]+$" + }, + "card_type": { + "type": "string", + "title": "Card Type", + "description": "Type of card. i.e Credit, Debit and so on.", + "minLength": 1, + "maxLength": 255, + "pattern": "^[A-Z_]+$", + "enum": [ + "CREDIT", + "DEBIT", + "PREPAID", + "STORE", + "UNKNOWN" + ] + }, + "card": { + "type": "object", + "title": "Card", + "description": "The payment card to use to fund a payment. Can be a credit or debit card.", + "properties": { + "id": { + "description": "The PayPal-generated ID for the card.", + "readOnly": true, + "$ref": "#/components/schemas/instrument_id" + }, + "name": { + "type": "string", + "description": "The card holder's name as it appears on the card.", + "maxLength": 300, + "minLength": 1, + "pattern": "^.{1,300}$" + }, + "number": { + "type": "string", + "description": "The primary account number (PAN) for the payment card.", + "pattern": "^[0-9]{13,19}$", + "minLength": 13, + "maxLength": 19 + }, + "expiry": { + "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).", + "$ref": "#/components/schemas/date_year_month" + }, + "security_code": { + "type": "string", + "description": "The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.", + "pattern": "^[0-9]{3,4}$", + "minLength": 3, + "maxLength": 4 + }, + "last_digits": { + "type": "string", + "description": "The last digits of the payment card.", + "pattern": "^[0-9]{2,4}$", + "minLength": 2, + "maxLength": 4, + "readOnly": true + }, + "card_type": { + "description": "The card brand or network. Typically used in the response.", + "readOnly": true, + "$ref": "#/components/schemas/card_brand", + "deprecated": true + }, + "type": { + "description": "The payment card type.", + "$ref": "#/components/schemas/card_type" + }, + "brand": { + "description": "The card brand or network. Typically used in the response.", + "$ref": "#/components/schemas/card_brand" + }, + "billing_address": { + "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", + "$ref": "#/components/schemas/address_portable" + } + } + }, + "apple_pay_card": { + "type": "object", + "title": "Apple Pay Card", + "description": "The payment card to be used to fund a payment. Can be a credit or debit card.", + "allOf": [ + { + "$ref": "#/components/schemas/card" + } + ] + }, + "apple_pay_payment_token_response": { + "type": "object", + "title": "Apple Pay Response", + "description": "A resource representing a response for Apple Pay.", + "properties": { + "card": { + "description": "Card data for the card linked to the apple pay token.", + "$ref": "#/components/schemas/apple_pay_card" + } + } + }, + "ach_debit_response": {}, + "ach_debit_verification_status": { + "description": "The ach debit verification status.", + "type": "string", + "default": "NOT_VERIFIED", + "minLength": 1, + "maxLength": 255, + "enum": [] + }, + "ach_debit_response-2": { + "title": "ACH Debit Response", + "description": "A Resource representing a response of vaulted a ACH Debit Account.", + "allOf": [ + { + "$ref": "#/components/schemas/ach_debit_response" + }, + { + "properties": { + "verification_status": { + "description": "ACH Debit Verification Status", + "$ref": "#/components/schemas/ach_debit_verification_status" + } + } + } + ] + }, + "bank_response": { + "title": "Bank Response", + "description": "Full representation of a Bank Payment Token.", + "type": "object", + "properties": { + "ach_debit": { + "description": "ACH Debit Response.", + "$ref": "#/components/schemas/ach_debit_response-2" + } + } + }, "link_description": { "type": "object", "title": "Link Description", @@ -2023,13 +2061,19 @@ "type": "object", "properties": { "card": { - "$ref": "#/components/schemas/card_response-2" + "$ref": "#/components/schemas/card_response" }, "paypal": { "$ref": "#/components/schemas/paypal_wallet_response" }, "venmo": { "$ref": "#/components/schemas/venmo_response" + }, + "apple_pay": { + "$ref": "#/components/schemas/apple_pay_payment_token_response" + }, + "bank": { + "$ref": "#/components/schemas/bank_response" } } }, @@ -2130,88 +2174,6 @@ "debug_id" ] }, - "instrument_id": { - "type": "string", - "description": "The identifier of the instrument.", - "minLength": 1, - "maxLength": 256, - "pattern": "^[A-Za-z0-9-_.+=]+$" - }, - "card_type": { - "type": "string", - "title": "Card Type", - "description": "Type of card. i.e Credit, Debit and so on.", - "minLength": 1, - "maxLength": 255, - "pattern": "^[A-Z_]+$", - "enum": [ - "CREDIT", - "DEBIT", - "PREPAID", - "STORE", - "UNKNOWN" - ] - }, - "card": { - "type": "object", - "title": "Card", - "description": "The payment card to use to fund a payment. Can be a credit or debit card.", - "properties": { - "id": { - "description": "The PayPal-generated ID for the card.", - "readOnly": true, - "$ref": "#/components/schemas/instrument_id" - }, - "name": { - "type": "string", - "description": "The card holder's name as it appears on the card.", - "maxLength": 300 - }, - "number": { - "type": "string", - "description": "The primary account number (PAN) for the payment card.", - "pattern": "^[0-9]{13,19}$", - "minLength": 13, - "maxLength": 19 - }, - "expiry": { - "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).", - "$ref": "#/components/schemas/date_year_month" - }, - "security_code": { - "type": "string", - "description": "The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.", - "pattern": "^[0-9]{3,4}$", - "minLength": 3, - "maxLength": 4 - }, - "last_digits": { - "type": "string", - "description": "The last digits of the payment card.", - "pattern": "^[0-9]{2,}$", - "minLength": 2, - "readOnly": true - }, - "card_type": { - "description": "The card brand or network. Typically used in the response.", - "readOnly": true, - "$ref": "#/components/schemas/card_brand", - "deprecated": true - }, - "type": { - "description": "The payment card type.", - "$ref": "#/components/schemas/card_type" - }, - "brand": { - "description": "The card brand or network. Typically used in the response.", - "$ref": "#/components/schemas/card_brand" - }, - "billing_address": { - "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.", - "$ref": "#/components/schemas/address_portable" - } - } - }, "card_verification_method": { "title": "Card Verification Method", "type": "string", @@ -2244,10 +2206,10 @@ "properties": { "brand_name": { "type": "string", - "description": "The label that overrides the business name in the PayPal account on the PayPal site.", + "description": "The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.", "minLength": 1, "maxLength": 300, - "pattern": "^[a-zA-Z0-9_'\\-., :;\\!?\"]*$" + "pattern": "^.*$" }, "locale": { "description": "The BCP 47-formatted locale of pages that the PayPal vaulting experience shows. PayPal supports a five-character code. For example, `DA-DK`, `HE-IL`, `ID-ID`, `JA-JP`, `NO-NO`, `PT-BR`, `RU-RU`, `SV-SE`, `TH-TH`, `ZH-CN`, `ZH-HK`, or `ZH-TW`.", @@ -2256,11 +2218,15 @@ "return_url": { "type": "string", "format": "uri", + "minLength": 1, + "maxLength": 4000, "description": "The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS." }, "cancel_url": { "type": "string", "format": "uri", + "minLength": 1, + "maxLength": 4000, "description": "The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS." }, "shipping_preference": { @@ -2297,16 +2263,18 @@ } ] }, - "token": { + "token_attributes": {}, + "token_id_request": { "type": "object", - "title": "Token", - "description": "The tokenized payment source to fund a payment.", + "title": "Token Request", + "description": "The Tokenized Payment Source representing a Request to Vault a Token.", "properties": { "id": { "type": "string", "description": "The PayPal-generated ID for the token.", "minLength": 1, - "maxLength": 255 + "maxLength": 255, + "pattern": "^[0-9A-Z_-]+$" }, "type": { "type": "string", @@ -2317,36 +2285,18 @@ "enum": [ "BILLING_AGREEMENT" ] - } - }, - "required": [ - "id", - "type" - ] - }, - "token_attributes": {}, - "token_id_request": { - "type": "object", - "title": "Token Request", - "description": "The Tokenized Payment Source representing a Request to Vault a Token.", - "allOf": [ - { - "$ref": "#/components/schemas/token" }, - { - "properties": { - "attributes": { - "description": "The auxiliary details of the token.", - "$ref": "#/components/schemas/token_attributes" - } - } + "attributes": { + "description": "The auxiliary details of the token.", + "$ref": "#/components/schemas/token_attributes" } - ], + }, "required": [ "id", "type" ] }, + "metadata": {}, "payment_token_request": { "title": "Payment Token Request", "description": "Payment Token Request where the `source` defines the type of instrument to be stored.", @@ -2357,6 +2307,7 @@ "$ref": "#/components/schemas/customer" }, "payment_source": { + "title": "Payment source request", "description": "The payment method to vault with the instrument details.", "type": "object", "properties": { @@ -2367,6 +2318,9 @@ "$ref": "#/components/schemas/token_id_request" } } + }, + "metadata": { + "$ref": "#/components/schemas/metadata" } }, "required": [ @@ -2432,12 +2386,21 @@ "$ref": "#/components/schemas/token_id_request" } } + }, + "metadata": { + "$ref": "#/components/schemas/metadata" } }, "required": [ "payment_source" ] }, + "ordinal": { + "type": "integer", + "description": "Ordinal number for sorting.", + "minimum": 1, + "maximum": 99 + }, "payment_token_status": { "title": "Payment Token Status", "type": "string", @@ -2456,6 +2419,10 @@ "description": "The PayPal-generated ID for the vault token.", "$ref": "#/components/schemas/vault_id" }, + "ordinal": { + "description": "The ordinal number of customers' payment source for sorting.", + "$ref": "#/components/schemas/ordinal" + }, "customer": { "description": "Customer in merchant's or partner's system of records.", "$ref": "#/components/schemas/customer" @@ -2468,7 +2435,7 @@ "description": "The setup payment method details.", "properties": { "card": { - "$ref": "#/components/schemas/card_response-2" + "$ref": "#/components/schemas/card_response" }, "paypal": { "$ref": "#/components/schemas/paypal_wallet_response"