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

Create a subscription

Reserves a subscription to one of your plans for the wallet named, and builds what that wallet signs: the terms, as a message, then the transaction, without sending it. Hand both to Submit.
The transaction lives 150 blocks, about half a minute: transaction_expires_at estimates when they run out, last_valid_block_height says it. The terms live five minutes. Have the terms signed first, then ask for a fresh transaction when the wallet is ready to sign it.
Called again for the same plan, wallet and customer while nothing has landed, it answers the same subscription with a fresh transaction. The customer is the external_id, else the email, else nobody. Another customer naming the same wallet gets a subscription of its own: only the one the wallet signs for lands.
A wallet whose subscription to this plan stopped comes back over its existing authorisation: a new subscription, with costs.rent at zero.
On a plan with an end date, terms.message says that the last charge is in full and that access stops when the plan ends. When the plan ends before a second charge can be made, it says the charge is a single one.
POSThttps://api.mesub.io/v1/subscriptions
POSTCreate a subscription
https://api.mesub.io/v1/subscriptions

Calls are real. They go to https://api.mesub.io and act on the project the key belongs to.

Authorization

The key stays in this browser and is sent only to the API. It is not stored or logged by the docs.

Body

Fill plan, wallet to send.

cURL
curl -X POST "https://api.mesub.io/v1/subscriptions" \
  -H "Authorization: Bearer $MESUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response

Send the request to see the status, the headers and the body.

Limit: 60 calls a minute per API key.Guide: Subscribe from your server.

Headers

Mesub-Versionenum<string>

The version of this contract the call is written against. Without it, the call is served as the first version, 2026-10-02. Any other value is refused with 400 unsupported_version.

One of2026-10-02

Request example
curl -X POST "https://api.mesub.io/v1/subscriptions" \ -H "Authorization: Bearer $MESUB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "plan": "pro", "wallet": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", "external_id": "user_42", "email": "[email protected]" }'
Response example
{ "subscription": { "id": "cmg1x0abc0001", "status": "pending" }, "transaction": "gAIBBg0Xq3ZkT9yLmR4vP7wJ8sN2aHcVbE5uYtKfDgQxWz1oMiCj6rA0lSnUhBdXe2GqFpYv7mNcTz4RwK8sLjH5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQIDBAUGBwgJCgsM", "last_valid_block_height": "301245678", "transaction_expires_at": "2026-01-01T00:00:33.000Z", "costs": { "rent": { "subscription": "1969680", "authority": "1628640", "total": "3598320" }, "fee": { "signatures": 2, "per_signature": "5000", "priority": "0", "total": "10000" }, "total": "3608320" }, "terms": { "message": "Mesub: the terms of the subscription...\nAmount: 9.99 USDC every month\n...", "expires_at": "2026-01-01T00:05:00.000Z" } }