Skip to main content
agenta subscriptions is a read-and-cancel view onto everyone paying you on a recurring plan (created from a subscription payment link). It’s the fast path for support work: look up a subscriber, check their status, cancel on request.

List subscriptions

number
default:"10"
Results per page, 1 to 100.
boolean
Output a single JSON object instead of a table.
Output

--json

The human table formats the amount for you (€19.99/month). In JSON, unitAmountMinor is an integer of the smallest currency unit (1999 = €19.99), the one exception to plain decimal amounts elsewhere in the API. Every other money field you’ll see (checkouts, invoices, payment links) is a plain decimal number.

Status values

Cancel a subscription

string
required
Subscription ID, e.g. 253dbe6a-6b4d-4c40-a16f-aae31cfea271.
boolean
default:"false"
Cancel immediately instead of at the end of the current billing period. Without this flag, the subscriber keeps access until their paid period ends and nothing is refunded.
boolean
Output a single JSON object instead of the human-readable summary.
--json
Cancel immediately:
--json
Default to the no-flag form. --now skips the grace period the subscriber already paid for, so reach for it only when that’s actually the ask (fraud, duplicate signup, an explicit “cancel me right now”).

Change the plan (upgrade or downgrade)

string
required
Subscription ID.
string
required
The target product’s id (agenta products list). It must be a subscription product in the same currency and billing interval as the current plan, and a different one.
boolean
default:"false"
Print the quote and apply nothing.
One command, two API calls: the quote, then the change with the quote’s prorationDate echoed back, so what is charged is what was shown. Always look at the quote first:
--json
Then apply:
--json
  • Upgrade (the new plan costs more): the prorated difference is charged on the saved card now; dueTodayMinor says how much.
  • Downgrade (same or lower price): nothing today; the subscriber keeps the current plan until effectiveAt, the current period end, and agenta subscriptions list shows the scheduled switch as pendingPlanChange until then.
  • Cancel a scheduled downgrade: run the command again with --to set to the current plan’s id. The result says direction: "revert", nothing is charged, and pendingPlanChange is null again.
  • Money fields are integer minor units (4900 = €49.00). The subscription must be active or trialing.

Next steps

Customers

Look up who’s behind a subscription.

Invoices

Pull receipts for a paid billing cycle.

Subscriptions (SDK)

Manage subscriptions from your own backend.

Subscriptions (concept)

How subscription payment links and billing cycles work.