agentaos.subscriptions is a read/manage surface, not a creation API. A subscription comes into existence when a buyer pays a payment link created with type: 'subscription', AgentaOS bills them every billingInterval from then on through Merchant of Record (card or bank). There is no subscriptions.create(): to start recurring billing, create a subscription payment link and let the buyer check out.
subscriptions.list(params?)
Mirrors the dashboard’s Subscriptions list, scoped to the environment (test or live) your API key belongs to.
number
default:"20"
Max 100.
number
default:"0"
PaginatedList<Subscription>.
Subscription fields
string
Subscription UUID.
string | null
string | null
string | null
The plan’s name/description, taken from the subscription payment link.
'month' | 'year' | null
SubscriptionStatus
See statuses below.
number
Per-cycle amount in integer minor units.
1999 means €19.99. This is the one field in the entire SDK named *Minor, see the money model.string
string | null
ISO 8601.
null before the first billing cycle has booked.string | null
The underlying subscription ID from the card processor.
Statuses
SubscriptionStatus is the raw subscription status from the card processor, mirrored onto the local record by AgentaOS’s polling reconciliation (there are no inbound webhooks from the card processor in this system, statuses update on the next poll cycle):
subscriptions.cancel(id, params?)
Defaults to cancel-at-period-end: the subscriber keeps access through the period they already paid for, no refund. Pass { atPeriodEnd: false } to cancel immediately instead. Calling it again on an already-canceled subscription is a no-op, not an error.
boolean
default:"true"
true schedules cancellation for currentPeriodEnd. false cancels now.Response
SubscriptionStatus
Status after the cancellation call.
string | null
ISO 8601.
boolean
Whether it’s scheduled to cancel at period end vs. already canceled.
string | null
ISO 8601 date the cancellation takes (or took) effect.
Next steps
Payment links
Create the
type: 'subscription' link that gives birth to a subscription.Customers
The people paying your subscriptions.
Invoices
Each renewal charge issues its own invoice.
Errors
What
cancel() throws on an unknown subscription ID.