Subscriptions

Overview

Subscriptions connect customers to plans for recurring access and billing. Each subscription tracks its billing cycle, trial period, cancellation status, and renewal schedule.

Subscriptions can be standard recurring, gift (donor or recipient), or membership-based with IP/domain authorization.


How It Works

  1. Create a subscription — Assign a customer to a plan with optional trial period and coupon
  2. Manage the lifecycle — Handle renewals, plan changes, pauses, and cancellations
  3. Track status — Monitor active, trialing, past_due, canceled, and expired states

Example: A customer subscribes to your Premium Monthly plan with a 14-day trial. After the trial, they’re automatically billed. Later, they upgrade to the Annual plan mid-cycle with prorated billing.


Subscription Object

AttributeTypeDescription
idintegerUnique identifier for the subscription
user_idintegerID of the customer who owns the subscription
planintegerID of the plan (expandable to full plan object)
addressintegerID of the shipping address (expandable)
couponintegerID of the applied coupon (expandable)
default_sourceintegerID of the default payment source (expandable)
latest_invoiceintegerID of the most recent invoice (expandable)
latest_churn_predictionobjectLatest churn prediction data, or null
statusstringSubscription status (see statuses below)
typestringSubscription type: regular, membership, gift_donor, gift_recipient, donation
is_membershipbooleanWhether this is a membership subscription
billingstringPayment collection method: charge_automatically or send_invoice
quantityintegerNumber of subscription quantities
auto_renewinteger1 if subscription will auto-renew, 0 otherwise
cancel_at_period_endinteger1 if subscription cancels at period end, 0 otherwise
cancel_attimestampUnix timestamp when subscription will cancel
canceled_attimestampUnix timestamp when subscription was canceled
cancel_reasonstringReason for cancellation
current_period_starttimestampUnix timestamp of current period start
current_period_endtimestampUnix timestamp of current period end
start_datetimestampUnix timestamp when subscription started
end_datetimestampUnix timestamp of fixed end date
ended_attimestampUnix timestamp when subscription ended
trial_starttimestampUnix timestamp when trial started
trial_endtimestampUnix timestamp when trial ends
expires_attimestampUnix timestamp when subscription expires
renews_attimestampUnix timestamp of next renewal
days_until_dueintegerDays until payment is due
sourcestringAcquisition source label (e.g. api, web, phone)
is_gift_donorbooleanWhether this is a gift from a donor
is_gift_recipientbooleanWhether this is a received gift
gift_codestringGift redemption code (auto-generated for donors)
is_redeemedbooleanWhether gift has been redeemed
gift_donor_subscription_idintegerID of the donor’s subscription
is_importedbooleanWhether subscription was imported
old_provider_idstringExternal system reference ID
ip_addressesarrayAuthorized IP addresses (membership only)
domainsarrayAuthorized email domains (membership only)
shipments_remainingintegerRemaining shipments in the period
shipments_undeliverablebooleanWhether shipments are undeliverable
shipments_suspended_untiltimestampUnix timestamp until shipments are suspended
address_requiredbooleanWhether shipping address is required by the plan’s product
recommended_plan_idintegerID of recommended plan for upgrade
vendor_tip_amountintegerVendor tip amount
scheduleobjectSubscription schedule object (phases, end behavior)
metadataobjectKey-value pairs for storing additional data
createdtimestampUnix timestamp of creation

API Endpoints

MethodEndpointDescription
GET/api/v1/core/subscriptionsList subscriptions
POST/api/v1/core/subscriptionsCreate subscription
GET/api/v1/core/subscriptions/{id}Get subscription
PUT/api/v1/core/subscriptions/{id}Update subscription
DELETE/api/v1/core/subscriptions/{id}Cancel subscription
POST/api/v1/core/subscriptions/renewRenew subscription
POST/api/v1/core/subscriptions/redeemRedeem gift subscription
DELETE/api/v1/core/subscriptions/{id}/phasesDelete phase

Subscription Statuses

StatusDescription
activeSubscription is active and paid
trialingCustomer is in trial period
scheduledSubscription is scheduled to start in the future
pending_paymentAwaiting initial payment confirmation
past_duePayment failed, awaiting retry
canceledSubscription was canceled
unpaidPayment failed after all retries
incompleteInitial payment failed, awaiting completion
incomplete_expiredInitial payment window expired
extendedSubscription extended beyond normal period