OpenViSTAI · Agents · Blockchain · Crypto
Menu
Payments & Stablecoins

Paypercall

Paypercall is an open-source JavaScript server application that adds per-request Bitcoin and Lightning payment requirements to HTTP APIs. It works as Express middleware within a Node.js app or as a reverse proxy in front of an upstream service, using Lightning Charge to handle the payment connection.

Independent OpenViST project profile, based on linked sources.

Paypercall — OpenViST project profile in Payments & Stablecoins.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Paypercall when an HTTP service needs per-call payment requirements and you can connect it to a Lightning Charge server. Select middleware for direct integration into an Express app, or the reverse proxy for an upstream service that should remain payment-unaware.

Who it is for

  • Developers who want to charge for individual HTTP API actions.
  • Teams that want to add payment gating to an Express application or place it in front of an existing HTTP service.

Documented uses

  • Require payment before processing a request to a selected API route.
  • Set endpoint rates at a reverse proxy while keeping the upstream application payment-unaware.
  • Let API callers obtain a BOLT11 invoice, pay it and retry with a returned access token.
Before you choose

Requirements & limits

The GitHub repository is public and identifies the project as MIT-licensed. The middleware requires a Lightning Charge access token.

  • Middleware is documented for Express and Node.js applications; the proxy can front an upstream Flask service.
  • Both integration paths depend on Lightning Charge, with a required access token.
  • The documented caller flow requires an initial empty request, payment of the returned BOLT11 invoice, then a retry carrying the request body and X-Token.
  • Middleware configuration documents SQLite storage and configurable invoice and access-token expiries.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Configure a payment-gated API through the reverse proxy

Place a payment-requiring proxy in front of an existing HTTP service and set a rate for an endpoint.

Before you start

  • A running upstream HTTP application
  • A Lightning Charge server URL and access token
  • An endpoint and rate to configure

Steps

  1. Run the upstream HTTP application.

  2. Start paypercall with the Lightning Charge token, upstream URL, proxy port and a YAML endpoint rate mapping.

  3. Send requests to the proxy endpoint, which requires payment before forwarding access to the upstream service.

Expected outcome

The upstream application remains unaware of payments while paypercall applies per-call charges at the proxy.

Guide limitations

  • The example documents a Flask upstream and a POST route; it does not specify every supported server or endpoint configuration.
  • The guide describes setup, not a verified deployment.
Source-based practical guide

Pay for and call a protected API endpoint

Follow the documented caller sequence for an endpoint protected by paypercall.

Before you start

  • A paypercall-enabled API endpoint
  • A Lightning wallet capable of paying the returned BOLT11 invoice

Steps

  1. Send an empty request to the endpoint to receive its BOLT11 payment request and X-Token header.

  2. Pay the invoice.

  3. Repeat the request with the required body and echo the returned X-Token header.

Expected outcome

The paid request can proceed to the API action, as illustrated by the README's SMS endpoint example.

Guide limitations

  • The example's invoice and token are illustrative; callers need values returned by their own endpoint.
  • The documented example uses a Lightning payment flow.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
ElementsProject/paypercall · Official homepage title · retained in its source language