> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paypal.ai/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/openapi-orders.json patch /v2/checkout/orders/{id}
openapi: 3.0.4
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.32'
servers:
  - url: https://api-m.paypal.com
    description: Server for https scheme.
security: []
tags:
  - 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.
  - name: orders
    description: >-
      Use the `/orders` resource to create, update, retrieve, authorize, capture
      and track orders.
  - name: trackers
    description: >-
      Use the `/trackers` resource to update and retrieve tracking information
      for PayPal orders.
externalDocs:
  url: ../doc/USERGUIDE.md
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:
        - name: id
          description: The ID of the order to update.
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 36
            pattern: ^[A-Z0-9]+$
          examples:
            00_orders_patch:
              summary: Patch Order - Add Shipping Address
              description: Updates an order to add shipping address to purchase unit.
              value: 5O190127TN364715T
            orders_patch_add_items_and_replace_amount:
              summary: Patch Order - Add Items and Replace Amount
              description: >-
                Updates an order to add items to and replace the amount within a
                purchase unit. The amount breakdown with an item total is added
                to reflect the newly added items. Whenever the quantity or price
                of items is modified in an order with a PATCH, the
                purchase_units.amount must also be updated.
              value: 5O190127TN364715T
            orders_patch_replace_amount:
              summary: Patch Order - Replace Amount
              description: >-
                Updates an order to revise the amount, adding the cost of
                shipping, to a purchase unit.
              value: 5O190127TN364715T
            patch_422_payer_patch_not_allowed:
              summary: >-
                Patch Order - 422 Unprocessable Entity Error - Payer Patch Not
                Allowed
              description: >-
                This code sample attempts to update an order with a payer
                object. The request fails since buyer has already approved.
              value: 5O190127TN364715T
        - $ref: '#/components/parameters/authorization'
        - $ref: '#/components/parameters/paypal_auth_assertion'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/patch_request'
            examples:
              00_orders_patch:
                summary: Patch Order - Add Shipping Address
                description: Updates an order to add shipping address to purchase unit.
                value:
                  - op: replace
                    path: /purchase_units/@reference_id=='PUHF'/shipping/address
                    value:
                      address_line_1: 2211 N First Street
                      address_line_2: Building 17
                      admin_area_2: San Jose
                      admin_area_1: CA
                      postal_code: '95131'
                      country_code: US
              orders_patch_add_items_and_replace_amount:
                summary: Patch Order - Add Items and Replace Amount
                description: >-
                  Updates an order to add items to and replace the amount within
                  a purchase unit. The amount breakdown with an item total is
                  added to reflect the newly added items. Whenever the quantity
                  or price of items is modified in an order with a PATCH, the
                  purchase_units.amount must also be updated.
                value:
                  - op: add
                    path: /purchase_units/@reference_id=='PUHF'/items
                    value:
                      - name: T-Shirt
                        description: Green XL
                        sku: sku01
                        unit_amount:
                          currency_code: USD
                          value: '90.00'
                        tax:
                          currency_code: USD
                          value: '10.00'
                        quantity: '1'
                        category: PHYSICAL_GOODS
                      - name: Shoes
                        description: Running, Size 10.5
                        sku: sku02
                        unit_amount:
                          currency_code: USD
                          value: '45.00'
                        tax:
                          currency_code: USD
                          value: '5.00'
                        quantity: '2'
                        category: PHYSICAL_GOODS
                  - op: replace
                    path: /purchase_units/@reference_id=='PUHF'/amount
                    value:
                      currency_code: USD
                      value: '205.00'
                      breakdown:
                        item_total:
                          currency_code: USD
                          value: '180.00'
                        shipping:
                          currency_code: USD
                          value: '5.00'
                        handling:
                          currency_code: USD
                          value: '0.00'
                        tax_total:
                          currency_code: USD
                          value: '20.00'
                        shipping_discount:
                          currency_code: USD
                          value: '0.00'
              orders_patch_replace_amount:
                summary: Patch Order - Replace Amount
                description: >-
                  Updates an order to revise the amount, adding the cost of
                  shipping, to a purchase unit.
                value:
                  - op: replace
                    path: /purchase_units/@reference_id=='PUHF'/amount
                    value:
                      currency_code: USD
                      value: '200.00'
                      breakdown:
                        item_total:
                          currency_code: USD
                          value: '180.00'
                        shipping:
                          currency_code: USD
                          value: '20.00'
              patch_422_payer_patch_not_allowed:
                summary: >-
                  Patch Order - 422 Unprocessable Entity Error - Payer Patch Not
                  Allowed
                description: >-
                  This code sample attempts to update an order with a payer
                  object. The request fails since buyer has already approved.
                value:
                  - op: add
                    path: /payer
                    value:
                      name:
                        given_name: TestFirst
                        surname: TestLast
                      email_address: payee@example.com
                      phone:
                        phone_number:
                          national_number: '19876543210'
                      address:
                        address_line_1: 2211 North First Street
                        address_line_2: Floor 6
                        admin_area_2: San Jose
                        admin_area_1: CA
                        postal_code: '95126'
                        country_code: US
      responses:
        '204':
          $ref: '#/components/responses/204_response'
        '400':
          description: >-
            Request is not well-formed, syntactically incorrect, or violates
            schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              examples:
                patch_400_invalid_shipping_address:
                  summary: >-
                    Patch Order - 400 Bad Request Error - Shipping Address
                    Invalid
                  description: >-
                    This code sample attempts to update an the shipping address
                    with an invalid value. The request fails.
                  value:
                    name: INVALID_REQUEST
                    details:
                      - field: >-
                          /purchase_units/@reference_id=='Reference ID
                          2'/shipping/address
                        value: x
                        location: body
                        issue: INVALID_PARAMETER_SYNTAX
                        description: >-
                          The value of a field does not conform to the expected
                          format.
                    message: >-
                      Request is not well-formed, syntactically incorrect, or
                      violates schema.
                    debug_id: f087ef02ffdb6
                    links:
                      - href: >-
                          https://developer.paypal.com/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX
                        rel: information_link
                        method: GET
        '401':
          $ref: '#/components/responses/401_error_response'
        '403':
          $ref: '#/components/responses/403_error_response'
        '404':
          $ref: '#/components/responses/404_error_response'
        '422':
          description: >-
            The requested action could not be performed, semantically incorrect,
            or failed business validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              examples:
                patch_422_payer_patch_not_allowed:
                  summary: >-
                    Patch Order - 422 Unprocessable Entity Error - Payer Patch
                    Not Allowed
                  description: >-
                    This code sample attempts to update an order with a payer
                    object. The request fails since buyer has already approved.
                  value:
                    name: UNPROCESSABLE_ENTITY
                    details:
                      - field: /payer
                        issue: PAYER_PATCH_NOT_ALLOWED
                        description: >-
                          Payer path patch is not allowed after payer has
                          approved the order.
                        location: body
                    message: >-
                      The requested action could not be performed, semantically
                      incorrect, or failed business validation.
                    debug_id: 90957fca61718
                    links:
                      - href: >-
                          https://developer.paypal.com/api/orders/v2/#error-PAYER_PATCH_NOT_ALLOWED
                        rel: information_link
                        method: GET
        '500':
          $ref: '#/components/responses/500_error_response'
        default:
          $ref: '#/components/responses/default_response'
      security:
        - Oauth2:
            - https://uri.paypal.com/services/payments/payment
            - >-
              https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants
