Subscription periods
Each payment period: interval, due date, amount, state (due, paid, skipped) and invoice. Filter with filter[subscription_id]. Actions: invoice, record_payment, skip, unskip.
Module: Subscriptions (subscriptions).
Endpoints
Section titled “Endpoints”GET /api/v1/subscription_cycles- List with filters, sorting and pagination (scopesubscriptions:read)GET /api/v1/subscription_cycles/{id}- A record by id (scopesubscriptions:read)POST /api/v1/subscription_cycles/{id}/charge- Charges the period to the saved card now. Returns the result: paid, failed, action_required, processing or unknown. (scopesubscriptions:write)POST /api/v1/subscription_cycles/{id}/refund- Fully refunds a period paid by card. The invoice is reversed separately. (scopesubscriptions:write)POST /api/v1/subscription_cycles/{id}/invoice- Creates the invoice of the period (only once). (scopesubscriptions:write)POST /api/v1/subscription_cycles/{id}/record_payment- Records the payment. With an invoice, it must be issued; without an amount, the balance is collected. (scopesubscriptions:write)POST /api/v1/subscription_cycles/{id}/skip- Skips the period: it will not be collected. Only without an invoice. (scopesubscriptions:write)POST /api/v1/subscription_cycles/{id}/unskip- Makes a skipped period due again. (scopesubscriptions:write)
Fields
Section titled “Fields”id(string, uuid; read): Unique identifier (UUID).subscription_id(string, uuid; read)period_start(string, date; read)period_end(string, date; read)due_date(string, date; read)amount(number; read)setup_amount(number; read)currency(string; read): Currency (ISO code, e.g. RON).status(string; read)invoice_id(string, uuid; read)invoice_claimed_at(string, date-time; read)invoice_error(string; read)paid_at(string, date-time; read)created_at(string, date-time; read): Creation date (ISO 8601).updated_at(string, date-time; read): Last modification date (ISO 8601).charge_state(string; read)charge_attempts(integer; read)next_attempt_on(string, date; read)charge_claimed_at(string, date-time; read)charge_ref(string; read)charge_error(string; read)charged_at(string, date-time; read)charged_mode(string; read)charged_account(string; read)checkout_ref(string; read)checkout_url(string; read)checkout_until(string, date-time; read)refunded_at(string, date-time; read)refund_ref(string; read)
Events
Section titled “Events”subscription_cycles.createdsubscription_cycles.updatedsubscription_cycles.deleted