How a subscription gets created
1
Create a subscription payment link
2
Share checkoutUrl
The buyer opens
plan.checkoutUrl and pays with a card at the hosted checkout, exactly like a one-time payment.3
First cycle books, subscription goes active
AgentaOS creates a customer and subscription with our card processor behind the scenes, charges cycle 1, and the subscription becomes visible to
subscriptions.list().4
Renews automatically
Every
billingInterval, the card on file is charged again. No action from you unless the charge fails or the buyer cancels.Money model: unitAmountMinor
Every other amount in this API is decimal currency units (amount: 49.99 means €49.99). Subscriptions are the one exception: unitAmountMinor is an integer of the smallest currency unit, mirroring how our card processor represents recurring prices internally.
Statuses
status is the raw subscription status from the card processor, passed through unchanged:
List subscriptions
Paginated: every list call returns{ items, total, hasMore }.
- SDK
- CLI
- cURL
Cancel a subscription
Defaults to cancel-at-period-end: the buyer keeps what they already paid for untilcurrentPeriodEnd, and there’s no refund. Pass atPeriodEnd: false to cancel immediately instead. Calling cancel on an already-canceled subscription is a no-op, safe to retry.
- SDK
- CLI
- cURL
Cancellation never issues a refund. It only stops future renewals. If you owe the buyer money back for the current period, that’s a separate, manual step on your side.
Response
Subscription object (fromlist):
string
Subscription UUID.
string | null
Subscriber email.
string | null
Subscriber name.
string | null
The plan’s name or description, from the payment link.
string | null
month or year.string
One of the statuses above.
number
Per-cycle amount in integer minor units (e.g.
1999 = €19.99).string
Settlement currency.
string | null
ISO 8601 end of the current paid period.
null before the first cycle books.string | null
Underlying subscription ID from the card processor.
string
Status after cancellation.
string | null
ISO 8601 end of the current paid period.
boolean
Whether the subscription is scheduled to end at period end.
string | null
ISO date the cancellation takes effect.
Next steps
Payment links
Create the
type: 'subscription' link that starts this flow.Customers
See who’s subscribed to you.
Invoices
Every renewal charge issues its own invoice.
Webhooks
Get notified when a subscription payment lands.