A subscription plan is the template that governs how and when a customer is charged. When you create a plan, Marlin records it in the database and returns anDocumentation Index
Fetch the complete documentation index at: https://yanhgming.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
unsignedTx you sign and submit to register the plan as an on-chain PDA. Customers subscribe to a plan via the hosted checkout URL returned as checkoutUrl. Plans support any billing interval expressed in seconds — for example, 86400 for daily, 2592000 for monthly.
POST /api/plans
Create a new subscription plan.Request body
Human-readable plan name shown to customers at checkout (1–100 characters).
Stablecoin denomination. One of
USDC, PYUSD, or USDG.Billing amount as a decimal string, e.g.
"49.00". Up to 6 decimal places. This is the amount charged each billing period.Billing interval in seconds. Minimum 86400 (one day). For example:
2592000 for a 30-day month.Optional description of what the plan includes (max 500 characters).
Response — 201 Created
The created plan object.
Base64-encoded unsigned Solana transaction. Sign this with your merchant wallet and submit it to register the plan on-chain.
GET /api/plans
List all subscription plans for your merchant account, ordered newest-first. Each plan object includes a_count.subscriptions field with the total number of subscribers.
Response — 200 OK
Returns an array of plan objects. Each object has the same shape as theplan field in the create response, plus _count: { subscriptions: number }.
PATCH /api/plans/:id
Update a plan’s display label, description, or active status. You cannot change the amount, mint, or interval of a plan after creation — create a new plan instead.Path parameters
The plan’s database UUID.
Request body
All fields are optional. Include only the fields you want to change.New display name (1–100 characters).
New description (max 500 characters).
Set to
false to stop accepting new subscribers without canceling existing ones. Set to true to re-open the plan.Response — 200 OK
Returns the updated plan object. Error casesNOT_FOUND(404) — The plan does not exist or does not belong to your account.VALIDATION_ERROR(400) — The request body failed schema validation.