Subscriptions & seats

Recurring subscription charges, quantity, seat-based subscriptions and proration.

View .md

A subscription is a recurring line on a contract, priced by a SUBSCRIPTION product's rate, which sets its billing_frequency. Quantity is the number of subscriptions, usually seats.

Metronome's reference: Edit a contract · Get a contract (v2) · Get subscription quantity history · Get subscription seats history. These pages are the source of truth for every field; metro's page covers how metro handles it. What metro wraps, endpoint by endpoint: Metronome API coverage.

Each subscription has a collection schedule (ADVANCE or ARREARS), proration settings, and a quantity mode:

ModeSet at createChange later
QUANTITY_ONLY (default)initial_quantityquantity_updates: an absolute quantity or a quantity_delta
SEAT_BASEDseat_config.seat_group_key, initial_seat_idsseat_updates: add or remove seat IDs, or unassigned seats

Seats aren't a separate object. They're a view of a SEAT_BASED subscription. A seat ID is whatever you assign, usually your own user ID. You can switch from QUANTITY_ONLY to SEAT_BASED once, and it can't be undone.

How it connects

The subscription rate's product_id points at a SUBSCRIPTION product on the contract's rate card. The subscription_id comes from the contract, at data.subscriptions[].id. All changes go through a contract edit.

Proration

  • Increases are prorated. BILL_IMMEDIATELY (needs ADVANCE) charges right away. BILL_ON_NEXT_COLLECTION_DATE adds the amount to the next invoice.
  • Decreases take effect at the next billing boundary.
  • Proration is set per subscription, not per seat.

Gotchas

  • quantity_updates on a SEAT_BASED subscription returns 400.
  • On a SEAT_BASED subscription the contract's quantity schedule shows only the initial state. Use the seats history for current state.
  • subscription_id changes when a plan change creates a new contract. Look it up again; don't cache it.
  • A subscription bills on its own billing_frequency, not the commit's. A subscription-rate override without billing_frequency is silently ignored.
  • Past-dated quantity changes don't restate finalized invoices.
  • Removing a seat that isn't assigned does nothing, with no error.

How metro handles it

CommandDoes
metro subscription add preflight --product-id=<id> --billing-frequency=MONTHLY --quantity=10Adds a QUANTITY_ONLY subscription. Refuses a non-subscription product, a missing rate at that frequency, or a duplicate unless --allow-duplicate.
metro subscription add preflight --file=subscription.yamlAny subscription, including SEAT_BASED
metro subscription set-quantity preflight --subscription-id=<id> --quantity=12Changes quantity. --delta= works too; metro always sends the absolute quantity.
metro subscription seats preflight --subscription-id=<id> --add-seat-ids=a,bAdds or removes seats, assigned or unassigned
metro subscription history inspect --customer-id <id> --contract-id <id> --subscription-id <id> --sandbox --planA read plan for a subscription's history

See Subscriptions and seats.

On this page