> ## 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.

# Record payment for invoice

> Records a payment for the invoice. If no payment is due, the invoice is marked as `PAID`. Otherwise, the invoice is marked as `PARTIALLY PAID`.



## OpenAPI

````yaml /api-reference/invoicing_v2.json post /v2/invoicing/invoices/{invoice_id}/payments
openapi: 3.0.3
info:
  title: Invoices
  description: >-
    Use the Invoicing API to create, send, and manage invoices. You can also use
    the API or webhooks to track invoice payments. When you send an invoice to a
    customer, the invoice moves from draft to payable state. PayPal then emails
    the customer a link to the invoice on the PayPal website. Customers with a
    PayPal account can log in and pay the invoice with PayPal. Alternatively,
    customers can pay as a guest with a debit card or credit card. For more
    information, see the <a href="/docs/invoicing/">Invoicing Overview</a> and
    the <a href="/docs/invoicing/basic-integration/">Invoicing Integration
    Guide</a>.
  version: '2.7'
  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: invoices
    description: >-
      Use the `/invoices` resource to create, update, and send invoices and
      invoice reminders. To manage invoices, you can also list invoices, show
      details for invoices, delete draft invoices, and cancel sent invoices. You
      can also record payments for invoices to mark them as fully or partially
      paid, or record refunds for invoices to mark them as fully or partially
      refunded. You can create QR codes for invoices that can be scanned,
      viewed, and paid by a mobile phone.
  - name: search-invoices
    description: >-
      Use the `/search-invoices` resource to search for and list invoices that
      match search criteria.
  - name: templates
    description: >-
      Use the `/templates` resource to create, list, show details for, update,
      and delete invoice templates. Use the `/templates` resource when you
      create a third-party invoicing application. For instance, a business can
      create a template with predefined invoice data. Later, the business can
      select the template to populate the invoice
      data.<blockquote><strong>Note:</strong> To upload a logo to display on an
      invoice, you can use the <strong>Template Settings</strong> dashboard to
      <a href="https://www.paypal.com/invoice/settings/templates">create a
      template</a>. When you create an invoice, you can use the URI for that
      logo.</blockquote>
  - name: merchant-config
    description: >-
      Use the `/merchant-config` resource to create, update and show details of
      merchant configuration.
  - name: estimates
    description: Use the /estimate resource to create, update, and send estimates.
  - name: batch-tasks
    description: >-
      Use the /batch-tasks resource to create, delete and retrieve batch related
      tasks.
  - name: stored-discounts
    description: >-
      Use the /stored-discounts resource to create and retrieve stored-discounts
      are specific to merchants
  - name: Search Enhancement
    description: >-
      This section contains the list of api, used to power invoicing search
      based on Index Organised Table(s).
  - name: Invoicing Multi Tenancy
    description: This section contains api to get the tenant config details.
  - name: Invoice Notification
    description: >-
      Use the /email-status-feedback resource to post the status update against
      invoicing emails.
  - name: Customer Feedbacks
    description: >-
      Use the /customer-feedbacks resource to create and retrieve feedbacks
      specific to merchants.
  - name: Insights
    description: >-
      Use the /insights resource to retrieve aggregated metrics specific to
      merchants.
  - name: invoicing-product-features
    description: >-
      This section contains the list of invoicing-product-features related
      api's.
  - name: conditional-rules
    description: This section contains api's related to conditional rules.
  - name: invoice-payment-attempt
    description: This section contains api's related to invoice payment attempt.
  - name: connections
    description: >-
      Use the `accounting-sync/merchants/connections` resource to get active
      connections list.
  - name: invoice-connection-details
    description: >-
      Use the `accounting-sync/invoices/{id}/connections` resource to get active
      connections list.
  - name: Invoicing themes
    description: >-
      Use the /themes resource to create, update and get details of themes
      related to merchants.
  - name: Bulk Sync Invoices - Accounting Sync
    description: >-
      Use the /accounting-invoices-batch resource to bulk sync invoices with
      accounting software.
  - name: account closure
    description: >-
      Use the /cancel-user-records resource to cancel open records for a user
      and /get-user-record-count to get count of open records.
  - name: Accounting sync
    description: This section contains invoicing APIs related to accounting sync.
externalDocs:
  url: https://developer.paypal.com/docs/api/invoicing/v2/
