Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Recurring payments on Solana, billed from your server

Mesub charges a customer's wallet on a schedule, without holding their funds. The customer approves a plan once, Mesub pulls the price to your wallet at every period, and your server asks Mesub who has access.
You publish a plan in the dashboard, add @mesub/node to your server, and gate what is paid. A React widget is there for the wallet part if you want it.
To compare with building it yourself on the Solana Subscriptions program, read Crypto recurring payments on Solana: build it or use Mesub.

Before you start

  • A Solana wallet in a wallet app such as Phantom or Solflare. It signs your plans and receives the money.
  • A Mesub account, at mesub.io.
  • A server with your own login, on Node 22 or later. Mesub asks it who is signed in, and never sees your users' passwords.
  • React 18 or later, only for the widget.

What your customer sees

  • They approve once. Their wallet signs the plan's terms and the first payment. They need no Mesub account.
  • Each payment is capped. Mesub can take up to the plan's price each period, into the plan's receiving wallets, and nothing else. The Solana program enforces it, not Mesub's servers.
  • They cancel any time, on your site or at mesub.io/subscriptions with their wallet. Access runs to the end of the period paid.

Start here

Your first subscriber
A plan, an API key, the server routes and a button, in four steps.
Check access
Ask whether a customer has access, with hasAccess, a guard, or GET /v1/access.
Webhooks
Hear when a subscription renews, misses a payment or ends.
API reference
Every route with its parameters, its answers and its error codes. Try a request from the page.

With an AI agent

AI tools
An agent that writes your code, acts on your projects, or reads these docs.
You want the agent toUse
Write your integration, in your codebaseThe agent skills
Act on your projects: plans, charges, webhooksThe MCP server
Read these docs/llms.txt, or any page's address + .md

Understand

  • How it works: the flow from a click to a renewal, and the on-chain accounts behind it.
  • Lifecycle: every status, what a late payment does, cancelling and resuming.
  • Get your API key: where to create it, and how to rotate it.

Build

Look up

  • Pricing and limits: the tiers, what counts toward a limit, the API's rate limits.
  • Changelog: what changed, newest first.
  • Errors: the body of an error and every error code.