> ## Documentation Index
> Fetch the complete documentation index at: https://paypal-sb-staging.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update order

> Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.<br/><br/>To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: <code>\"/purchase_units/@reference_id=='default'/{attribute-or-object}\"</code>. 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>.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#patch-order">Orders v2 errors</a>.</blockquote>Patchable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody><tr><td><code>intent</code></td><td>replace</td><td></td></tr><tr><td><code>payer</code></td><td>replace, add</td><td>Using replace op for <code>payer</code> will replace the whole <code>payer</code> object with the value sent in request.</td></tr><tr><td><code>purchase_units</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].custom_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].description</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payee.email</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].shipping.name</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.email_address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.phone_number</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.options</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.type</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].soft_descriptor</code></td><td>replace, remove</td><td></td></tr><tr><td><code>purchase_units[].amount</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].items</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].invoice_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.disbursement_mode</code></td><td>replace</td><td>By default, <code>disbursement_mode</code> is <code>INSTANT</code>.</td></tr><tr><td><code>purchase_units[].payment_instruction.payee_receivable_fx_rate_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.platform_fees</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.airline</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.card</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>application_context.client_configuration</code></td><td>replace, add</td><td></td></tr></tbody></table>



## OpenAPI

````yaml api-reference/checkout_orders_v2.json patch /v2/checkout/orders/{id}
openapi: 3.0.3
info:
  title: Orders
  description: >-
    An order represents a payment between two or more parties. Use the Orders
    API to create, update, retrieve, authorize, and capture orders.
  version: '2.28'
  contact: {}
servers:
  - url: https://api-m.sandbox.paypal.com
    description: PayPal Sandbox Environment
  - url: https://api-m.paypal.com
    description: PayPal Live Environment
security: []
tags:
  - name: orders
    description: >-
      Use the `/orders` resource to create, update, retrieve, authorize, capture
      and track orders.
  - name: trackers
    description: >-
      Use the `/trackers` resource to update and retrieve tracking information
      for PayPal orders.
  - name: externalcallback
    description: >-
      PayPal will use the callback url defined in the create order request to
      send merchants shipping address and shipping options data while the buyer
      is in the PayPal checkout.
externalDocs:
  url: https://developer.paypal.com/docs/api/orders/v2/
paths:
  /v2/checkout/orders/{id}:
    patch:
      tags:
        - orders
      summary: Update order
      description: >-
        Updates an order with a `CREATED` or `APPROVED` status. You cannot
        update an order with the `COMPLETED` status.<br/><br/>To make an update,
        you must provide a `reference_id`. If you omit this value with an order
        that contains only one purchase unit, PayPal sets the value to `default`
        which enables you to use the path:
        <code>\"/purchase_units/@reference_id=='default'/{attribute-or-object}\"</code>.
        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>.<blockquote><strong>Note:</strong> For error handling and
        troubleshooting, see <a
        href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#patch-order">Orders
        v2 errors</a>.</blockquote>Patchable attributes or
        objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody><tr><td><code>intent</code></td><td>replace</td><td></td></tr><tr><td><code>payer</code></td><td>replace,
        add</td><td>Using replace op for <code>payer</code> will replace the
        whole <code>payer</code> object with the value sent in
        request.</td></tr><tr><td><code>purchase_units</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].custom_id</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].description</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].payee.email</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].shipping.name</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].shipping.email_address</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].shipping.phone_number</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].shipping.options</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].shipping.address</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].shipping.type</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>purchase_units[].soft_descriptor</code></td><td>replace,
        remove</td><td></td></tr><tr><td><code>purchase_units[].amount</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].items</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].invoice_id</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.disbursement_mode</code></td><td>replace</td><td>By
        default, <code>disbursement_mode</code> is
        <code>INSTANT</code>.</td></tr><tr><td><code>purchase_units[].payment_instruction.payee_receivable_fx_rate_id</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.platform_fees</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.airline</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.card</code></td><td>replace,
        add,
        remove</td><td></td></tr><tr><td><code>application_context.client_configuration</code></td><td>replace,
        add</td><td></td></tr></tbody></table>
      operationId: orders.patch
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/paypal_auth_assertion'
      requestBody:
        $ref: '#/components/requestBodies/patch_request'
      responses:
        '204':
          description: >-
            A successful request returns the HTTP `204 No Content` status code
            with an empty object in the JSON response body.
        '400':
          description: >-
            Request is not well-formed, syntactically incorrect, or violates
            schema.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_400'
                  - $ref: '#/components/schemas/orders.patch-400'
        '401':
          description: >-
            Authentication failed due to missing authorization header, or
            invalid authentication credentials.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_401'
                  - $ref: '#/components/schemas/401'
        '404':
          description: The specified resource does not exist.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_404'
                  - $ref: '#/components/schemas/404'
        '422':
          description: >-
            The requested action could not be performed, semantically incorrect,
            or failed business validation.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_422'
                  - $ref: '#/components/schemas/orders.patch-422'
        default:
          $ref: '#/components/responses/default'
      security:
        - Oauth2:
            - https://uri.paypal.com/services/payments/payment
            - >-
              https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants
