N8N Tools - PayPal Enhanced icon

N8N Tools - PayPal Enhanced

Complete PayPal integration with 70+ operations including Orders, Subscriptions, Invoicing, Disputes, Webhooks, and Partner management

Invoicing → Delete Invoice

AI-generated

Overview

This node provides enhanced integration with PayPal's API, supporting a wide range of financial operations including orders, subscriptions, invoicing, disputes, webhooks, payments, products, plans, partner referrals, and reporting. Specifically, the Delete Invoice operation under the Invoicing resource allows users to delete a draft invoice by its ID.

Typical use cases for the Delete Invoice operation include:

  • Removing mistakenly created draft invoices before they are sent.
  • Cleaning up obsolete or test invoices in automated workflows.
  • Managing invoice lifecycle programmatically within larger billing or accounting automation.

Example scenario: A business automates invoice management and wants to delete draft invoices that were never finalized or sent, ensuring only valid invoices remain in their PayPal account.

Properties

Name Meaning
ID The unique identifier of the invoice to delete.
Additional Options Optional parameters including:
- Environment: Choose between "Sandbox" (test) or "Live" PayPal environment.
- Page Size: Number of items per page for list operations (not relevant for delete).
- Start Time: Filter start date (ISO 8601 format) (not relevant for delete).
- End Time: Filter end date (ISO 8601 format) (not relevant for delete).

Output

The node outputs a JSON object containing:

  • resource: The resource type, here always "invoicing".
  • operation: The operation performed, here "deleteInvoice".
  • success: Boolean indicating if the deletion was successful.
  • Other fields returned by PayPal API response related to the deleted invoice (if any).
  • creditsUsed and creditsRemaining: Information about API usage credits from the external validation service.
  • timestamp: ISO string timestamp of when the operation was executed.
  • In case of failure (if continueOnFail is enabled), an error message with success set to false.

No binary data output is produced by this operation.

Dependencies

  • Requires credentials for:
    • An API key credential for the external validation service ("N8N Tools API").
    • OAuth2 access token credential for PayPal API authentication.
  • The node dynamically selects the PayPal API base URL depending on the chosen environment (sandbox or live).
  • The node uses HTTP requests to communicate with both the external validation API and PayPal's REST API.

Troubleshooting

  • Invalid JSON in request body: Although not applicable for delete operation, other operations may require valid JSON input. Ensure JSON syntax correctness.
  • Validation failed: If the external validation API rejects the request, check API key validity and correct resource/operation names.
  • Unknown operation or resource: Using unsupported operation or resource values will throw errors. Confirm you select "Invoicing" as resource and "Delete Invoice" as operation.
  • Authorization errors: Ensure PayPal OAuth2 credentials are valid and have required permissions.
  • Network issues: Connectivity problems to PayPal or validation API endpoints can cause failures.
  • Continue On Fail: If enabled, errors will be reported in output JSON instead of stopping execution.

Links and References

Discussion