Get subscription by ID

📘

API Refs

Path parameters

NameTypeDescriptionRequired
idstringStripeSubscriptionIDyes

Response body

Main Response Fields

FieldTypeDescription
idstringSubscription ID
stripeCustomerIdstringStripe customer ID
customerEmailstringCustomer email
statusstringSubscription status
currentPeriodStartstringCurrent period start (ISO 8601)
currentPeriodEndstringCurrent period end (ISO 8601)
planobjectSubscription plan details
subscriptionPricingobjectSubscription pricing with fees breakdown (optional)
invoicesarrayAssociated invoices array (optional)

Plan Object

FieldTypeDescription
stripePriceIdstringStripe price ID
namestringPlan display name
amountnumberPrice amount in cents
currencystringCurrency code (e.g., "usd")
intervalstringBilling frequency unit (day, week, month, year)
intervalCountnumberFrequency multiplier

Invoice Summary Object (in invoices array)

FieldTypeDescription
idnumberInvoice ID
statusstringInvoice status
grossPremiumnumberGross premium amount
commissionnumberCommission amount
netPremiumnumberNet premium amount
serviceFeenumberService fee
policyIdstringPolicy ID (nullable)
effectiveDatestringEffective date (ISO 8601)
expirationDatestringExpiration date (ISO 8601)
createdAtstringInvoice creation date (ISO 8601)

Response

{
  "id": "sub_ExampleSubscription789",
  "stripeCustomerId": "cus_ExampleCustomerID123",
  "customerEmail": "[email protected]",
  "status": "active",
  "currentPeriodStart": "2024-01-01T00:00:00.000Z",
  "currentPeriodEnd": "2024-02-01T00:00:00.000Z",
  "plan": {
    "stripePriceId": "price_ExamplePriceID456",
    "name": "Premium Auto Insurance",
    "amount": 4999,
    "currency": "usd",
    "interval": "month",
    "intervalCount": 1
  },

  "invoices": [
    {
      "id": 98765,
      "status": "paid",
      "grossPremium": 49.99,
      "commission": 5.0,
      "netPremium": 44.99,
      "serviceFee": 2.5,
      "policyId": "POL-2024-001",
      "effectiveDate": "2024-01-01T00:00:00.000Z",
      "expirationDate": "2024-02-01T00:00:00.000Z",
      "createdAt": "2024-01-01T00:00:00.000Z"
    }
  ]
}

Description

This endpoint retrieves detailed information about a specific subscription. Use this to check subscription status, view billing details, or get information about the associated customer and plan. The response includes comprehensive details about the subscription's current state, billing schedule, and associated invoices.