A subscription is created when a customer authorizes recurring charges by visiting a plan’s hosted checkout URL and signing an on-chain delegation transaction. Once created, Marlin charges the subscription automatically at each interval without requiring further customer interaction. You use these API endpoints to list subscriptions and control their lifecycle from the merchant side.Documentation Index
Fetch the complete documentation index at: https://yanhgming.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Subscription statuses
| Status | Description |
|---|---|
Active | Charging normally. Marlin will attempt to collect the next charge at currentPeriodEnd. |
PastDue | Paused via the API, or a charge attempt failed. No new charges are attempted until resumed. |
Cancelled | The subscription has been canceled and will never charge again. |
Completed | The subscription completed its authorized term. |
GET /api/subscriptions
List all subscriptions associated with plans that belong to your merchant account, ordered newest-first.Query parameters
Filter by subscription status. One of
Active, PastDue, Cancelled, or Completed.Response — 200 OK
Returns an array of subscription objects. Each object includes a nestedplan snapshot with id, label, amount, mint, and intervalSeconds, and a nested customer snapshot with id, walletAddress, and label.
Database UUID for the subscription.
ID of the plan this subscription belongs to.
ID of the subscribing customer.
Current subscription status.
ISO 8601 timestamp of cancellation, or null.
Nested plan snapshot.
Nested customer snapshot.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
POST /api/subscriptions/:id/pause
Pause an active subscription. The subscription status transitions fromActive to PastDue. No further charges are attempted while the subscription is paused. Call resume to restart charging.
Pausing a subscription does not affect the customer’s on-chain delegate authorization. The authorization remains valid and resumes charging immediately when you call resume.
Path parameters
The subscription’s database UUID.
Response — 200 OK
Returns the updated subscription object withstatus: "PastDue".
Error cases
NOT_FOUND(404) — The subscription does not exist or does not belong to your account.VALIDATION_ERROR(400) — The subscription is not currentlyActiveand cannot be paused.
POST /api/subscriptions/:id/resume
Resume a paused subscription. The subscription status transitions fromPastDue back to Active, and Marlin will process the next scheduled charge.
Path parameters
The subscription’s database UUID.
Response — 200 OK
Returns the updated subscription object withstatus: "Active".
Error cases
NOT_FOUND(404) — The subscription does not exist or does not belong to your account.VALIDATION_ERROR(400) — The subscription is not inPastDuestatus and cannot be resumed.
POST /api/subscriptions/:id/cancel
Cancel a subscription permanently. The status transitions toCancelled and a cancelledAt timestamp is recorded. Canceled subscriptions cannot be resumed — the customer must subscribe again.
Path parameters
The subscription’s database UUID.
Response — 200 OK
Returns the updated subscription object withstatus: "Cancelled" and cancelledAt populated.
Error cases
NOT_FOUND(404) — The subscription does not exist or does not belong to your account.VALIDATION_ERROR(400) — The subscription is alreadyCancelledorCompleted.