xpay✦ charge-per-use
AI-generatedSummary
Register a configurable per-use payment checkout form with xPay that triggers the workflow upon customer payment and returns payment details to the workflow.
Inputs
- productName (required) — Name of the product shown on the checkout page, editable later at app.xpay.sh.
- description — Brief product description shown under the name with basic formatting support.
- amount (required) — Price in USD. Under $1 restricts payment to crypto wallets; $1 or more allows wallet or card payments. All settle in USDC on-chain.
- pricingModel (required) — Pricing scheme to use: flat per-run, token-based, dynamic, time-based, per-unit, or tiered.
- pricePerInputToken — Cost per input token in USD (only for token-based pricing).
- pricePerOutputToken — Cost per output token in USD (only for token-based pricing).
- estimatedTokens — Estimated total tokens shown at checkout (only for token-based pricing).
- basePrice — Base price before complexity multiplier (only for dynamic pricing).
- complexityMultiplierMin — Minimum complexity multiplier applied to base price (only for dynamic pricing).
- complexityMultiplierMax — Maximum complexity multiplier applied to base price (only for dynamic pricing).
- pricingDescription — Explanation shown to customers on how pricing varies (only for dynamic pricing).
- pricePerMinute — Cost per minute of processing (only for time-based pricing).
- minimumMinutes — Minimum billable minutes per execution (only for time-based pricing).
- estimatedMinutes — Estimated processing time shown on checkout (only for time-based pricing).
- pricePerUnit — Cost per unit processed (only for per-unit pricing).
- unitLabel — Label describing units processed, shown at checkout (only for per-unit pricing).
- estimatedUnits — Estimated number of units shown at checkout (only for per-unit pricing).
- environment (required) — Execution environment: Development (simulated payments), Staging (test network), or Production (live payments).
- walletType (required) — Recipient wallet selection: default xPay account wallet or a specified custom wallet address.
- customWalletAddress — Ethereum/Base address to receive USDC payments if custom wallet is selected.
- fields — Custom customer input fields to collect before payment, whose data will be included in the webhook payload.
- redirectUrl — URL to redirect customers after successful payment; if empty, a success message shows instead.
- enableBundles — Option to allow customers to prepay bundles at discounted rates; tier pricing is configured at app.xpay.sh.
- options.webhookUrlOverride — Override the webhook callback URL if n8n is behind a reverse proxy with internal ports.
Output shape
a single webhook-triggered execution returning payment details, customer input, and pricing data JSON
Activation POST to the webhook URL returns the hosted checkout form URL in node static data. On customer payment, the webhook triggers with verified payment data. Signature verification is skipped in development. Returned JSON includes payment transaction info, customer input fields, pricing details, and metadata like checkout ID and timestamp.