PayPal Invoicing API

The PayPal Invoicing API allows merchants to create, send, schedule, track, and manage invoices, including reminders and payment status.

OpenAPI Specification

paypal-invoicing-openapi-original.yml Raw ↑
openapi: 3.0.3
info:
  title: Paypal 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.3'
  contact: {}
paths:
  "/v2/invoicing/invoices":
    post:
      summary: Paypal Create draft invoice
      description: Creates a draft invoice. To move the invoice from a draft to payable state, you must <a href="#invoices_send">send the invoice</a>.<br/><br/>In the JSON request body, include invoice details including merchant information. The <code>invoice</code> object must include an <code>items</code> array.<blockquote><strong>Note:</strong> The merchant that you specify in an invoice must have a PayPal account in good standing.</blockquote>.
      operationId: invoices.create
      responses:
        '201':
          description: A successful request returns the HTTP `201 Created` status code. A JSON response body that shows invoice details is returned if you set <code>prefer=return=representation</code>.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/invoice"
              examples:
                '0':
                  "$ref": "#/components/examples/invoice"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/invoice"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.create-400"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.create-400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_403"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_403"
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/422"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/422"
        default:
          "$ref": "#/components/responses/default"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/invoice"
            examples:
              '0':
                "$ref": "#/components/examples/invoice_draft"
        description: The invoice details which includes all information of the invoice like items, billing information.
        required: true
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
    get:
      summary: Paypal List invoices
      description: Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.
      operationId: invoices.list
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices with details.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/invoices"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/invoices"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/400"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_403"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_403"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/page"
        - "$ref": "#/components/parameters/page_size"
        - "$ref": "#/components/parameters/total_required"
        - "$ref": "#/components/parameters/fields"
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/read
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/send":
    post:
      summary: Paypal Send invoice
      description: Sends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:<ul><li>If the invoice issue date is current or in the past, sends the invoice immediately.</li><li>If the invoice issue date is in the future, schedules the invoice to be sent on that date.</li></ul>To suppress the merchant's email notification, set the `send_to_invoicer` body parameter to `false`. To send the invoice through a share link and not through PayPal, set the <code>send_to_recipient</code> parameter to <code>false</code> in the <code>notification</code> object. The <code>send_to_recipient</code> parameter does not apply to a future issue date because the invoice is scheduled to be sent through PayPal on that date.<blockquote><strong>Notes:</strong><ul><li>After you send an invoice, resending it has no effect.</li><li>To send a notification for updates, <a href="#invoices_update">update the invoice</a> and set the <code>send_to_recipient</code> body parameter to <code>true</code>.</li></ul></blockquote>
      operationId: invoices.send
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` when the invoice issue date is current date.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/link_description"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/link_description"
        '202':
          description: A successful request returns the HTTP `202 Accepted` status code with no JSON response body, when the invoice issue date is in future.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/202-response"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/202-response"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_400"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_403"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_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:
                "$ref": "#/components/schemas/error_422"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/notification"
            examples:
              '0':
                "$ref": "#/components/examples/notification_invoice"
        description: The email or SMS notification to send to the payer when they send an invoice..
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/remind":
    post:
      summary: Paypal Send invoice reminder
      description: Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a `notification` object that defines the subject of the reminder and other details.
      operationId: invoices.remind
      responses:
        '204':
          description: A successful request returns the HTTP `204 No Content` status code with no JSON response body.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.remind-400"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.remind-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.remind-422"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/invoices.remind-422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/notification"
            examples:
              '0':
                "$ref": "#/components/examples/notification_reminder"
        description: The email or SMS notification that will be sent to the payer for reminder.
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/cancel":
    post:
      summary: Paypal Cancel sent invoice
      description: 'Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.'
      operationId: invoices.cancel
      responses:
        '204':
          description: A successful request returns the HTTP `204 No Content` status code with no JSON response body.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.cancel-400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              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"
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/invoices.cancel-422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/notification"
            examples:
              '0':
                "$ref": "#/components/examples/notification_invoice_cancel"
        description: The email or SMS notification that will be sent to the payer on cancellation.
        required: true
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/payments":
    post:
      summary: Paypal 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
      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"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/payment_detail"
            examples:
              '0':
                "$ref": "#/components/examples/payment_detail"
        description: The details of the payment to record against the invoice.
        required: true
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}":
    delete:
      summary: Paypal Delete external payment
      description: Deletes an external payment, by invoice ID and transaction ID.
      operationId: invoices.payments-delete
      responses:
        '204':
          description: A successful request returns the HTTP `204 No Content` status code with no JSON response body.
        '403':
          description: Authorization Error.
          content:
            application/json:
              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"
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/invoices.payments-delete-422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
        - "$ref": "#/components/parameters/transaction_id"
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/refunds":
    post:
      summary: Paypal Record refund for invoice
      description: Records a refund for the invoice. If all payments are refunded, the invoice is marked as `REFUNDED`. Otherwise, the invoice is marked as `PARTIALLY REFUNDED`.
      operationId: invoices.refunds
      responses:
        '200':
          description: A successful request returns the HTTP `200 Created` status code and a reference to the recorded refund.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/refund_reference"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/refund_reference"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.refunds-400"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.refunds-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.refunds-422"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/invoices.refunds-422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/refund_detail"
            examples:
              '0':
                "$ref": "#/components/examples/refund_detail"
        description: The details of the refund to record against the invoice.
        required: true
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}":
    delete:
      summary: Paypal Delete external refund
      description: Deletes an external refund, by invoice ID and transaction ID.
      operationId: invoices.refunds-delete
      responses:
        '204':
          description: A successful request returns the HTTP `204 No Content` status code with no JSON response body.
        '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"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
        - "$ref": "#/components/parameters/transaction_id"
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}/generate-qr-code":
    post:
      summary: Paypal Generate QR code
      description: Generates a QR code for an invoice, by ID. The QR code is a PNG image in <a href="https://www.base64encode.org/">Base64-encoded</a> format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must <a href="#invoices_create">create an invoice</a> and <a href="#invoices_send">send an invoice</a> to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.
      operationId: invoices.generate-qr-code
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the QR code as a PNG image.
        '400':
          description: Invalid request.
          content:
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.generate-qr-code-400"
        '403':
          description: Authorization Error.
          content:
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_403"
                  - "$ref": "#/components/schemas/403"
        '404':
          description: Resource Not Found.
          content:
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/error_404"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/qr_config"
            examples:
              '0':
                "$ref": "#/components/examples/qr_config"
        description: Optional configuration parameters to adjust QR code width, height and the encoded URL.
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/generate-next-invoice-number":
    post:
      summary: Paypal Generate invoice number
      description: Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after `INVOICE-1234` is `INVOICE-1235`.
      operationId: invoicing.generate-next-invoice-number
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the next invoice number.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/invoice_number"
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_403"
        default:
          "$ref": "#/components/responses/default"
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
  "/v2/invoicing/invoices/{invoice_id}":
    get:
      summary: Paypal Show invoice details
      description: Shows details for an invoice, by ID.
      operationId: invoices.get
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` status code and a JSON response body that shows invoice details.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/invoice"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              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"
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/read
      tags:
        - Invoices
    put:
      summary: Paypal Fully update invoice
      description: Fully updates an invoice, by ID. In the JSON request body, include a complete `invoice` object. This call does not support partial updates.
      operationId: invoices.update
      responses:
        '200':
          description: A successful request returns the HTTP `200 OK` status code. A JSON response body that shows invoice details is returned if you set <code>prefer=return=representation</code>.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/invoice"
            multipart/mixed:
              schema:
                "$ref": "#/components/schemas/invoice"
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.update-400"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_400"
                  - "$ref": "#/components/schemas/invoices.update-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/422"
            multipart/mixed:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_422"
                  - "$ref": "#/components/schemas/422"
        default:
          "$ref": "#/components/responses/default"
      parameters:
        - "$ref": "#/components/parameters/invoice_id"
        - "$ref": "#/components/parameters/send_to_recipient"
        - "$ref": "#/components/parameters/send_to_invoicer"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/invoice"
        description: A representation of changes to make in the invoice.
        required: true
      security:
        - Oauth2:
            - https://uri.paypal.com/services/invoicing/invoices/readwrite
      tags:
        - Invoices
    delete:
      summary: Paypal Delete invoice
      description: Deletes a draft or scheduled invoice, by ID. Deletes invoices in the draft or scheduled state only. For invoices that have already been sent, you can <a href="/docs/api/invoicing/v2/#invoices_cancel">cancel the invoice</a>. After you delete a draft or scheduled invoice, you can no longer use it or show its details. However, you can reuse its invoice number.
      operationId: invoices.delete
      responses:
        '204':
          description: A successful request returns the HTTP `204 No Content` status code with no JSON response body.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/error_400"
        '403':
          description: Authorization Error.
          content:
            application/json:
              schema:
                allOf:
                  - "$ref": "#/components/schemas/error_403"
                  - "$ref": "#/components/schemas/403"
        '404':
          description: Resource Not Found.
          content:
            applicat

# --- truncated at 32 KB (198 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/paypal/refs/heads/main/openapi/paypal-invoicing-openapi-original.yml