{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-order-update-callback-request-schema.json",
  "title": "OrderUpdateCallbackRequest",
  "description": "Shipping Options Callback request. This will be implemented by the merchants.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-externalcallback-api-openapi.yml#/components/schemas/order_update_callback_request",
  "type": "object",
  "required": [
    "purchase_units"
  ],
  "properties": {
    "id": {
      "description": "The ID of the order.",
      "type": "string",
      "minLength": 1,
      "maxLength": 36,
      "pattern": "^[A-Z0-9-]+$",
      "readOnly": true
    },
    "shipping_address": {
      "allOf": [
        {
          "$ref": "#/$defs/address_portable"
        },
        {
          "description": "Redacted shipping address to be used for shipping options and tax calculations.",
          "not": {
            "anyOf": [
              {
                "required": [
                  "address_line_1"
                ]
              },
              {
                "required": [
                  "address_line_2"
                ]
              },
              {
                "required": [
                  "address_line_3"
                ]
              },
              {
                "required": [
                  "admin_area_3"
                ]
              },
              {
                "required": [
                  "admin_area_4"
                ]
              },
              {
                "required": [
                  "address_details"
                ]
              }
            ]
          }
        }
      ]
    },
    "shipping_option": {
      "allOf": [
        {
          "$ref": "#/$defs/shipping_option"
        },
        {
          "description": "Buyer selected shipping option.",
          "not": {
            "required": [
              "selected"
            ]
          }
        }
      ]
    },
    "purchase_units": {
      "description": "An array of purchase units. At present only 1 purchase_unit is supported. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.",
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/purchase_unit_request"
          },
          {
            "title": "purchase_unit"
          }
        ]
      }
    }
  },
  "$defs": {
    "account_id": {
      "title": "PayPal Account Identifier",
      "description": "The account identifier for a PayPal account.",
      "type": "string",
      "minLength": 13,
      "maxLength": 13,
      "pattern": "^[2-9A-HJ-NP-Z]{13}$"
    },
    "address_portable": {
      "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).",
      "type": "object",
      "required": [
        "country_code"
      ],
      "properties": {
        "address_line_1": {
          "description": "The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.",
          "type": "string",
          "minLength": 0,
          "maxLength": 300,
          "pattern": "^[\\S\\s]*$"
        },
        "address_line_2": {
          "description": "The second line of the address, for example, a suite or apartment number.",
          "type": "string",
          "minLength": 0,
          "maxLength": 300,
          "pattern": "^[\\S\\s]*$"
        },
        "address_line_3": {
          "description": "The third line of the address, if needed. Examples include a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address.",
          "type": "string",
          "minLength": 0,
          "maxLength": 100,
          "pattern": "^[\\S\\s]*$"
        },
        "admin_area_4": {
          "description": "The neighborhood, ward, or district. This is smaller than `admin_area_level_3` or `sub_locality`. Value is:<ul><li>The postal sorting code that is used in Guernsey and many French territories, such as French Guiana.</li><li>The fine-grained administrative levels in China.</li></ul>",
          "type": "string",
          "minLength": 0,
          "maxLength": 100,
          "pattern": "^[\\S\\s]*$"
        },
        "admin_area_3": {
          "description": "The sub-locality, suburb, neighborhood, or district. This is smaller than `admin_area_level_2`. Value is:<ul><li>Brazil. Suburb, *bairro*, or neighborhood.</li><li>India. Sub-locality or district. Street name information isn't always available, but a sub-locality or district can be a very small area.</li></ul>",
          "type": "string",
          "minLength": 0,
          "maxLength": 100,
          "pattern": "^[\\S\\s]*$"
        },
        "admin_area_2": {
          "description": "A city, town, or village. Smaller than `admin_area_level_1`.",
          "type": "string",
          "minLength": 0,
          "maxLength": 120,
          "pattern": "^[\\S\\s]*$"
        },
        "admin_area_1": {
          "description": "The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.</li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>",
          "type": "string",
          "minLength": 0,
          "maxLength": 300,
          "pattern": "^[\\S\\s]*$"
        },
        "postal_code": {
          "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).",
          "type": "string",
          "minLength": 0,
          "maxLength": 60,
          "pattern": "^[\\S\\s]*$"
        },
        "country_code": {
          "$ref": "#/$defs/country_code"
        },
        "address_details": {
          "title": "Address Details",
          "description": "The non-portable additional address details include fine-grain address information for Compliance, Risk, and other scenarios. This isn't portable with common third-party and open source applications. This can include data that is 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`.",
          "type": "object",
          "properties": {
            "street_number": {
              "description": "The street number.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            },
            "street_name": {
              "description": "The street name. Just `Drury` in `Drury Lane`.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            },
            "street_type": {
              "description": "The street type. For example, avenue, boulevard, road, or expressway.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            },
            "delivery_service": {
              "description": "The delivery service. Post office box, bag number, or post office name.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            },
            "building_name": {
              "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, <code>Craven House</code>.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            },
            "sub_building": {
              "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.",
              "type": "string",
              "minLength": 0,
              "maxLength": 100,
              "pattern": "^[\\S\\s]*$"
            }
          }
        }
      }
    },
    "amount_breakdown": {
      "title": "amount_breakdown",
      "description": "The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.",
      "type": "object",
      "properties": {
        "item_total": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The subtotal for all items. Required if the request includes `purchase_units[].items[].unit_amount`. Must equal the sum of `(items[].unit_amount * items[].quantity)` for all items. <code>item_total.value</code> can not be a negative number."
            }
          ]
        },
        "shipping": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The shipping fee for all items within a given `purchase_unit`. <code>shipping.value</code> can not be a negative number."
            }
          ]
        },
        "handling": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The handling fee for all items within a given `purchase_unit`. <code>handling.value</code> can not be a negative number."
            }
          ]
        },
        "tax_total": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The total tax for all items. Required if the request includes `purchase_units.items.tax`. Must equal the sum of `(items[].tax * items[].quantity)` for all items. <code>tax_total.value</code> can not be a negative number."
            }
          ]
        },
        "insurance": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The insurance fee for all items within a given `purchase_unit`. <code>insurance.value</code> can not be a negative number."
            }
          ]
        },
        "shipping_discount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The shipping discount for all items within a given `purchase_unit`. <code>shipping_discount.value</code> can not be a negative number."
            }
          ]
        },
        "discount": {
          "allOf": [
            {
              "$ref": "#/$defs/discount_with_breakdown"
            },
            {
              "description": "The discount for all items within a given `purchase_unit`. <code>discount.value</code> can not be a negative number."
            }
          ]
        }
      }
    },
    "amount_with_breakdown": {
      "title": "amount_with_breakdown",
      "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.<br/>The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs <a href=\"/docs/integration/direct/rest/currency-codes/\">Currency Codes</a>.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/money"
        },
        {
          "type": "object",
          "properties": {
            "breakdown": {
              "$ref": "#/$defs/amount_breakdown"
            }
          }
        }
      ]
    },
    "billing_cycle": {
      "title": "billing_cycle",
      "description": "The billing cycle providing details of the billing frequency, amount, duration and if the billing cycle is a free, discounted or regular billing cycle. The sequence of the billing cycle will be in the following order - free trial billing cycle(s), discounted trial billing cycle(s), regular billing cycle(s).",
      "type": "object",
      "required": [
        "tenure_type"
      ],
      "properties": {
        "tenure_type": {
          "description": "The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted) or regular billing cycle.",
          "type": "string",
          "enum": [
            "REGULAR",
            "TRIAL"
          ],
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "REGULAR"
              ],
              "description": "A regular billing cycle to identify recurring charges for the billing agreement."
            },
            {
              "type": "string",
              "enum": [
                "TRIAL"
              ],
              "description": "A trial billing cycle to identify free or discounted charge for the billing agreement. Free trails will not have a price object in pricing scheme where as a discounted trial would have a discounted price compared to regular billing cycle."
            }
          ]
        },
        "pricing_scheme": {
          "allOf": [
            {
              "$ref": "#/$defs/pricing_scheme"
            },
            {
              "description": "The active pricing scheme for this billing cycle. A free trial billing cycle does not require a pricing scheme."
            }
          ]
        },
        "total_cycles": {
          "description": "The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between <code>1</code> and <code>999</code> for <code>total_cycles</code>). Regular billing cycles can be executed infinite times (value of <code>0</code> for <code>total_cycles</code>) or a finite number of times (value between <code>1</code> and <code>999</code> for <code>total_cycles</code>).",
          "type": "integer",
          "minimum": 0,
          "maximum": 999,
          "default": 1
        },
        "sequence": {
          "description": "The order in which this cycle is to run among other billing cycles. For example, a trial billing cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial cycle runs before the regular cycle.",
          "type": "integer",
          "minimum": 1,
          "maximum": 3,
          "default": 1
        },
        "start_date": {
          "allOf": [
            {
              "$ref": "#/$defs/date_no_time"
            },
            {
              "description": "The start date for the billing cycle, in YYYY-MM-DD. This field should be not be provided if the billing cycle starts at the time of checkout. When this field is not provided, the billing cycle amount will be included in any data validations confirming that the total provided by the merchant match the sum of individual items due at the time of checkout. Only one billing cycle (with sequence equal to 1) can have a no start date."
            }
          ]
        }
      }
    },
    "card_supplementary_data": {
      "title": "card_supplementary_data",
      "description": "Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>.",
      "type": "object",
      "properties": {
        "level_2": {
          "$ref": "#/$defs/level_2_card_processing_data"
        },
        "level_3": {
          "$ref": "#/$defs/level_3_card_processing_data"
        }
      }
    },
    "country_code": {
      "description": "The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and not <code>UK</code> 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.</blockquote>",
      "type": "string",
      "minLength": 2,
      "maxLength": 2,
      "pattern": "^([A-Z]{2}|C2)$"
    },
    "currency_code": {
      "description": "The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.",
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "pattern": "^[\\S\\s]*$"
    },
    "date_no_time": {
      "description": "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.",
      "type": "string",
      "minLength": 10,
      "maxLength": 10,
      "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"
    },
    "disbursement_mode": {
      "title": "disbursement_mode",
      "description": "The funds that are held on behalf of the merchant.",
      "type": "string",
      "enum": [
        "INSTANT",
        "DELAYED"
      ],
      "default": "INSTANT",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "INSTANT"
          ],
          "description": "The funds are released to the merchant immediately."
        },
        {
          "type": "string",
          "enum": [
            "DELAYED"
          ],
          "description": "The funds are held for a finite number of days. The actual duration depends on the region and type of integration. You can release the funds through a referenced payout. Otherwise, the funds disbursed automatically after the specified duration."
        }
      ]
    },
    "discount_with_breakdown": {
      "title": "discount_with_breakdown",
      "description": "The discount amount and currency code. For list of supported currencies and decimal precision, see the PayPal REST APIs <a href=\"/docs/integration/direct/rest/currency-codes/\">Currency Codes</a>.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/money"
        },
        {
          "type": "object"
        }
      ]
    },
    "email": {
      "title": "email",
      "description": "The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>",
      "type": "string",
      "minLength": 3,
      "maxLength": 254,
      "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])+)\\]).*$"
    },
    "email_address": {
      "description": "The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>",
      "type": "string",
      "minLength": 3,
      "maxLength": 254,
      "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])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-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])+)\\])$"
    },
    "ip_address": {
      "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.",
      "type": "string",
      "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*$"
    },
    "item_request": {
      "title": "item_request",
      "description": "The details for the items to be purchased.",
      "type": "object",
      "required": [
        "name",
        "quantity",
        "unit_amount"
      ],
      "properties": {
        "name": {
          "description": "The item name or title. <blockquote>This field supports up to 3000 characters, but <strong>any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response</strong> representation of this field</blockquote>.",
          "type": "string",
          "minLength": 1,
          "maxLength": 3000,
          "pattern": "^[\\S\\s]*$"
        },
        "unit_amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The item price or rate per unit. If you specify <code>unit_amount</code>, <code>purchase_units[].amount.breakdown.item_total</code> is required. Must equal <code>unit_amount * quantity</code> for all items. <code>unit_amount.value</code> can not be a negative number."
            }
          ]
        },
        "tax": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The item tax for each unit. If <code>tax</code> is specified, <code>purchase_units[].amount.breakdown.tax_total</code> is required. Must equal <code>tax * quantity</code> for all items. <code>tax.value</code> can not be a negative number."
            }
          ]
        },
        "quantity": {
          "description": "The item quantity. Must be a whole number.",
          "type": "string",
          "minLength": 0,
          "maxLength": 10,
          "pattern": "^[1-9][0-9]{0,9}$"
        },
        "description": {
          "description": "<blockquote>This field supports up to 4000 characters, but <strong>any content beyond 2048 characters (including spaces) will be truncated. The 2048 character limit is reflected in the response</strong> representation of this field</blockquote>.",
          "type": "string",
          "minLength": 0,
          "maxLength": 4000,
          "pattern": "^[\\S\\s]*$"
        },
        "sku": {
          "description": "The stock keeping unit (SKU) for the item.",
          "type": "string",
          "minLength": 0,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "url": {
          "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "format": "uri"
        },
        "category": {
          "description": "The item category type.",
          "type": "string",
          "enum": [
            "DIGITAL_GOODS",
            "PHYSICAL_GOODS",
            "DONATION"
          ],
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "DIGITAL_GOODS"
              ],
              "description": "Goods that are stored, delivered, and used in their electronic format. This value is not currently supported for API callers that leverage the <a href=\"https://www.paypal.com/us/webapps/mpp/commerce-platform\">PayPal for Commerce Platform</a> product."
            },
            {
              "type": "string",
              "enum": [
                "PHYSICAL_GOODS"
              ],
              "description": "A tangible item that can be shipped with proof of delivery."
            },
            {
              "type": "string",
              "enum": [
                "DONATION"
              ],
              "description": "A contribution or gift for which no good or service is exchanged, usually to a not for profit organization."
            }
          ]
        },
        "image_url": {
          "description": "The URL of the item's image. Supported image formats: JPEG (.jpg, .jpeg), PNG (.png), GIF (.gif).",
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "format": "uri"
        },
        "upc": {
          "allOf": [
            {
              "$ref": "#/$defs/universal_product_code"
            },
            {
              "description": "The Universal Product Code of the item."
            }
          ]
        },
        "billing_plan": {
          "$ref": "#/$defs/order_billing_plan"
        }
      }
    },
    "item_without_category_tax_or_amount": {
      "title": "item",
      "description": "The details for the items to be purchased.",
      "type": "object",
      "required": [
        "name",
        "quantity"
      ],
      "properties": {
        "name": {
          "description": "The item name or title.",
          "type": "string",
          "minLength": 1,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "quantity": {
          "description": "The item quantity. Must be a whole number.",
          "type": "string",
          "minLength": 0,
          "maxLength": 10,
          "pattern": "^[1-9][0-9]{0,9}$"
        },
        "description": {
          "description": "The detailed item description.",
          "type": "string",
          "minLength": 0,
          "maxLength": 2048,
          "pattern": "^[\\S\\s]*$"
        },
        "sku": {
          "description": "The stock keeping unit (SKU) for the item.",
          "type": "string",
          "minLength": 0,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "url": {
          "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "format": "uri"
        },
        "image_url": {
          "description": "The URL of the item's image. Supported image formats: JPEG (.jpg, .jpeg), PNG (.png), GIF (.gif).",
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "format": "uri"
        },
        "upc": {
          "allOf": [
            {
              "$ref": "#/$defs/universal_product_code"
            },
            {
              "description": "The Universal Product Code of the item."
            }
          ]
        },
        "billing_plan": {
          "$ref": "#/$defs/order_billing_plan"
        }
      }
    },
    "level_2_card_processing_data": {
      "title": "level_2",
      "description": "The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business.",
      "type": "object",
      "properties": {
        "invoice_id": {
          "description": "Use this field to pass a purchase identification value of up to 127 ASCII characters. The length of this field will be adjusted to meet network specifications (25chars for Visa and Mastercard, 17chars for Amex), and the original invoice ID will still be displayed in your existing reports.",
          "type": "string",
          "minLength": 1,
          "maxLength": 127,
          "pattern": "^[\\w‘\\-.,\":;\\!?]*$"
        },
        "tax_total": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "Use this field to break down the amount of tax included in the total purchase amount. The value provided here will not add to the total purchase amount. The value can't be negative, and in most cases, it must be greater than zero in order to qualify for lower interchange rates. \n Value, by country, is:\n\n    UK. A county.\n    US. A state.\n    Canada. A province.\n    Japan. A prefecture.\n    Switzerland. A kanton.\n"
            }
          ]
        }
      }
    },
    "level_3_card_processing_data": {
      "title": "level_3",
      "description": "The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business.",
      "type": "object",
      "properties": {
        "shipping_amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "Use this field to break down the shipping cost included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
            }
          ]
        },
        "duty_amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "Use this field to break down the duty amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
            }
          ]
        },
        "discount_amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "Use this field to break down the discount amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
            }
          ]
        },
        "shipping_address": {
          "allOf": [
            {
              "$ref": "#/$defs/address_portable"
            },
            {
              "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.",
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "address_line_3"
                    ]
                  },
                  {
                    "required": [
                      "admin_area_3"
                    ]
                  },
                  {
                    "required": [
                      "admin_area_4"
                    ]
                  },
                  {
                    "required": [
                      "address_details"
                    ]
                  }
                ]
              }
            }
          ]
        },
        "ships_from_postal_code": {
          "description": "Use this field to specify the postal code of the shipping location.",
          "type": "string",
          "minLength": 1,
          "maxLength": 60,
          "pattern": "^[a-zA-Z0-9_'.-]*$"
        },
        "line_items": {
          "description": "A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.",
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/line_item"
              },
              {
                "title": "line_item"
              }
            ]
          }
        }
      }
    },
    "line_item": {
      "title": "line_item",
      "description": "The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/item_without_category_tax_or_amount"
        },
        {
          "type": "object",
          "properties": {
            "unit_amount": {
              "allOf": [
                {
                  "$ref": "#/$defs/money"
                },
                {
                  "description": "The item price or rate per unit. Must equal <code>unit_amount * quantity</code> for all items. <code>unit_amount.value</code> can not be a negative number."
                }
              ]
            },
            "tax": {
              "allOf": [
                {
                  "$ref": "#/$defs/money"
                },
                {
                  "description": "The item tax for each unit. Must equal <code>tax * quantity</code> for all items. <code>tax.value</code> can not be a negative number."
                }
              ]
            },
            "commodity_code": {
              "description": "Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.",
              "type": "string",
              "minLength": 1,
              "maxLength": 12,
              "pattern": "^[a-zA-Z0-9_'.-]*$"
            },
            "discount_amount": {
              "allOf": [
                {
                  "$ref": "#/$defs/money"
                },
                {
                  "description": "Use this field to break down the discount amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
                }
              ]
            },
            "total_amount": {
              "allOf": [
                {
                  "$ref": "#/$defs/money"
                },
                {
                  "description": "The subtotal for all items. Must equal the sum of (items[].unit_amount * items[].quantity) for all items. item_total.value can not be a negative number."
                }
              ]
            },
            "unit_of_measure": {
              "description": "Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).",
              "type": "string",
              "minLength": 1,
              "maxLength": 12,
              "pattern": "^[a-zA-Z0-9_'.-]*$"
            }
          }
        }
      ]
    },
    "money": {
      "title": "Money",
      "description": "The currency and amount for a financial transaction, such as a balance or payment due.",
      "type": "object",
      "required": [
        "currency_code",
        "value"
      ],
      "properties": {
        "currency_code": {
          "$ref": "#/$defs/currency_code"
        },
        "value": {
          "description": "The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).",
          "type": "string",
          "minLength": 0,
          "maxLength": 32,
          "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$"
        }
      }
    },
    "name": {
      "title": "Name",
      "description": "The name of the party.",
      "type": "object",
      "properties": {
        "prefix": {
          "description": "The prefix, or title, to the party's name.",
          "type": "string",
          "minLength": 0,
          "maxLength": 140,
          "pattern": "^[\\S\\s]*$"
        },
        "given_name": {
          "description": "When the party is a person, the party's given, or first, name.",
          "type": "string",
          "minLength": 0,
          "maxLength": 140,
          "pattern": "^[\\S\\s]*$"
        },
        "surname": {
          "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.",
          "type": "string",
          "minLength": 0,
          "maxLength": 140,
          "pattern": "^[\\S\\s]*$"
        },
        "middle_name": {
          "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.",
          "type": "string",
          "minLength": 0,
          "maxLength": 140,
          "pattern": "^[\\S\\s]*$"
        },
        "suffix": {
          "description": "The suffix for the party's name.",
          "type": "string",
          "minLength": 0,
          "maxLength": 140,
          "pattern": "^[\\S\\s]*$"
        },
        "full_name": {
          "description": "When the party is a person, the party's full name.",
          "type": "string",
          "minLength": 0,
          "maxLength": 300,
          "pattern": "^[\\S\\s]*$"
        }
      }
    },
    "order_billing_plan": {
      "title": "order_billing_plan",
      "description": "Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method token or billing agreement creation.",
      "type": "object",
      "required": [
        "billing_cycles"
      ],
      "properties": {
        "billing_cycles": {
          "description": "An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.",
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "items": {
            "$ref": "#/$defs/billing_cycle"
          }
        },
        "setup_fee": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The setup fee for the recurring plan. Ensure its part of the item amount."
            }
          ]
        },
        "name": {
          "description": "Name of the recurring plan.",
          "type": "string",
          "minLength": 1,
          "maxLength": 127,
          "pattern": "^[A-Za-z0-9() +',.:-]+$"
        }
      }
    },
    "participant_metadata": {
      "title": "participant_metadata",
      "description": "Profile information of the sender or receiver.",
      "type": "object",
      "properties": {
        "ip_address": {
          "allOf": [
            {
              "$ref": "#/$defs/ip_address"
            },
            {
              "description": "The consumer's IP address, which can be represented in either IPv4 or IPv6 format."
            }
          ]
        }
      }
    },
    "payee": {
      "title": "payee",
      "description": "The merchant who receives the funds and fulfills the order. The merchant is also known as the payee.",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/payee_base"
        },
        {
          "type": "object"
        }
      ]
    },
    "payee_base": {
      "title": "payee_base",
      "description": "The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee.",
      "type": "object",
      "properties": {
        "email_address": {
          "allOf": [
            {
              "$ref": "#/$defs/email"
            },
            {
              "description": "The email address of merchant."
            }
          ]
        },
        "merchant_id": {
          "allOf": [
            {
              "$ref": "#/$defs/account_id"
            },
            {
              "description": "The encrypted PayPal account ID of the merchant."
            }
          ]
        }
      }
    },
    "payment_instruction": {
      "title": "payment_instruction",
      "description": "Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order.",
      "type": "object",
      "properties": {
        "platform_fees": {
          "description": "An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.",
          "type": "array",
          "minItems": 0,
          "maxItems": 1,
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/platform_fee"
              },
              {
                "title": "platform_fee"
              }
            ]
          }
        },
        "disbursement_mode": {
          "allOf": [
            {
              "$ref": "#/$defs/disbursement_mode"
            },
            {
              "description": "The funds that are held payee by the marketplace/platform. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability."
            }
          ]
        },
        "payee_pricing_tier_id": {
          "description": "This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error.",
          "type": "string",
          "minLength": 1,
          "maxLength": 20,
          "pattern": "^.*$"
        },
        "payee_receivable_fx_rate_id": {
          "description": "FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.",
          "type": "string",
          "minLength": 1,
          "maxLength": 4000,
          "pattern": "^.*$"
        }
      }
    },
    "phone": {
      "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).",
      "type": "object",
      "required": [
        "country_code",
        "national_number"
      ],
      "properties": {
        "country_code": {
          "title": "country_calling_code",
          "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).",
          "type": "string",
          "minLength": 1,
          "maxLength": 3,
          "pattern": "^[0-9]{1,3}?$"
        },
        "national_number": {
          "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).",
          "type": "string",
          "minLength": 1,
          "maxLength": 14,
          "pattern": "^[0-9]{1,14}?$"
        },
        "extension_number": {
          "description": "The extension number.",
          "type": "string",
          "minLength": 1,
          "maxLength": 15,
          "pattern": "^[0-9]{1,15}?$"
        }
      }
    },
    "platform_fee": {
      "title": "platform_fee",
      "description": "The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit.",
      "type": "object",
      "required": [
        "amount"
      ],
      "properties": {
        "amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "title": "amount",
              "description": "The fee for this transaction."
            }
          ]
        },
        "payee": {
          "allOf": [
            {
              "$ref": "#/$defs/payee_base"
            },
            {
              "title": "payee",
              "description": "The recipient of the fee for this transaction."
            }
          ]
        }
      }
    },
    "pricing_scheme": {
      "title": "pricing_scheme",
      "description": "The pricing scheme details.",
      "type": "object",
      "required": [
        "pricing_model"
      ],
      "properties": {
        "price": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The price the customer will be charged based on the pricing model"
            }
          ]
        },
        "pricing_model": {
          "description": "The pricing model for the billing cycle.",
          "type": "string",
          "enum": [
            "FIXED",
            "VARIABLE",
            "AUTO_RELOAD"
          ],
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "FIXED"
              ],
              "description": "A fixed pricing scheme where the customer is charged a fixed amount."
            },
            {
              "type": "string",
              "enum": [
                "VARIABLE"
              ],
              "description": "A variable pricing scheme where the customer is charged a variable amount."
            },
            {
              "type": "string",
              "enum": [
                "AUTO_RELOAD"
              ],
              "description": "A auto-reload pricing scheme where the customer is charged a fixed amount for reload."
            }
          ]
        },
        "reload_threshold_amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The threshold amount on which the reload charge would be triggered. This will be associated with the account-balance where if the account-balance goes below this amount then customer would incur reload charge."
            }
          ]
        }
      }
    },
    "purchase_unit_request": {
      "title": "Purchase Unit Request",
      "description": "The purchase unit request. Includes required information for the payment contract.",
      "type": "object",
      "required": [
        "amount"
      ],
      "properties": {
        "reference_id": {
          "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.",
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^[\\S\\s]*$"
        },
        "amount": {
          "allOf": [
            {
              "$ref": "#/$defs/amount_with_breakdown"
            },
            {
              "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.<br/>The amount must be a positive number. The `amount.value` field supports up to 15 digits preceding the decimal. For a list of supported currencies, decimal precision, and maximum charge amount, see the PayPal REST APIs <a href=\"https://developer.paypal.com/api/rest/reference/currency-codes/\">Currency Codes</a>."
            }
          ]
        },
        "payee": {
          "allOf": [
            {
              "$ref": "#/$defs/payee"
            },
            {
              "description": "The merchant who receives payment for this transaction."
            }
          ]
        },
        "payment_instruction": {
          "$ref": "#/$defs/payment_instruction"
        },
        "description": {
          "description": "<blockquote>This field supports up to 3,000 characters, but <strong>any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response</strong> representation of this field.</blockquote>The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.",
          "type": "string",
          "minLength": 1,
          "maxLength": 3000,
          "pattern": "^[\\S\\s]*$"
        },
        "custom_id": {
          "description": "The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.",
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[\\S\\s]*$"
        },
        "invoice_id": {
          "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. invoice_id values are required to be unique within each merchant account by default. Although the uniqueness validation is configurable, disabling this behavior will remove the account's ability to use invoice_id in other APIs as an identifier. It is highly recommended to keep a unique invoice_id for each Order.",
          "type": "string",
          "minLength": 1,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "soft_descriptor": {
          "description": "<blockquote>This field supports up to 127 characters, but <strong>any content beyond 22 characters (including spaces) will be truncated. The 22 character limit is reflected in the response</strong> representation of this field.</blockquote>The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.<br><br>If an Order is paid using the \"PayPal Wallet\", the statement descriptor will appear in following format on the payer's card statement: <code><var>PAYPAL_prefix</var>+(space)+<var>merchant_descriptor</var>+(space)+ <var>soft_descriptor</var></code><blockquote><strong>Note:</strong> The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit</blockquote>The <code>PAYPAL</code> prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. <br>For example, if:<ul><li>The PayPal prefix toggle is <code>PAYPAL *</code>.</li><li>The merchant descriptor in the profile is <code>Janes Gift</code>.</li><li>The soft descriptor is <code>800-123-1234</code>.</li></ul>Then, the statement descriptor on the card is <code>PAYPAL * Janes Gift 80</code>.",
          "type": "string",
          "minLength": 1,
          "maxLength": 1000,
          "pattern": "^[\\S\\s]*$"
        },
        "items": {
          "description": "An array of items that the customer purchases from the merchant.",
          "type": "array",
          "minItems": 0,
          "maxItems": 32767,
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/item_request"
              },
              {
                "title": "item",
                "description": "The item."
              }
            ]
          }
        },
        "shipping": {
          "allOf": [
            {
              "$ref": "#/$defs/shipping_detail"
            },
            {
              "description": "The name and address of the person to whom to ship the items."
            }
          ]
        },
        "supplementary_data": {
          "allOf": [
            {
              "$ref": "#/$defs/supplementary_data"
            },
            {
              "description": "Contains Supplementary Data."
            }
          ]
        }
      }
    },
    "risk_supplementary_data": {
      "title": "risk_supplementary_data",
      "description": "Additional information necessary to evaluate the risk profile of a transaction.",
      "type": "object",
      "properties": {
        "customer": {
          "$ref": "#/$defs/participant_metadata"
        }
      }
    },
    "shipping_detail": {
      "title": "shipping_detail",
      "description": "The shipping details.",
      "type": "object",
      "properties": {
        "name": {
          "allOf": [
            {
              "$ref": "#/$defs/name"
            },
            {
              "description": "The name of the person to whom to ship the items. Supports only the `full_name` property.",
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "prefix"
                    ]
                  },
                  {
                    "required": [
                      "given_name"
                    ]
                  },
                  {
                    "required": [
                      "surname"
                    ]
                  },
                  {
                    "required": [
                      "middle_name"
                    ]
                  },
                  {
                    "required": [
                      "suffix"
                    ]
                  },
                  {
                    "required": [
                      "alternate_full_name"
                    ]
                  }
                ]
              }
            }
          ]
        },
        "email_address": {
          "allOf": [
            {
              "$ref": "#/$defs/email_address"
            },
            {
              "description": "The email address of the recipient of the shipped items, which may belong to either the payer, or an alternate contact, for delivery."
            }
          ]
        },
        "phone_number": {
          "allOf": [
            {
              "$ref": "#/$defs/phone"
            },
            {
              "description": "The phone number of the recipient of the shipped items, which may belong to either the payer, or an alternate contact, for delivery. [Format - canonical international [E.164 numbering plan](https://www.itu.int/rec/T-REC-E.164/en)]",
              "not": {
                "required": [
                  "extension_number"
                ]
              }
            }
          ]
        },
        "type": {
          "title": "Fulfillment Type",
          "description": "A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.",
          "type": "string",
          "enum": [
            "SHIPPING",
            "PICKUP_IN_PERSON",
            "PICKUP_IN_STORE",
            "PICKUP_FROM_PERSON"
          ],
          "default": "SHIPPING",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "SHIPPING"
              ],
              "description": "The payer intends to receive the items at a specified address."
            },
            {
              "type": "string",
              "enum": [
                "PICKUP_IN_PERSON"
              ],
              "description": "DEPRECATED. Please use \"PICKUP_FROM_PERSON\" instead."
            },
            {
              "type": "string",
              "enum": [
                "PICKUP_IN_STORE"
              ],
              "description": "The payer intends to pick up the item(s) from the payee's physical store. Also termed as BOPIS, \"Buy Online, Pick-up in Store\". Seller protection is provided with this option."
            },
            {
              "type": "string",
              "enum": [
                "PICKUP_FROM_PERSON"
              ],
              "description": "The payer intends to pick up the item(s) from the payee in person. Also termed as BOPIP, \"Buy Online, Pick-up in Person\". Seller protection is not available, since the payer is receiving the item from the payee in person, and can validate the item prior to payment."
            }
          ]
        },
        "options": {
          "description": "An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.",
          "type": "array",
          "minItems": 0,
          "maxItems": 30,
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/shipping_option"
              },
              {
                "title": "shipping_option",
                "description": "The option that the payee or merchant offers to the payer to ship or pick up their items."
              }
            ]
          }
        },
        "address": {
          "allOf": [
            {
              "$ref": "#/$defs/address_portable"
            },
            {
              "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. `admin_area_1` is required for addresses located in Argentina, Brazil, China, Canada, India, Indonesia, Japan, Mexico, Thailand, and the United States.",
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "address_line_3"
                    ]
                  },
                  {
                    "required": [
                      "admin_area_3"
                    ]
                  },
                  {
                    "required": [
                      "admin_area_4"
                    ]
                  },
                  {
                    "required": [
                      "address_details"
                    ]
                  }
                ]
              }
            }
          ]
        }
      }
    },
    "shipping_option": {
      "title": "shipping_option",
      "description": "The options that the payee or merchant offers to the payer to ship or pick up their items.",
      "type": "object",
      "required": [
        "id",
        "label",
        "selected"
      ],
      "properties": {
        "id": {
          "description": "A unique ID that identifies a payer-selected shipping option.",
          "type": "string",
          "minLength": 0,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "label": {
          "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.",
          "type": "string",
          "minLength": 0,
          "maxLength": 127,
          "pattern": "^[\\S\\s]*$"
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/shipping_type"
            },
            {
              "description": "A classification for the method of purchase fulfillment."
            }
          ]
        },
        "amount": {
          "allOf": [
            {
              "$ref": "#/$defs/money"
            },
            {
              "description": "The shipping cost for the selected option."
            }
          ]
        },
        "selected": {
          "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`.",
          "type": "boolean"
        }
      }
    },
    "shipping_type": {
      "title": "shipping_type",
      "description": "A classification for the method of purchase fulfillment.",
      "type": "string",
      "enum": [
        "SHIPPING",
        "PICKUP",
        "PICKUP_IN_STORE",
        "PICKUP_FROM_PERSON"
      ],
      "default": "SHIPPING",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SHIPPING"
          ],
          "description": "The payer intends to receive the items at a specified address."
        },
        {
          "type": "string",
          "enum": [
            "PICKUP"
          ],
          "description": "DEPRECATED. To ensure that seller protection is correctly assigned, please use 'PICKUP_IN_STORE' or 'PICKUP_FROM_PERSON' instead. Currently, this field indicates that the payer intends to pick up the items at a specified address (ie. a store address). "
        },
        {
          "type": "string",
          "enum": [
            "PICKUP_IN_STORE"
          ],
          "description": "The payer intends to pick up the item(s) from the payee's physical store. Also termed as BOPIS, \"Buy Online, Pick-up in Store\". Seller protection is provided with this option."
        },
        {
          "type": "string",
          "enum": [
            "PICKUP_FROM_PERSON"
          ],
          "description": "The payer intends to pick up the item(s) from the payee in person. Also termed as BOPIP, \"Buy Online, Pick-up in Person\". Seller protection is not available, since the payer is receiving the item from the payee in person, and can validate the item prior to payment."
        }
      ]
    },
    "supplementary_data": {
      "title": "supplementary_data",
      "description": "Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data.",
      "type": "object",
      "properties": {
        "card": {
          "allOf": [
            {
              "$ref": "#/$defs/card_supplementary_data"
            },
            {
              "description": "Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>."
            }
          ]
        },
        "risk": {
          "allOf": [
            {
              "$ref": "#/$defs/risk_supplementary_data"
            },
            {
              "description": "Merchants and partners can add additional customer parameters that can help with better fraud protection and reduced risk for unbranded card payments."
            }
          ]
        }
      }
    },
    "universal_product_code": {
      "title": "universal_product_code",
      "description": "The Universal Product Code of the item.",
      "type": "object",
      "required": [
        "code",
        "type"
      ],
      "properties": {
        "type": {
          "title": "Universal Product Code Type",
          "description": "The Universal Product Code type.",
          "type": "string",
          "enum": [
            "UPC-A",
            "UPC-B",
            "UPC-C",
            "UPC-D",
            "UPC-E",
            "UPC-2",
            "UPC-5"
          ],
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "UPC-A"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-B"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-C"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-D"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-E"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-2"
              ],
              "description": ""
            },
            {
              "type": "string",
              "enum": [
                "UPC-5"
              ],
              "description": ""
            }
          ]
        },
        "code": {
          "description": "The UPC product code of the item.",
          "type": "string",
          "minLength": 6,
          "maxLength": 17,
          "pattern": "^[0-9]{0,17}$"
        }
      }
    }
  }
}