Skip to Content
Paycose Docs
Features

Subscriptions

Recurring billing that generates and charges an invoice automatically, every period.

A Subscription bills a customer on a repeating schedule — weekly, monthly, yearly — by automatically generating and paying an Invoice each period.

How it works

  • Create a Subscription with line items (product/price), a customer_id, and a default_payment_method to charge automatically.
  • Retrieve a Subscription's current status, or list every Subscription.
  • Each billing period, it generates an Invoice from those line items and attempts payment against the default payment method.
  • You can pause, resume, or cancel it at any time, and for usage-based prices, report usage so the next invoice reflects it.
  • Want to test a year of billing in minutes? Test Clocks let you fast-forward simulated time so you can watch a subscription renew, without waiting for real months to pass.

Subscription Schedules are not supported, so a change can't be planned ahead. Change a plan when it should take effect by updating the subscription's line_items (proration_behavior decides how the rest of the period is billed), and preview the next invoice first. To end a subscription on a date, create it with end_on or set cancel_at_period_end. The subscription_schedule.* webhook events are reserved and never sent.

Pausing and canceling

  • Pause stops collecting payment until you resume: no invoice is collected, and pause_collection says what happens to the paused periods' invoices (void by default, or keep_as_draft / mark_uncollectible) and when collection resumes. As on Stripe, status stays active while collection is paused.
  • Cancel with cancel_at_period_end keeps the subscription running until cancel_at. Canceling at once ends it now and drops a scheduled cancel: cancel_at_period_end reads false and cancel_at null, while canceled_at keeps the time the scheduled cancel was asked for.
  • cancellation_details is always returned; reason, feedback and comment are null until recorded.

Common use cases

  • A SaaS monthly or annual plan that renews automatically.
  • A metered API subscription where the bill depends on usage reported during the period.
  • Giving a customer a free trial that transitions into a paid Subscription.

Works with

On this page