Subscriptions

Create, retrieve, update, cancel, and list recurring subscriptions.

View as Markdown

A subscription bills a customer a recurring amount on a schedule. For most integrations you attach a customer to a price and VINR handles the rest — the billing cycle, proration, invoicing, and automatic collection. If you operate at scale and need to control proration, billing anchors, metered usage, or invoice collection yourself, see Advanced below each section.

Illustrative content. Hand-authored to demonstrate the Standard/Advanced pattern; the production page will be generated from the VINR OpenAPI spec (roadmap item #1). Field names are representative.

The subscription objectAsk

FieldTypeDescription
idstringUnique identifier, e.g. sub_9Kpw1Vd.
customerstringThe cust_ this subscription bills. Expandable.
statusenumactive, trialing, past_due, canceled.
pricestringThe price_ charged each cycle. Expandable.
current_period_endtimestampUnix timestamp when the next invoice is generated.
latest_invoicestringMost recent inv_. Expandable.
createdtimestampUnix timestamp when the subscription was created.

Create a subscriptionAsk

Attach a customer to a price. VINR bills immediately, then on each cycle, collecting automatically from the customer's default payment method.

Retrieve a subscriptionAsk

Update a subscriptionAsk

Swap the price (an upgrade or downgrade) or schedule a cancellation at the end of the current period. By default a price change prorates and takes effect immediately.

Cancel a subscriptionAsk

Cancels the subscription immediately. The customer loses access at once and no further invoices are generated. To cancel at the end of the current period, use cancel_at_period_end on the update endpoint instead.

List subscriptionsAsk

Returns a paginated list of subscriptions. Filter by customer, status, or both.

subscription.created, subscription.updated, subscription.canceled, and invoice.payment_succeeded / invoice.payment_failed for each billing cycle. See Events.

Was this page helpful?