Skip to main content
agenta subscriptions is a read-and-cancel view onto everyone paying you on a recurring plan (created from a subscription product). Use it for support work: look up a subscriber, check their status, cancel on request.

List subscriptions

number
default:"10"
Results per page, 1 to 100.
string
Only subscribers who typed this discount code.
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, fields whose name ends in Minor are integers in minor units (1999 = €19.99). Plain amount fields are decimals. See the money model.

Status values

Cancel a subscription

The cancellation takes effect at the end of the current period: the subscriber keeps access until their paid period ends, and nothing is refunded.
string
required
Subscription ID, e.g. 253dbe6a-6b4d-4c40-a16f-aae31cfea271.
boolean
Output a single JSON object instead of the human-readable summary.
--json

Change the plan (upgrade or downgrade)

string
required
Subscription ID.
string
required
The ID of the target subscription product (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.

Give a credit

A credit takes money off the subscriber’s next invoice. The rules on when you can give one are on Subscriptions. You must be signed in (agenta login) as an owner or admin.
string
required
Subscription ID.
number
required
The credit in the plan’s currency, as a decimal (5.00).
string
required
Why you give it. The subscriber never sees it.
Output
With --json, the result has amountMinor, currency, reason, creditBalanceMinor, nextInvoiceMinor, nextInvoiceDueAfterCreditMinor, nextInvoiceAt, createdBy, createdAt, and the idempotencyKey the command used. Each run is a new credit: running the command twice gives two credits.

List credits

Prints each credit given on the subscription (amount, reason, date) and the buyer’s unspent balance. With --json, the result is { items: [{ id, amountMinor, reason, createdBy, createdAt }], balanceMinor }.

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 products and billing cycles work.