Skip to content

Subscriptions

Client subscriptions, with the price copied from the plan and the state (pending = bought on the site and unpaid, trialing, active, past_due, suspended, paused, cancelled). Actions: pause, resume, cancel, keep, change_plan, run. They are not deleted, they are cancelled.

Module: Subscriptions (subscriptions).

  • GET /api/v1/subscriptions - List with filters, sorting and pagination (scope subscriptions:read)
  • GET /api/v1/subscriptions/{id} - A record by id (scope subscriptions:read)
  • POST /api/v1/subscriptions - Create a record (scope subscriptions:write)
  • PATCH /api/v1/subscriptions/{id} - Modify the submitted fields (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/pause - Pauses the subscription: no new periods appear. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/resume - Restarts a paused subscription; the paused time is not billed. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/cancel - Cancels now or at the end of the period. Unpaid periods remain due. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/change_plan - Moves to another plan from the next period, without proration; without plan_id it drops the scheduled change. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/keep - Drops the scheduled cancellation. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/run - Brings the subscription up to date now: money received, state, new periods, charges and their invoices. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/card_link - Returns the client’s link to save or change the card and pay what is due. (scope subscriptions:write)
  • POST /api/v1/subscriptions/{id}/remove_card - Forgets the saved card and switches the subscription to manual payment. (scope subscriptions:write)
  • id (string, uuid; read): Unique identifier (UUID).
  • party_id (string, uuid; write, required)
  • plan_id (string; write, required)
  • plan_name (string; read)
  • price (number; write)
  • currency (string; read): Currency (ISO code, e.g. RON).
  • vat_rate (number; read)
  • interval_unit (string; read)
  • interval_count (integer; read)
  • setup_fee (number; read)
  • min_cycles (integer; read)
  • status (string; read)
  • payment_mode (string; read)
  • starts_on (string; write)
  • trial_ends_on (string, date; read)
  • anchor_day (integer; read)
  • next_period_start (string, date; read)
  • cancel_at_period_end (boolean; read)
  • cancelled_at (string, date-time; read)
  • cancel_reason (string; read)
  • paused_at (string, date-time; read)
  • note (string; write)
  • version (integer; read)
  • created_by (string; read)
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • card_brand (string; read)
  • card_last4 (string; read)
  • card_exp_month (integer; read)
  • card_exp_year (integer; read)
  • card_saved_at (string, date-time; read)
  • next_plan_id (string, uuid; read)
  • next_price (number; read)
  • trial_days (number; write)
  • subscriptions.created
  • subscriptions.updated
  • subscriptions.deleted