N8N Tools - Cash App icon

N8N Tools - Cash App

Accept payments and manage transactions through Cash App Pay with extensible Square API integration

Overview

This node integrates with the Cash App API to manage invoices, including the ability to cancel an existing invoice. The "Cancel Invoice" operation allows users to cancel a specific invoice by providing its ID and version number. This is useful in scenarios where an invoice needs to be invalidated or retracted after creation or publishing, such as when a customer cancels an order or a billing error occurs.

Practical examples:

  • Automatically canceling an invoice if a related payment fails.
  • Integrating with a CRM system to cancel invoices when a deal is lost.
  • Workflow automation that cancels invoices based on certain business rules or triggers.

Properties

Name Meaning
Invoice ID The unique identifier of the invoice to cancel (e.g., invoice_123456789).
Version The current version number of the invoice, required to ensure concurrency control.

Output

The node outputs a JSON object containing the result of the cancellation operation under the key invoice. This typically includes details about the canceled invoice returned from the Cash App API, confirming the cancellation status and any relevant metadata.

Example output structure:

{
  "json": {
    "resource": "invoice",
    "operation": "cancelInvoice",
    "success": true,
    "creditsUsed": 1,
    "creditsRemaining": 99,
    "invoice": {
      // Invoice cancellation response details here
    }
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the external Cash App API service.
  • The node uses an internal helper class to interact with the Cash App API endpoints.
  • Proper configuration of the API URL and API key in the node credentials is necessary.
  • The node sends a validation request before performing the operation to verify permissions and quota.

Troubleshooting

  • Common issues:

    • Invalid or missing Invoice ID or Version will cause the operation to fail.
    • API authentication errors if the API key credential is incorrect or expired.
    • Version mismatch errors if the provided invoice version does not match the current version on the server.
    • Network or connectivity issues preventing access to the Cash App API.
  • Error messages:

    • "N8N Tools API validation failed": Indicates failure during the pre-operation validation step; check API key and permissions.
    • "Cash App operation failed: <message>": Generic failure message wrapping underlying API errors; review the detailed message for specifics.
    • "Unknown invoice operation: cancelInvoice": Should not occur if configured correctly; indicates a possible code or configuration issue.
  • Resolution tips:

    • Verify that the Invoice ID and Version are correct and up to date.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check network connectivity and endpoint accessibility.
    • Use the node's "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

  • Cash App API Documentation (general reference for Cash App Pay API)
  • n8n documentation on creating custom nodes (for extending or troubleshooting nodes)
  • n8n community forums and support channels for help with API credential setup and usage

Discussion