BTCPay icon

BTCPay

BtcPay node with some basic functionality. Will get extended in the future.

Actions2

Overview

This node integrates with BTCPay Server to manage payment requests. Specifically, the PaymentRequest - Create operation allows users to create new payment requests within a specified store on BTCPay Server. This is useful for merchants or service providers who want to generate payment requests programmatically, for example, to request payments for orders, invoices, or donations.

Typical use cases include:

  • Creating a payment request for an order in an e-commerce workflow.
  • Generating a payment request with a specific amount and title dynamically.
  • Adding custom fields such as currency or metadata to tailor the payment request.

Properties

Name Meaning
Store Name or ID Select the BTCPay store where the payment request will be created. You can choose from a list of stores accessible by your API key or specify an ID using an expression.
Amount The payment amount for the request. Must be greater than 0. Defaults to the store's default currency unless overridden by additional fields (e.g., "currency").
Title A descriptive title for the payment request, such as an order number or invoice reference.
Additional Fields Optional extra fields to include in the payment request. For example, you can add a "currency" field to specify a different currency like BTC. These fields correspond to BTCPay API parameters and allow customization.

Additional informational notices guide users to ensure their API key has the necessary permissions and provide references to the BTCPay API documentation for advanced options.

Output

The node outputs a JSON object representing the newly created payment request as returned by the BTCPay Server API. This includes all details of the payment request such as its ID, amount, title, status, and any other metadata provided by the server.

If the operation fails, the node throws an error or returns an error object if "Continue On Fail" is enabled.

The node does not output binary data.

Dependencies

  • Requires a valid API key credential with appropriate permissions to access the BTCPay Server API, specifically permission to view stores and create payment requests.
  • The node depends on the BTCPay Server API endpoint /api/v1/stores/{storeId}/payment-requests.
  • The user must configure the BTCPay API credentials in n8n before using this node.

Troubleshooting

  • No stores available: If no stores appear in the "Store Name or ID" dropdown, verify that your API key has the canviewstoresettings permission enabled.
  • Invalid amount: Ensure the amount is greater than zero; otherwise, the API will reject the request.
  • API errors: Errors from the BTCPay Server API are surfaced as node errors. Common issues include invalid store ID, insufficient permissions, or malformed additional fields.
  • Missing required fields: Both "Amount" and "Title" are mandatory. Omitting them will cause validation errors.
  • To resolve errors, check API key permissions, validate input values, and consult BTCPay Server logs if accessible.

Links and References

Discussion