components:
  parameters:
    id:
      name: id
      in: path
      description: The ID of the order that the tracking information is associated with.
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 36
        pattern: ^[A-Z0-9]+$
    paypal_auth_assertion:
      name: PayPal-Auth-Assertion
      in: header
      description: >-
        An API-caller-provided JSON Web Token (JWT) assertion that identifies
        the merchant. For details, see <a
        href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>.
      required: false
      schema:
        type: string
  requestBodies:
    patch_request:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/patch_request'
  schemas:
    '401':
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: INVALID_ACCOUNT_STATUS
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_ACCOUNT_STATUS
                  description:
                    type: string
                    enum:
                      - Account validations failed for the user.
    '404':
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: INVALID_RESOURCE_ID
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_RESOURCE_ID
                  description:
                    type: string
                    enum:
                      - >-
                        Specified resource ID does not exist. Please check the
                        resource ID and try again.
    error_400:
      type: object
      title: Bad Request Error
      description: Request is not well-formed, syntactically incorrect, or violates schema.
      properties:
        name:
          type: string
          enum:
            - INVALID_REQUEST
        message:
          type: string
          enum:
            - >-
              Request is not well-formed, syntactically incorrect, or violates
              schema.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    orders.patch-400:
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: FIELD_NOT_PATCHABLE
                properties:
                  issue:
                    type: string
                    enum:
                      - FIELD_NOT_PATCHABLE
                  description:
                    type: string
                    enum:
                      - Field cannot be patched.
              - title: INVALID_ARRAY_MAX_ITEMS
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_ARRAY_MAX_ITEMS
                  description:
                    type: string
                    enum:
                      - The number of items in an array parameter is too large.
              - title: INVALID_PARAMETER_SYNTAX
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PARAMETER_SYNTAX
                  description:
                    type: string
                    enum:
                      - >-
                        The value of a field does not conform to the expected
                        format.
              - title: INVALID_STRING_LENGTH
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_STRING_LENGTH
                  description:
                    type: string
                    enum:
                      - The value of a field is either too short or too long
              - title: INVALID_PARAMETER_VALUE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PARAMETER_VALUE
                  description:
                    type: string
                    enum:
                      - The value of a field is invalid.
              - title: MISSING_REQUIRED_PARAMETER
                properties:
                  issue:
                    type: string
                    enum:
                      - MISSING_REQUIRED_PARAMETER
                  description:
                    type: string
                    enum:
                      - A required field / parameter is missing.
              - title: AMOUNT_NOT_PATCHABLE
                properties:
                  issue:
                    type: string
                    enum:
                      - AMOUNT_NOT_PATCHABLE
                  description:
                    type: string
                    enum:
                      - >-
                        The amount cannot be updated as the 'payer' has chosen
                        and approved a specific financing offer for a given
                        amount. Please Create a new Order with the updated Order
                        amount and have the 'payer' approve the new payment
                        terms.
              - title: INVALID_PATCH_OPERATION
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PATCH_OPERATION
                  description:
                    type: string
                    enum:
                      - >-
                        The operation cannot be honored. Cannot add a property
                        that's already present, use replace. Cannot remove a
                        property thats not present, use add. Cannot replace a
                        property thats not present, use add.
              - title: MALFORMED_REQUEST_JSON
                properties:
                  issue:
                    type: string
                    enum:
                      - MALFORMED_REQUEST_JSON
                  description:
                    type: string
                    enum:
                      - The request JSON is not well formed.
    error_401:
      type: object
      title: Unauthorized Error
      description: >-
        Authentication failed due to missing Authorization header, or invalid
        authentication credentials.
      properties:
        name:
          type: string
          enum:
            - AUTHENTICATION_FAILURE
        message:
          type: string
          enum:
            - >-
              Authentication failed due to missing authorization header, or
              invalid authentication credentials.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_404:
      type: object
      title: Not found Error
      description: >-
        The server has not found anything matching the request URI. This either
        means that the URI is incorrect or the resource is not available.
      properties:
        name:
          type: string
          enum:
            - RESOURCE_NOT_FOUND
        message:
          type: string
          enum:
            - The specified resource does not exist.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_422:
      type: object
      title: Unprocessable Entity Error
      description: >-
        The requested action cannot be performed and may require interaction
        with APIs or processes outside of the current request. This is distinct
        from a 500 response in that there are no systemic problems limiting the
        API from performing the request.
      properties:
        name:
          type: string
          enum:
            - UNPROCESSABLE_ENTITY
        message:
          type: string
          enum:
            - >-
              The requested action could not be performed, semantically
              incorrect, or failed business validation.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    orders.patch-422:
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: AMOUNT_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - AMOUNT_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        Should equal item_total + tax_total + shipping +
                        handling + insurance - shipping_discount - discount.
              - title: CANNOT_BE_NEGATIVE
                properties:
                  issue:
                    type: string
                    enum:
                      - CANNOT_BE_NEGATIVE
                  description:
                    type: string
                    enum:
                      - >-
                        Must be greater than or equal to 0. If the currency
                        supports decimals, only two decimal place precision is
                        supported.
              - title: CANNOT_BE_ZERO_OR_NEGATIVE
                properties:
                  issue:
                    type: string
                    enum:
                      - CANNOT_BE_ZERO_OR_NEGATIVE
                  description:
                    type: string
                    enum:
                      - >-
                        Must be greater than zero. If the currency supports
                        decimals, only two decimal place precision is supported.
              - title: CITY_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - CITY_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        The specified country requires a city
                        (address.admin_area_2).
              - title: DECIMAL_PRECISION
                properties:
                  issue:
                    type: string
                    enum:
                      - DECIMAL_PRECISION
                  description:
                    type: string
                    enum:
                      - >-
                        If the currency supports decimals, only two decimal
                        place precision is supported.
              - title: DONATION_ITEMS_NOT_SUPPORTED
                properties:
                  issue:
                    type: string
                    enum:
                      - DONATION_ITEMS_NOT_SUPPORTED
                  description:
                    type: string
                    enum:
                      - >-
                        If 'purchase_unit' has "DONATION" as the
                        'items.category' then the Order can at most have one
                        purchase_unit. Multiple purchase_units are not supported
                        if either of them have at least one items with category
                        as "DONATION".
              - title: DUPLICATE_REFERENCE_ID
                properties:
                  issue:
                    type: string
                    enum:
                      - DUPLICATE_REFERENCE_ID
                  description:
                    type: string
                    enum:
                      - >-
                        `reference_id` must be unique if multiple
                        `purchase_unit` are provided.
              - title: INVALID_CURRENCY_CODE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_CURRENCY_CODE
                  description:
                    type: string
                    enum:
                      - >-
                        Currency code is invalid or is not currently supported.
                        Please refer
                        https://developer.paypal.com/api/rest/reference/currency-codes/
                        for list of supported currency codes.
              - title: ITEM_TOTAL_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - ITEM_TOTAL_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        Should equal sum of (unit_amount * quantity) across all
                        items for a given purchase_unit.
              - title: ITEM_TOTAL_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - ITEM_TOTAL_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        If item details are specified (items.unit_amount and
                        items.quantity) corresponding
                        amount.breakdown.item_total is required.
              - title: MAX_VALUE_EXCEEDED
                properties:
                  issue:
                    type: string
                    enum:
                      - MAX_VALUE_EXCEEDED
                  description:
                    type: string
                    enum:
                      - Should be less than or equal to 999999999999999.99.
              - title: INVALID_JSON_POINTER_FORMAT
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_JSON_POINTER_FORMAT
                  description:
                    type: string
                    enum:
                      - >-
                        Path should be a valid JSON Pointer
                        https://tools.ietf.org/html/rfc6901 that references a
                        location within the request where the operation is
                        performed.
              - title: INVALID_PARAMETER
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PARAMETER
                  description:
                    type: string
                    enum:
                      - Cannot be specified as part of the request.
              - title: NOT_PATCHABLE
                properties:
                  issue:
                    type: string
                    enum:
                      - NOT_PATCHABLE
                  description:
                    type: string
                    enum:
                      - Cannot be patched.
              - title: TAX_TOTAL_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - TAX_TOTAL_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        Should equal sum of (tax * quantity) across all items
                        for a given purchase_unit.
              - title: TAX_TOTAL_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - TAX_TOTAL_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        If item details are specified (items.tax_total and
                        items.quantity) corresponding amount.breakdown.tax_total
                        is required.
              - title: UNSUPPORTED_INTENT
                properties:
                  issue:
                    type: string
                    enum:
                      - UNSUPPORTED_INTENT
                  description:
                    type: string
                    enum:
                      - >-
                        `intent=AUTHORIZE` is not supported for multiple
                        purchase units. Only `intent=CAPTURE` is supported.
              - title: UNSUPPORTED_INTENT_FOR_KYC_INCOMPLETE_PAYEE
                properties:
                  issue:
                    type: string
                    enum:
                      - UNSUPPORTED_INTENT_FOR_KYC_INCOMPLETE_PAYEE
                  description:
                    type: string
                    enum:
                      - >-
                        `intent=AUTHORIZE` is not supported due to payee's
                        incomplete KYC, while their partner is enabled for
                        Progressive Onboarding. Only `intent=CAPTURE` is
                        supported.
              - title: UNSUPPORTED_PATCH_PARAMETER_VALUE
                properties:
                  issue:
                    type: string
                    enum:
                      - UNSUPPORTED_PATCH_PARAMETER_VALUE
                  description:
                    type: string
                    enum:
                      - >-
                        The value specified for this field is not currently
                        supported.
              - title: PATCH_VALUE_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - PATCH_VALUE_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        Please specify a 'value' to for the field that is being
                        patched.
              - title: PATCH_PATH_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - PATCH_PATH_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        Please specify a 'path' for the field for which the
                        operation needs to be performed.
              - title: PAYEE_ACCOUNT_LOCKED_OR_CLOSED
                properties:
                  issue:
                    type: string
                    enum:
                      - PAYEE_ACCOUNT_LOCKED_OR_CLOSED
                  description:
                    type: string
                    enum:
                      - The merchant account is locked or closed.
              - title: PAYEE_ACCOUNT_RESTRICTED
                properties:
                  issue:
                    type: string
                    enum:
                      - PAYEE_ACCOUNT_RESTRICTED
                  description:
                    type: string
                    enum:
                      - The merchant account is restricted.
              - title: PAYEE_FX_RATE_ID_EXPIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - PAYEE_FX_RATE_ID_EXPIRED
                  description:
                    type: string
                    enum:
                      - >-
                        The specified FX Rate ID has expired. Please specify a
                        different FX Rate Id and try the request again.
                        Alternately, remove the FX Rate ID to process the
                        request using the default exchange rate.
              - title: PAYEE_FX_RATE_ID_CURRENCY_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - PAYEE_FX_RATE_ID_CURRENCY_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        The specified FX Rate ID is for a currency that does not
                        match with the currency of this request. Please specify
                        a different FX Rate ID and try the request again.
                        Alternately, remove the FX Rate ID to process the
                        request using the default exchange rate.
              - title: INVALID_FX_RATE_ID
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_FX_RATE_ID
                  description:
                    type: string
                    enum:
                      - >-
                        The specific FX Rate ID is not valid. This could be
                        either because we are not able to look up the FX Rate
                        based on this ID or it could be because the ID belongs
                        to another API Caller.
              - title: PLATFORM_FEES_NOT_SUPPORTED
                properties:
                  issue:
                    type: string
                    enum:
                      - PLATFORM_FEES_NOT_SUPPORTED
                  description:
                    type: string
                    enum:
                      - >-
                        The API Caller is not enabled to process transactions by
                        specifying 'platform_fees'. Please work with your PayPal
                        Account Manager to enable this option for your account.
              - title: INVALID_PLATFORM_FEES_ACCOUNT
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PLATFORM_FEES_ACCOUNT
                  description:
                    type: string
                    enum:
                      - >-
                        The specified platform_fees payee account is either
                        invalid or account setup is incomplete.Please work with
                        your PayPal Account Manager to enable this option for
                        your account.
              - title: INVALID_PLATFORM_FEES_AMOUNT
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PLATFORM_FEES_AMOUNT
                  description:
                    type: string
                    enum:
                      - >-
                        The platform_fees amount cannot be greater than order
                        amount.
              - title: POSTAL_CODE_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - POSTAL_CODE_REQUIRED
                  description:
                    type: string
                    enum:
                      - The specified country requires a postal code.
              - title: REFERENCE_ID_NOT_FOUND
                properties:
                  issue:
                    type: string
                    enum:
                      - REFERENCE_ID_NOT_FOUND
                  description:
                    type: string
                    enum:
                      - >-
                        Filter expression value is incorrect. Please check the
                        value of the reference_id and try again.
              - title: REFERENCE_ID_REQUIRED
                properties:
                  issue:
                    type: string
                    enum:
                      - REFERENCE_ID_REQUIRED
                  description:
                    type: string
                    enum:
                      - >-
                        'reference_id' is required for each 'purchase_unit' if
                        multiple 'purchase_unit' are provided.
              - title: MULTI_CURRENCY_ORDER
                properties:
                  issue:
                    type: string
                    enum:
                      - MULTI_CURRENCY_ORDER
                  description:
                    type: string
                    enum:
                      - >-
                        Multiple differing values of currency_code are not
                        supported. Entire Order request must have the same
                        currency_code.
              - title: INVALID_SHIPPING_OPTION_ID
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_SHIPPING_OPTION_ID
                  description:
                    type: string
                    enum:
                      - >-
                        The items.shipping.options_ids[].id does not exist in
                        purchase_units.shipping.options[]. Please ensure that
                        all ids used in options_ids are first defined in
                        purchase_units.shipping.options[].
              - title: INVALID_DELIVERY_ESTIMATE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_DELIVERY_ESTIMATE
                  description:
                    type: string
                    enum:
                      - >-
                        The provided `delivery_time_max` must be greater than
                        the `delivery_time_min`, and vice versa.
              - title: INELIGIBLE_SHIPPING_OPTION
                properties:
                  issue:
                    type: string
                    enum:
                      - INELIGIBLE_SHIPPING_OPTION
                  description:
                    type: string
                    enum:
                      - >-
                        One or more shipping options cannot be used in
                        conjunction with this Order.
              - title: MISSING_SHIPPING_CALL_BACK_CONFIGURATION
                properties:
                  issue:
                    type: string
                    enum:
                      - MISSING_SHIPPING_CALL_BACK_CONFIGURATION
                  description:
                    type: string
                    enum:
                      - >-
                        `payment_source.paypal.experience_context.order_update_callback_config`
                        is mandatory for one or more shipping.options provided
                        in the request.
              - title: MISSING_ITEM_SHIPPING_OPTIONS
                properties:
                  issue:
                    type: string
                    enum:
                      - MISSING_ITEM_SHIPPING_OPTIONS
                  description:
                    type: string
                    enum:
                      - >-
                        All items in the purchase_unit must have `options_ids`
                        defined if any item in the Order has
                        `item[].shipping.options_ids` defined.
              - title: SHIPPING_OPTION_NOT_SELECTED
                properties:
                  issue:
                    type: string
                    enum:
                      - SHIPPING_OPTION_NOT_SELECTED
                  description:
                    type: string
                    enum:
                      - >-
                        At least one of the shipping.option should be set to
                        'selected = true'.
              - title: SHIPPING_OPTIONS_NOT_SUPPORTED
                properties:
                  issue:
                    type: string
                    enum:
                      - SHIPPING_OPTIONS_NOT_SUPPORTED
                  description:
                    type: string
                    enum:
                      - >-
                        Shipping options are not supported when `shipping.type`
                        is specified or when
                        'payment_source.paypal.experience_context.shipping_preference'
                        is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'.
              - title: MULTIPLE_SHIPPING_OPTION_SELECTED
                properties:
                  issue:
                    type: string
                    enum:
                      - MULTIPLE_SHIPPING_OPTION_SELECTED
                  description:
                    type: string
                    enum:
                      - >-
                        Only one shipping.option can be set to 'selected =
                        true'.
              - title: DUPLICATE_SHIPPING_OPTION_ID
                properties:
                  issue:
                    type: string
                    enum:
                      - DUPLICATE_SHIPPING_OPTION_ID
                  description:
                    type: string
                    enum:
                      - >-
                        Please specify a unique shipping option id for each
                        shipping option provided in the request and try again.
              - title: ORDER_ALREADY_COMPLETED
                properties:
                  issue:
                    type: string
                    enum:
                      - ORDER_ALREADY_COMPLETED
                  description:
                    type: string
                    enum:
                      - The order cannot be patched after it is completed.
              - title: CANNOT_MODIFY_INTENT
                properties:
                  issue:
                    type: string
                    enum:
                      - CANNOT_MODIFY_INTENT
                  description:
                    type: string
                    enum:
                      - >-
                        The value of 'intent' cannot be changed. Please create a
                        new order.
              - title: PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        The amount provided in the preferred shipping option
                        should match the amount provided in amount breakdown
              - title: AMOUNT_CHANGE_NOT_ALLOWED
                properties:
                  issue:
                    type: string
                    enum:
                      - AMOUNT_CHANGE_NOT_ALLOWED
                  description:
                    type: string
                    enum:
                      - >-
                        The amount specified is different from the amount
                        authorized by payer.
              - title: DELAYED_DISBURSEMENT_NOT_SUPPORTED
                properties:
                  issue:
                    type: string
                    enum:
                      - DELAYED_DISBURSEMENT_NOT_SUPPORTED
                  description:
                    type: string
                    enum:
                      - >-
                        The API Caller is not enabled to process transactions by
                        specifying disbursement mode as delayed.
              - title: DELAYED_DISBURSEMENT_NOT_SUPPORTED_FOR_KYC_INCOMPLETE_PAYEE
                properties:
                  issue:
                    type: string
                    enum:
                      - >-
                        DELAYED_DISBURSEMENT_NOT_SUPPORTED_FOR_KYC_INCOMPLETE_PAYEE
                  description:
                    type: string
                    enum:
                      - >-
                        The Delayed disbursement is not supported due to payee's
                        incomplete KYC, while their partner is enabled for
                        Progressive Onboarding.
              - title: PARTNER_SETTLEMENT_NOT_SUPPORTED_FOR_KYC_INCOMPLETE_PAYEE
                properties:
                  issue:
                    type: string
                    enum:
                      - >-
                        PARTNER_SETTLEMENT_NOT_SUPPORTED_FOR_KYC_INCOMPLETE_PAYEE
                  description:
                    type: string
                    enum:
                      - >-
                        Partner settlement is not supported due to payee's
                        incomplete KYC, while their partner is enabled for
                        Progressive Onboarding.
              - title: MULTIPLE_PURCHASE_UNITS_NOT_SUPPORTED_FOR_PAYMENT_SOURCE
                properties:
                  issue:
                    type: string
                    enum:
                      - MULTIPLE_PURCHASE_UNITS_NOT_SUPPORTED_FOR_PAYMENT_SOURCE
                  description:
                    type: string
                    enum:
                      - >-
                        The provided payment source cannot be used to pay for
                        the multiple purchase units order.
              - title: DISCOUNT_TOTAL_MISMATCH
                properties:
                  issue:
                    type: string
                    enum:
                      - DISCOUNT_TOTAL_MISMATCH
                  description:
                    type: string
                    enum:
                      - >-
                        The amount specified in `amount.breakdown.discount`
                        should equal the sum of all individual discount values
                        specified in `amount.breakdown.discount.breakdown`.
    patch_request:
      type: array
      title: Patch Request
      description: An array of JSON patch objects to apply partial updates to resources.
      minItems: 0
      maxItems: 32767
      items:
        $ref: '#/components/schemas/patch'
    error_details:
      title: Error Details
      type: object
      description: The error details. Required for client-side `4XX` errors.
      properties:
        field:
          type: string
          description: >-
            The field that caused the error. If this field is in the body, set
            this value to the field's JSON pointer value. Required for
            client-side errors.
        value:
          type: string
          description: The value of the field that caused the error.
        location:
          $ref: '#/components/schemas/error_location'
        issue:
          type: string
          description: The unique, fine-grained application-level error code.
        description:
          type: string
          description: >-
            The human-readable description for an issue. The description can
            change over the lifetime of an API, so clients must not depend on
            this value.
      required:
        - issue
    error_link_description:
      title: Link Description
      description: >-
        The request-related [HATEOAS link](/api/rest/responses/#hateoas-links)
        information.
      type: object
      required:
        - href
        - rel
      properties:
        href:
          description: >-
            The complete target URL. To make the related call, combine the
            method with this [URI
            Template-formatted](https://tools.ietf.org/html/rfc6570) link. For
            pre-processing, include the `$`, `(`, and `)` characters. The `href`
            is the key HATEOAS component that links a completed call with a
            subsequent call.
          type: string
          minLength: 0
          maxLength: 20000
          pattern: ^.*$
        rel:
          description: >-
            The [link relation
            type](https://tools.ietf.org/html/rfc5988#section-4), which serves
            as an ID for a link that unambiguously describes the semantics of
            the link. See [Link
            Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
          type: string
          minLength: 0
          maxLength: 100
          pattern: ^.*$
        method:
          description: The HTTP method required to make the related call.
          type: string
          minLength: 3
          maxLength: 6
          pattern: ^[A-Z]*$
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
    error_default:
      description: The default error response.
      oneOf:
        - $ref: '#/components/schemas/error_400'
        - $ref: '#/components/schemas/error_401'
        - $ref: '#/components/schemas/error_403'
        - $ref: '#/components/schemas/error_404'
        - $ref: '#/components/schemas/error_409'
        - $ref: '#/components/schemas/error_415'
        - $ref: '#/components/schemas/error_422'
        - $ref: '#/components/schemas/error_429'
        - $ref: '#/components/schemas/error_500'
        - $ref: '#/components/schemas/error_503'
    patch:
      type: object
      title: Patch
      description: The JSON patch object to apply partial updates to resources.
      properties:
        op:
          type: string
          description: The operation.
          x-enumDescriptions:
            - value: add
              description: >-
                Depending on the target location reference, completes one of
                these functions:<ul><li><strong>The target location is an array
                index</strong>. Inserts a new value into the array at the
                specified index.</li><li><strong>The target location is an
                object parameter that does not already exist</strong>. Adds a
                new parameter to the object.</li><li><strong>The target location
                is an object parameter that does exist</strong>. Replaces that
                parameter's value.</li></ul>The <code>value</code> parameter
                defines the value to add. For more information, see <a
                href="https://tools.ietf.org/html/rfc6902#section-4.1">4.1.
                add</a>.
            - value: remove
              description: >-
                Removes the value at the target location. For the operation to
                succeed, the target location must exist. For more information,
                see <a
                href="https://tools.ietf.org/html/rfc6902#section-4.2">4.2.
                remove</a>.
            - value: replace
              description: >-
                Replaces the value at the target location with a new value. The
                operation object must contain a <code>value</code> parameter
                that defines the replacement value. For the operation to
                succeed, the target location must exist. For more information,
                see <a
                href="https://tools.ietf.org/html/rfc6902#section-4.3">4.3.
                replace</a>.
            - value: move
              description: >-
                Removes the value at a specified location and adds it to the
                target location. The operation object must contain a
                <code>from</code> parameter, which is a string that contains a
                JSON pointer value that references the location in the target
                document from which to move the value. For the operation to
                succeed, the <code>from</code> location must exist. For more
                information, see <a
                href="https://tools.ietf.org/html/rfc6902#section-4.4">4.4.
                move</a>.
            - value: copy
              description: >-
                Copies the value at a specified location to the target location.
                The operation object must contain a <code>from</code> parameter,
                which is a string that contains a JSON pointer value that
                references the location in the target document from which to
                copy the value. For the operation to succeed, the
                <code>from</code> location must exist. For more information, see
                <a href="https://tools.ietf.org/html/rfc6902#section-4.5">4.5.
                copy</a>.
            - value: test
              description: >-
                Tests that a value at the target location is equal to a
                specified value. The operation object must contain a
                <code>value</code> parameter that defines the value to compare
                to the target location's value. For the operation to succeed,
                the target location must be equal to the <code>value</code>
                value. For test, <code>equal</code> indicates that the value at
                the target location and the value that <code>value</code>
                defines are of the same JSON type. The data type of the value
                determines how equality is defined:<table><thead
                align="left"><tr><th>Type</th><th>Considered equal if both
                values</th></tr></thead><tbody
                align="left"><tr><td><strong>strings</strong></td><td>Contain
                the same number of Unicode characters and their code points are
                byte-by-byte
                equal.</td></tr><tr><td><strong>numbers</strong></td><td>Are
                numerically
                equal.</td></tr><tr><td><strong>arrays</strong></td><td>Contain
                the same number of values, and each value is equal to the value
                at the corresponding position in the other array, by using these
                type-specific
                rules.</td></tr><tr><td><strong>objects</strong></td><td>Contain
                the same number of parameters, and each parameter is equal to a
                parameter in the other object, by comparing their keys (as
                strings) and their values (by using these type-specific
                rules).</td></tr><tr><td><strong>literals (<code>false</code>,
                <code>true</code>, and <code>null</code>)</strong></td><td>Are
                the same. The comparison is a logical comparison. For example,
                whitespace between the parameter values of an array is not
                significant. Also, ordering of the serialization of object
                parameters is not significant.</td></tr></tbody></table>For more
                information, see <a
                href="https://tools.ietf.org/html/rfc6902#section-4.6">4.6.
                test</a>.
          enum:
            - add
            - remove
            - replace
            - move
            - copy
            - test
        path:
          type: string
          description: >-
            The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a>
            to the target document location at which to complete the operation.
        value:
          title: Patch Value
          description: >-
            The value to apply. The <code>remove</code>, <code>copy</code>, and
            <code>move</code> operations do not require a value. Since <a
            href="https://www.rfc-editor.org/rfc/rfc69021">JSON Patch</a> allows
            any type for <code>value</code>, the <code>type</code> property is
            not specified.
        from:
          type: string
          description: >-
            The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a>
            to the target document location from which to move the value.
            Required for the <code>move</code> operation.
      required:
        - op
    error_location:
      type: string
      description: >-
        The location of the field that caused the error. Value is `body`,
        `path`, or `query`.
      enum:
        - body
        - path
        - query
      default: body
    error_403:
      type: object
      title: Not Authorized Error
      description: >-
        The client is not authorized to access this resource, although it may
        have valid credentials. 
      properties:
        name:
          type: string
          enum:
            - NOT_AUTHORIZED
        message:
          type: string
          enum:
            - Authorization failed due to insufficient permissions.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_409:
      type: object
      title: Resource Conflict Error
      description: The server has detected a conflict while processing this request.
      properties:
        name:
          type: string
          enum:
            - RESOURCE_CONFLICT
        message:
          type: string
          enum:
            - The server has detected a conflict while processing this request.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_415:
      type: object
      title: Unsupported Media Type Error
      description: The server does not support the request payload's media type.
      properties:
        name:
          type: string
          enum:
            - UNSUPPORTED_MEDIA_TYPE
        message:
          type: string
          enum:
            - The server does not support the request payload's media type.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_429:
      type: object
      title: Too many requests
      description: Too many requests. Blocked due to rate limiting.
      properties:
        name:
          type: string
          enum:
            - RATE_LIMIT_REACHED
        message:
          type: string
          enum:
            - Too many requests. Blocked due to rate limiting.
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
    error_500:
      type: object
      title: Internal Server Error
      description: >-
        This is either a system or application error, and generally indicates
        that although the client appeared to provide a correct request,
        something unexpected has gone wrong on the server.
      properties:
        name:
          type: string
          enum:
            - INTERNAL_SERVER_ERROR
        message:
          type: string
          enum:
            - An internal server error occurred.
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
      example:
        name: INTERNAL_SERVER_ERROR
        message: An internal server error occurred.
        debug_id: 90957fca61718
        links:
          - href: >-
              https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR
            rel: information_link
    error_503:
      type: object
      title: Service Unavailable Error
      description: >-
        The server is temporarily unable to handle the request, for example,
        because of planned maintenance or downtime.
      properties:
        name:
          type: string
          enum:
            - SERVICE_UNAVAILABLE
        message:
          type: string
          enum:
            - Service Unavailable.
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
      example:
        name: SERVICE_UNAVAILABLE
        message: Service Unavailable.
        debug_id: 90957fca61718
        information_link: >-
          https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE
  responses:
    default:
      description: The default response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_default'
  securitySchemes:
    Oauth2:
      type: oauth2
      description: Oauth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: /v1/oauth2/token
          scopes:
            https://uri.paypal.com/services/payments/payment: Manage payments and checkout workflow.
            https://uri.paypal.com/services/payments/payment/reference-transaction: Permission to initiate reference transaction
            https://uri.paypal.com/services/payments/initiatepayment: Initiates payments and checkout workflows.
            https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants: >-
              Allows client-side integration on Create, Get, Patch, Authorize &
              Capture Order endpoints.
            https://uri.paypal.com/services/payments/orders/client_sdk_orders_api: >-
              Enables secure client-side integration on confirm payment source
              endpoint

````