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

Get a fresh transaction

A fresh transaction for a subscription still waiting for its signature, with the terms it names. A 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. So have the terms signed first, and call this route when the wallet is ready for the transaction: its 150 blocks start here, not while the customer reads. Have the wallet sign it at once, then send it with the terms signature to Submit. Always sign the transaction of the last call.
To know whether a terms signature you hold is still good, compare terms.message with the message the wallet signed. The same text is the same terms: submit with the signature you hold. Another text is new terms: have the wallet sign this message, since submit refuses the old signature with invalid_terms_signature.
The terms come back unchanged while they have more than two minutes left before terms.expires_at. New terms come after that, after a submit that spent them (one answered transaction_expired may have), or when the plan changed on chain.
This route reserves nothing and takes no body: the wallet, the plan and the customer are the subscription's own. For a subscription that expired, call Create again.
POSThttps://api.mesub.io/v1/subscriptions/{id}/transaction
POSTGet a fresh transaction
https://api.mesub.io/v1/subscriptions/{id}/transaction

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.

Path

Fill id to send.

cURL
curl -X POST "https://api.mesub.io/v1/subscriptions/{id}/transaction" \
  -H "Authorization: Bearer $MESUB_API_KEY"
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/cmg1x0abc0001/transaction" \ -H "Authorization: Bearer $MESUB_API_KEY"
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" } }