components:
  parameters:
    authorization:
      name: Authorization
      in: header
      description: Holds authorization information for external API calls.
      required: false
      schema:
        $ref: '#/components/schemas/standard_header_schema'
      examples:
        bearer:
          summary: Bearer authorization.
          description: >-
            An authorization header with information for the Bearer
            authorization scheme. The authorization parameter value is
            randomized for this example.
          value: >-
            Bearer
            A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ
    paypal_auth_assertion:
      name: PayPal-Auth-Assertion
      in: header
      description: >-
        Header for an API client-provided JWT assertion that identifies the
        merchant. Establishing the consent to act-on-behalf of a merchant is a
        prerequisite for using this header.
      required: false
      schema:
        description: >-
          Header for an API client-provided JWT assertion that identifies the
          merchant. Establishing the consent to act-on-behalf of a merchant is a
          prerequisite for using this header.
        type: string
        minLength: 1
        maxLength: 10000
        pattern: ^.*$
      examples:
        auth_assertion:
          summary: An auth assertion.
          description: A paypal-auth-assertion header with a randomized value.
          value: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9
  schemas:
    patch_request:
      title: Patch Request
      description: An array of JSON patch objects to apply partial updates to resources.
      type: array
      minItems: 0
      maxItems: 32767
      items:
        allOf:
          - $ref: '#/components/schemas/patch'
          - title: patch
    error:
      title: Error
      description: The error details.
      type: object
      required:
        - debug_id
        - message
        - name
      properties:
        name:
          description: The human-readable, unique name of the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        message:
          description: The message that describes the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        debug_id:
          description: The PayPal internal ID. Used for correlation purposes.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        details:
          description: An array of additional details about the error.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            allOf:
              - $ref: '#/components/schemas/error_details'
              - title: error_details
        links:
          description: >-
            An array of request-related [HATEOAS
            links](/api/rest/responses/#hateoas-links).
          type: array
          minItems: 0
          maxItems: 32767
          readOnly: true
          items:
            allOf:
              - $ref: '#/components/schemas/link_description'
              - title: link_description
                readOnly: true
    standard_header_schema:
      title: Schema Object for standard headers
      description: >-
        Standard headers are generally less restrictive in structure due to
        historical precedent across browsers, etc. This is a common schema for
        use in defining most standard headers.
      type: string
      minLength: 1
      maxLength: 16000
      pattern: ^.*$
    patch:
      title: Patch
      description: The JSON patch object to apply partial updates to resources.
      type: object
      required:
        - op
      properties:
        op:
          description: The operation.
          type: string
          enum:
            - add
            - remove
            - replace
            - move
            - copy
            - test
        path:
          description: >-
            The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a>
            to the target document location at which to complete the operation.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        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/rfc6902">JSON Patch</a> allows
            any type for <code>value</code>, the <code>type</code> property is
            not specified.
        from:
          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.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
    error_details:
      title: Error Details
      description: The error details. Required for client-side `4XX` errors.
      type: object
      required:
        - issue
      properties:
        field:
          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.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        value:
          description: The value of the field that caused the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        location:
          description: >-
            The location of the field that caused the error. Value is `body`,
            `path`, or `query`.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
          default: body
        issue:
          description: The unique, fine-grained application-level error code.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        links:
          description: >-
            An array of request-related [HATEOAS
            links](/api/rest/responses/#hateoas-links) that are either relevant
            to the issue by providing additional information or offering
            potential resolutions.
          type: array
          minItems: 1
          maxItems: 4
          readOnly: true
          items:
            allOf:
              - $ref: '#/components/schemas/link_description'
              - title: link_description
                readOnly: true
        description:
          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.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
    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: 2147483647
          pattern: ^[\S\s]*$
        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: 2147483647
          pattern: ^[\S\s]*$
        method:
          description: The HTTP method required to make the related call.
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - HEAD
            - CONNECT
            - OPTIONS
            - PATCH
        title:
          description: The link title.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        mediaType:
          title: media_type
          description: >-
            The media type, as defined by [RFC
            2046](https://www.ietf.org/rfc/rfc2046.txt). Describes the link
            target.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        encType:
          title: enc_type
          description: The media type in which to submit the request data.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
          default: application/json
        schema:
          allOf:
            - $ref: '#/components/schemas/link_schema'
            - description: The schema that describes the request data.
        targetSchema:
          allOf:
            - $ref: '#/components/schemas/link_schema'
            - title: target_schema
              description: The schema that describes the link target.
    link_schema:
      title: Link Schema
      description: The request data or link target.
      type: object
      properties:
        additionalItems:
          title: additional_items
          description: Any additional items.
          type: object
        dependencies:
          title: Dependencies
          description: The dependencies.
          type: object
        items:
          title: Items
          description: An item.
          type: object
        definitions:
          title: Definitions
          description: Definitions.
          type: object
        patternProperties:
          title: pattern_properties
          description: The pattern properties.
          type: object
        properties:
          title: Properties
          description: The properties.
          type: object
        allOf:
          title: all_of
          description: >-
            An array of sub-schemas. The data must validate against all
            sub-schemas.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: all_of_item
            description: A sub-schema against which the data must validate.
            type: object
        anyOf:
          title: any_of
          description: >-
            An array of sub-schemas. The data must validate against one or more
            sub-schemas.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: any_of_item
            description: A sub-schema against which the data must validate.
            type: object
        oneOf:
          title: one_of
          description: >-
            An array of sub-schemas. The data must validate against one
            sub-schema.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: one_of_item
            description: A sub-schema against which the data must validate.
            type: object
        not:
          title: Not
          description: Not.
          type: object
        links:
          description: An array of links.
          type: array
          minItems: 0
          maxItems: 32767
          readOnly: true
          items:
            title: link
            description: A link.
            type: object
            readOnly: true
        fragmentResolution:
          title: fragment_resolution
          description: The fragment resolution.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        media:
          title: Media
          description: The media type and context-encoding scheme.
          type: object
          properties:
            type:
              description: >-
                The media type. See [Multipurpose Internet Mail Extensions
                (MIME) Part Two: Media
                Types](https://tools.ietf.org/html/rfc2046).
              type: string
              minLength: 0
              maxLength: 2147483647
              pattern: ^[\S\s]*$
            binaryEncoding:
              title: binary_encoding
              description: >-
                The content-encoding scheme. See [Multipurpose Internet Mail
                Extensions (MIME) Part One: Format of Internet Message
                Bodies](https://tools.ietf.org/html/rfc2045).
              type: string
              minLength: 0
              maxLength: 2147483647
              pattern: ^[\S\s]*$
        pathStart:
          title: path_start
          description: >-
            To apply this schema to the instances' URIs, start the URIs with
            this value.
          type: string
          minLength: 0
          maxLength: 2147483647
          format: uri
  responses:
    204_response:
      description: No Content.
    401_error_response:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Unauthorized' error.
              description: Example response for unauthorized request.
              value:
                name: AUTHENTICATION_FAILURE
                debug_id: b1d1f06c7246c
                message: >-
                  Authentication failed due to missing Authorization header, or
                  invalid authentication credentials.
    403_error_response:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Forbidden' error.
              description: Example response for a forbidden request.
              value:
                name: NOT_AUTHORIZED
                debug_id: b1d1f06c7246c
                message: Authorization failed due to insufficient permissions.
    404_error_response:
      description: Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Not Found' error.
              description: >-
                Example response for a request to a resource that does not
                exist.
              value:
                name: RESOURCE_NOT_FOUND
                debug_id: b1d1f06c7246c
                message: The specified resource does not exist.
    500_error_response:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic internal server error.
              description: >-
                Example response for a request that fails for reasons internal
                to the server.
              value:
                name: INTERNAL_SERVER_ERROR
                debug_id: b1d1f06c7246c
                message: An internal server error has occurred.
    default_response:
      description: Default response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Default response.
              description: >-
                Example catch all response, should not be encountered in
                practice.
              value:
                name: INTERNAL_SERVER_ERROR
                debug_id: b1d1f06c7246c
                message: An internal server error has occurred.
  securitySchemes:
    Oauth2:
      type: oauth2
      description: Oauth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: https://api-m.paypal.com/v1/oauth2/token
          scopes:
            https://uri.paypal.com/services/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
            https://uri.paypal.com/services/payments/orders/provision-card: Manage card provisioning merchants.

````