paths:
  /v2/invoicing/invoices/{invoice_id}/payments:
    post:
      tags:
        - invoices
      summary: Record payment for invoice
      description: >-
        Records a payment for the invoice. If no payment is due, the invoice is
        marked as `PAID`. Otherwise, the invoice is marked as `PARTIALLY PAID`.
      operationId: invoices.payments
      parameters:
        - $ref: '#/components/parameters/invoice_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/payment_detail'
        description: The details of the payment to record against the invoice.
        required: true
      responses:
        '200':
          description: >-
            A successful request returns the HTTP `200 Created` status code and
            a reference to the recorded payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment_reference'
            multipart/mixed:
              schema:
                $ref: '#/components/schemas/payment_reference'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_400'
                  - $ref: '#/components/schemas/invoices.payments-400'
            multipart/mixed:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_400'
                  - $ref: '#/components/schemas/invoices.payments-400'
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_403'
                  - $ref: '#/components/schemas/403'
            multipart/mixed:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_403'
                  - $ref: '#/components/schemas/403'
        '404':
          description: Resource Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_404'
            multipart/mixed:
              schema:
                $ref: '#/components/schemas/error_404'
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_422'
                  - $ref: '#/components/schemas/invoices.payments-422'
            multipart/mixed:
              schema:
                allOf:
                  - $ref: '#/components/schemas/error_422'
                  - $ref: '#/components/schemas/invoices.payments-422'
        '500':
          description: An internal server error has occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_500'
            multipart/mixed:
              schema:
                $ref: '#/components/schemas/error_500'
        default:
          $ref: '#/components/responses/default'
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
components:
  parameters:
    invoice_id:
      name: invoice_id
      in: path
      required: true
      description: The ID of the draft invoice to delete.
      schema:
        type: string
        minLength: 0
        maxLength: 2147483647
        pattern: ^.*$
  schemas:
    '403':
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: PERMISSION_DENIED
                properties:
                  issue:
                    type: string
                    enum:
                      - PERMISSION_DENIED
                  description:
                    type: string
                    enum:
                      - >-
                        The requested invoice is not associated with the
                        requested user.
    payment_detail:
      type: object
      title: Payment Detail
      description: >-
        The payment details of the invoice. Includes payment type, method, date,
        discount, and transaction type.
      properties:
        type:
          $ref: '#/components/schemas/payment_type'
          description: >-
            The payment type in an invoicing flow which can be PayPal or an
            external cash or check payment.
          readOnly: true
        payment_id:
          type: string
          description: >-
            The ID for a PayPal payment transaction. Required for the `PAYPAL`
            payment type.
          pattern: ^[\S\s]*$
          minLength: 0
          maxLength: 22
        payment_date:
          $ref: '#/components/schemas/date_no_time'
          description: >-
            The date when the invoice was paid, in [Internet date and time
            format](https://tools.ietf.org/html/rfc3339#section-5.6). For
            example, *yyyy*-*MM*-*dd* *z*.
        payment_date_time:
          $ref: '#/components/schemas/date_time'
          description: >-
            The date-time when the invoice was paid. For example,
            *yyyy*-*MM*-*dd* *T* *HH*: *mm*: *ss* *z*. The time zone will be
            UTC.
        method:
          $ref: '#/components/schemas/payment_method'
          description: >-
            The payment mode or method through which the invoicer can accept the
            payment.
        note:
          type: string
          description: A note associated with an external cash or check payment.
          pattern: ^[\S\s]*$
          minLength: 0
          maxLength: 2000
        amount:
          $ref: '#/components/schemas/money'
          description: >-
            The payment amount to record against the invoice. If you omit this
            parameter, the total invoice amount is marked as paid. This amount
            cannot exceed the amount due.
        shipping_info:
          $ref: '#/components/schemas/contact_name_address'
          description: >-
            The recipient's shipping information. Includes the user's contact
            information, which includes name and address.
      required:
        - method
    payment_reference:
      type: object
      title: Payment Reference
      description: The reference to the payment detail.
      properties:
        payment_id:
          type: string
          description: The ID for the invoice payment.
          readOnly: true
          minLength: 1
          maxLength: 22
          pattern: ^[0-9A-Za-z_-]+$
    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'
    invoices.payments-400:
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: MISSING_REQUIRED_PARAMETER
                properties:
                  issue:
                    type: string
                    enum:
                      - MISSING_REQUIRED_PARAMETER
                  description:
                    type: string
                    enum:
                      - >-
                        Payment method is missing. Please provide a valid
                        payment method.
              - title: INVALID_PAYMENT_METHOD
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PAYMENT_METHOD
                  description:
                    type: string
                    enum:
                      - >-
                        The value provided is not an acceptable method of
                        payment.
              - title: NOT_SUPPORTED
                properties:
                  issue:
                    type: string
                    enum:
                      - NOT_SUPPORTED
                  description:
                    type: string
                    enum:
                      - Currency code is not supported.
              - title: INVALID_STRING_LENGTH
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_STRING_LENGTH
                  description:
                    type: string
                    enum:
                      - Currency code length should be 3 characters.
              - title: MISSING_REQUIRED_PARAMETER
                properties:
                  issue:
                    type: string
                    enum:
                      - MISSING_REQUIRED_PARAMETER
                  description:
                    type: string
                    enum:
                      - Amount value is missing. Please provide a valid amount.
              - title: INVALID_STRING_MAX_LENGTH
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_STRING_MAX_LENGTH
                  description:
                    type: string
                    enum:
                      - >-
                        Amount value cannot be greater than the maximum limit of
                        32 characters length.
              - title: INVALID_PARAMETER_SYNTAX
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PARAMETER_SYNTAX
                  description:
                    type: string
                    enum:
                      - Amount value is invalid. Should be a numeric value.
              - title: VALUE_CANNOT_BE_ZERO
                properties:
                  issue:
                    type: string
                    enum:
                      - VALUE_CANNOT_BE_ZERO
                  description:
                    type: string
                    enum:
                      - >-
                        Payment amount cannot be zero. Please provide a valid
                        amount.
              - title: INVALID_DECIMAL_VALUE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_DECIMAL_VALUE
                  description:
                    type: string
                    enum:
                      - >-
                        Payment amount value is invalid. Can have non-negative
                        value with maximum 7 digits and upto 2 fractions.
              - title: INVALID_INTEGER_VALUE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_INTEGER_VALUE
                  description:
                    type: string
                    enum:
                      - >-
                        Payment amount value is invalid. Can have non-negative
                        value with maximum 6 digits.
              - title: INVALID_PARAMETER_SYNTAX
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_PARAMETER_SYNTAX
                  description:
                    type: string
                    enum:
                      - Date should be of format yyyy-mm-dd.
    error_403:
      type: object
      title: Not Authorized Error
      description: >-
        The client is not authorized to access this resource, although it may
        have valid credentials. 
      properties:
        name:
          type: string
          enum:
            - NOT_AUTHORIZED
        message:
          type: string
          enum:
            - Authorization failed due to insufficient permissions.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_404:
      type: object
      title: Not found Error
      description: >-
        The server has not found anything matching the request URI. This either
        means that the URI is incorrect or the resource is not available.
      properties:
        name:
          type: string
          enum:
            - RESOURCE_NOT_FOUND
        message:
          type: string
          enum:
            - The specified resource does not exist.
        details:
          type: array
          items:
            $ref: '#/components/schemas/error_details'
        debug_id:
          type: string
          description: The PayPal internal ID. Used for correlation purposes.
        links:
          description: >-
            An array of request-related [HATEOAS
            links](https://en.wikipedia.org/wiki/HATEOAS).
          type: array
          minItems: 0
          maxItems: 10000
          items:
            $ref: '#/components/schemas/error_link_description'
    error_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'
    invoices.payments-422:
      properties:
        details:
          type: array
          items:
            anyOf:
              - title: PAYMENT_AMOUNT_GREATER_THAN_AMOUNT_DUE
                properties:
                  issue:
                    type: string
                    enum:
                      - PAYMENT_AMOUNT_GREATER_THAN_AMOUNT_DUE
                  description:
                    type: string
                    enum:
                      - Payment amount is greater than the amount due.
              - title: INVALID_INVOICE_TYPE
                properties:
                  issue:
                    type: string
                    enum:
                      - INVALID_INVOICE_TYPE
                  description:
                    type: string
                    enum:
                      - The invoice type is not valid for paying an invoice.
              - title: CANNOT_PROCESS_PAYMENTS
                properties:
                  issue:
                    type: string
                    enum:
                      - CANNOT_PROCESS_PAYMENTS
                  description:
                    type: string
                    enum:
                      - >-
                        Current invoice state does not support payment
                        processing.
    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
    payment_type:
      type: string
      title: Payment Type
      description: >-
        The payment type. Can be PayPal or an external payment. Includes cash or
        a check.
      minLength: 0
      maxLength: 255
      pattern: ^[\S\s]*$
      x-enumDescriptions:
        - value: PAYPAL
          description: The payment type is PayPal.
        - value: EXTERNAL
          description: The payment type is an external cash or a check payment.
      enum:
        - PAYPAL
        - EXTERNAL
    date_no_time:
      type: string
      description: >-
        The stand-alone date, in [Internet date and time
        format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent
        special legal values, such as a date of birth, you should use dates with
        no associated time or time-zone data. Whenever possible, use the
        standard `date_time` type. This regular expression does not validate all
        dates. For example, February 31 is valid and nothing is known about leap
        years.
      format: ppaas_date_notime_v2
      minLength: 10
      maxLength: 10
      pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
    date_time:
      type: string
      description: >-
        The date and time, in [Internet date and time
        format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
        required while fractional seconds are
        optional.<blockquote><strong>Note:</strong> The regular expression
        provides guidance but does not reject all invalid dates.</blockquote>
      format: ppaas_date_time_v3
      minLength: 20
      maxLength: 64
      pattern: >-
        ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
    payment_method:
      type: string
      title: Payment Method
      description: >-
        The payment mode or method through which the invoicer can accept the
        payments.
      minLength: 0
      maxLength: 255
      pattern: ^[\S\s]*$
      x-enumDescriptions:
        - value: BANK_TRANSFER
          description: Payments can be received through bank transfers.
        - value: CASH
          description: Payments can be received as cash.
        - value: CHECK
          description: Payments can be received as check.
        - value: CREDIT_CARD
          description: Payments can be received through credit card payments.
        - value: DEBIT_CARD
          description: Payments can be received through debit card payments.
        - value: PAYPAL
          description: Payments can be received through paypal payments.
        - value: WIRE_TRANSFER
          description: Payments can be received through wire transfer.
        - value: OTHER
          description: Payments can be received through other modes.
      enum:
        - BANK_TRANSFER
        - CASH
        - CHECK
        - CREDIT_CARD
        - DEBIT_CARD
        - PAYPAL
        - WIRE_TRANSFER
        - OTHER
    money:
      type: object
      title: Money
      description: >-
        The currency and amount for a financial transaction, such as a balance
        or payment due.
      properties:
        currency_code:
          $ref: '#/components/schemas/currency_code'
        value:
          type: string
          description: >-
            The value, which might be:<ul><li>An integer for currencies like
            `JPY` that are not typically fractional.</li><li>A decimal fraction
            for currencies like `TND` that are subdivided into
            thousandths.</li></ul>For the required number of decimal places for
            a currency code, see [Currency
            Codes](/api/rest/reference/currency-codes/).
          maxLength: 32
          pattern: ^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$
      required:
        - currency_code
        - value
    contact_name_address:
      type: object
      title: Contact Information
      description: The contact information of the user. Includes name and address.
      allOf:
        - $ref: '#/components/schemas/business_name'
        - properties:
            name:
              $ref: '#/components/schemas/name'
              description: The first and Last name of the recipient.
            address:
              $ref: '#/components/schemas/address_portable'
              description: The address of the recipient.
    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'
    currency_code:
      description: >-
        The [three-character ISO-4217 currency
        code](/api/rest/reference/currency-codes/) that identifies the currency.
      type: string
      minLength: 3
      maxLength: 3
      x-security-classification:
        data_class: class4
        data_category: INTRINSIC
    business_name:
      type: object
      title: Business Name
      description: The business name of the party.
      properties:
        business_name:
          type: string
          description: Required. The business name of the party.
          maxLength: 300
    name:
      type: object
      title: Name
      description: The name of the party.
      properties:
        prefix:
          type: string
          description: The prefix, or title, to the party's name.
          maxLength: 140
        given_name:
          type: string
          description: When the party is a person, the party's given, or first, name.
          maxLength: 140
        surname:
          type: string
          description: >-
            When the party is a person, the party's surname or family name. Also
            known as the last name. Required when the party is a person. Use
            also to store multiple surnames including the matronymic, or
            mother's, surname.
          maxLength: 140
        middle_name:
          type: string
          description: >-
            When the party is a person, the party's middle name. Use also to
            store multiple middle names including the patronymic, or father's,
            middle name.
          maxLength: 140
        suffix:
          type: string
          description: The suffix for the party's name.
          maxLength: 140
        alternate_full_name:
          type: string
          description: >-
            DEPRECATED. The party's alternate name. Can be a business name,
            nickname, or any other name that cannot be split into first, last
            name. Required when the party is a business.
          maxLength: 300
        full_name:
          type: string
          description: When the party is a person, the party's full name.
          maxLength: 300
    address_portable:
      type: object
      title: Portable Postal Address (Medium-Grained)
      description: >-
        The portable international postal address. Maps to
        [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata)
        and HTML 5.1 [Autofilling form controls: the autocomplete
        attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).
      properties:
        address_line_1:
          type: string
          description: >-
            The first line of the address. For example, number or street. For
            example, `173 Drury Lane`. Required for data entry and compliance
            and risk checks. Must contain the full address.
          maxLength: 300
        address_line_2:
          type: string
          description: >-
            The second line of the address. For example, suite or apartment
            number.
          maxLength: 300
        address_line_3:
          type: string
          description: >-
            The third line of the address, if needed. For example, a street
            complement for Brazil, direction text, such as `next to Walmart`, or
            a landmark in an Indian address.
          maxLength: 100
        admin_area_4:
          type: string
          description: >-
            The neighborhood, ward, or district. Smaller than
            `admin_area_level_3` or `sub_locality`. Value is:<ul><li>The postal
            sorting code for Guernsey and many French territories, such as
            French Guiana.</li><li>The fine-grained administrative levels in
            China.</li></ul>
          maxLength: 100
        admin_area_3:
          type: string
          description: >-
            A sub-locality, suburb, neighborhood, or district. Smaller than
            `admin_area_level_2`. Value is:<ul><li>Brazil. Suburb, bairro, or
            neighborhood.</li><li>India. Sub-locality or district. Street name
            information is not always available but a sub-locality or district
            can be a very small area.</li></ul>
          maxLength: 100
        admin_area_2:
          type: string
          description: A city, town, or village. Smaller than `admin_area_level_1`.
          maxLength: 120
        admin_area_1:
          type: string
          description: >-
            The highest level sub-division in a country, which is usually a
            province, state, or ISO-3166-2 subdivision. Format for postal
            delivery. For example, `CA` and not `California`. Value, by country,
            is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A
            province.</li><li>Japan. A prefecture.</li><li>Switzerland. A
            kanton.</li></ul>
          maxLength: 300
        postal_code:
          type: string
          description: >-
            The postal code, which is the zip code or equivalent. Typically
            required for countries with a postal code or an equivalent. See
            [postal code](https://en.wikipedia.org/wiki/Postal_code).
          maxLength: 60
        country_code:
          $ref: '#/components/schemas/country_code'
        address_details:
          $ref: '#/components/schemas/address_details'
      required:
        - country_code
    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_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_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_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
    country_code:
      type: string
      description: >-
        The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
        that identifies the country or region.<blockquote><strong>Note:</strong>
        The country code for Great Britain is <code>GB</code> and not
        <code>UK</code> as used in the top-level domain names for that country.
        Use the `C2` country code for China worldwide for comparable
        uncontrolled price (CUP) method, bank card, and cross-border
        transactions.</blockquote>
      format: ppaas_common_country_code_v2
      maxLength: 2
      minLength: 2
      pattern: ^([A-Z]{2}|C2)$
    address_details:
      type: object
      title: Address Details
      description: >-
        The non-portable additional address details that are sometimes needed
        for compliance, risk, or other scenarios where fine-grain address
        information might be needed. Not portable with common third party and
        open source. Redundant with core fields.<br/>For example,
        `address_portable.address_line_1` is usually a combination of
        `address_details.street_number`, `street_name`, and `street_type`.
      properties:
        street_number:
          type: string
          description: The street number.
          maxLength: 100
        street_name:
          type: string
          description: The street name. Just `Drury` in `Drury Lane`.
          maxLength: 100
        street_type:
          type: string
          description: >-
            The street type. For example, avenue, boulevard, road, or
            expressway.
          maxLength: 100
        delivery_service:
          type: string
          description: >-
            The delivery service. Post office box, bag number, or post office
            name.
          maxLength: 100
        building_name:
          type: string
          description: >-
            A named locations that represents the premise. Usually a building
            name or number or collection of buildings with a common name or
            number. For example, <code>Craven House</code>.
          maxLength: 100
        sub_building:
          type: string
          description: >-
            The first-order entity below a named building or location that
            represents the sub-premises. Usually a single building within a
            collection of buildings with a common name. Can be a flat, story,
            floor, room, or apartment.
          maxLength: 100
  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/invoicing/invoices/read: For Reading the invoice details.
            https://uri.paypal.com/services/invoicing/invoices/readwrite: For managing (Create, Update, Delete) invoice.
            https://uri.paypal.com/services/invoicing/internal: Manage invoice resource internal clients.

````