Path Parameters
Unique identifier of the subscription.Example: "sub_x1y2z3a4b5c6d7e8f9g0"
Response
Unique identifier for the subscription.
Current subscription status.Values: "ACTIVE", "CANCELLED", "INCOMPLETE", "EXPIRED", "PAUSED", "DRAFT"
Three-letter ISO currency code.
Billing frequency.Values: "IN_ADVANCE", "IN_ARREARS"
Billing period unit.Values: "DAY", "WEEK", "MONTH", "QUARTER", "YEAR"
Number of billing periods per cycle.
ISO 8601 timestamp of the billing anchor date.
Billing cycle type.Values: "ANNIVERSARY", "CALENDAR"
ISO 8601 timestamp when subscription starts.
ISO 8601 timestamp when subscription ends (if set).
ISO 8601 timestamp of current billing period start.
ISO 8601 timestamp of current billing period end.
ISO 8601 timestamp when subscription was cancelled (if applicable).
ISO 8601 timestamp when subscription will be cancelled (if scheduled).
Whether subscription will cancel at period end.
ISO 8601 timestamp of trial start (if applicable).
ISO 8601 timestamp of trial end (if applicable).
Current pause status.Values: "NONE", "PAUSED"
Minimum committed amount (if set).
Commitment duration (if set).
Overage multiplier (if set).
Whether true-up fee is enabled.
Payment handling behavior.
Invoice collection method.
Parent subscription ID (if part of hierarchy).
Payment terms for invoices.
Subscription version number.
ISO 8601 timestamp when the subscription was created.
ISO 8601 timestamp when the subscription was last updated.
Array of associated coupons.
Array of subscription phases.
Example Request
curl --request GET \
--url https://api.flexprice.io/v1/subscriptions/sub_x1y2z3a4b5c6d7e8f9g0 \
--header 'Authorization: Bearer <token>'
Example Response
{
"id": "sub_x1y2z3a4b5c6d7e8f9g0",
"customer_id": "cust_a1b2c3d4e5f6g7h8i9j0",
"plan_id": "plan_a1b2c3d4e5f6g7h8i9j0",
"subscription_status": "ACTIVE",
"currency": "usd",
"billing_cadence": "IN_ADVANCE",
"billing_period": "MONTH",
"billing_period_count": 1,
"billing_anchor": "2024-03-20T00:00:00Z",
"billing_cycle": "ANNIVERSARY",
"start_date": "2024-03-20T00:00:00Z",
"current_period_start": "2024-03-20T00:00:00Z",
"current_period_end": "2024-04-20T00:00:00Z",
"cancel_at_period_end": false,
"pause_status": "NONE",
"overage_factor": "1.0",
"enable_true_up": false,
"payment_behavior": "DEFAULT_ACTIVE",
"collection_method": "CHARGE_AUTOMATICALLY",
"customer_timezone": "UTC",
"proration_behavior": "NONE",
"metadata": {
"source": "website"
},
"version": 1,
"created_at": "2024-03-20T15:04:05Z",
"updated_at": "2024-03-20T15:04:05Z",
"plan": {
"id": "plan_a1b2c3d4e5f6g7h8i9j0",
"name": "Pro Plan"
},
"customer": {
"id": "cust_a1b2c3d4e5f6g7h8i9j0",
"name": "Acme Corporation"
}
}