Skip to content
Book a demoContact usGet started

Get Subscription

client.subscriptions.retrieve(stringsubscriptionID, RequestOptionsoptions?): SubscriptionResource { id, cancels_at_end_of_cycle, current_period, 8 more }
get/subscriptions/{subscription_id}

Get Subscription

ParametersExpand Collapse
subscriptionID: string
ReturnsExpand Collapse
SubscriptionResource { id, cancels_at_end_of_cycle, current_period, 8 more }
id: string

The ID of the subscription.

cancels_at_end_of_cycle: boolean

Whether the subscription will be cancelled at the end of the current cycle.

current_period: CurrentPeriod | null

The current period of the subscription if it is active.

end: string
formatdate-time
start: string
formatdate-time
inclusive_end?: boolean
inclusive_start?: boolean
cycles_next_at: string | null

The date and time the next cycle of the subscription will start.

formatdate-time
effective_at: string

The date and time the subscription became effective.

formatdate-time
fixed_rate_quantities: Record<string, string>

The quantities of the fixed rates of the subscription.

metadata: Record<string, string>
rate_card_id: string

The ID of the rate card of the subscription.

rate_price_multipliers: Record<string, string>

The price multipliers of the rates of the subscription.

status: "active" | "cancelled" | "paused"

The status of the subscription.

Accepts one of the following:
"active"
"cancelled"
"paused"
subject_id: string

The ID of the subject that the subscription is for.

Get Subscription
import Lark from 'lark-billing';

const client = new Lark({
  apiKey: process.env['LARK_API_KEY'], // This is the default and can be omitted
});

const subscriptionResource = await client.subscriptions.retrieve('subscription_id');

console.log(subscriptionResource.id);
{
  "id": "rc_sub_PuLvkNSP3IBCvjayBD3TXNQ6",
  "cancels_at_end_of_cycle": false,
  "current_period": {
    "end": "2025-11-01T00:00:00Z",
    "start": "2025-10-01T00:00:00Z",
    "inclusive_end": false,
    "inclusive_start": true
  },
  "cycles_next_at": "2025-11-01T00:00:00Z",
  "effective_at": "2025-10-01T00:00:00Z",
  "fixed_rate_quantities": {
    "base_rate": "1"
  },
  "metadata": {},
  "rate_card_id": "rc_jQK2n0wutCj6bBcAIrL6o07g",
  "rate_price_multipliers": {},
  "status": "active",
  "subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE"
}
Returns Examples
{
  "id": "rc_sub_PuLvkNSP3IBCvjayBD3TXNQ6",
  "cancels_at_end_of_cycle": false,
  "current_period": {
    "end": "2025-11-01T00:00:00Z",
    "start": "2025-10-01T00:00:00Z",
    "inclusive_end": false,
    "inclusive_start": true
  },
  "cycles_next_at": "2025-11-01T00:00:00Z",
  "effective_at": "2025-10-01T00:00:00Z",
  "fixed_rate_quantities": {
    "base_rate": "1"
  },
  "metadata": {},
  "rate_card_id": "rc_jQK2n0wutCj6bBcAIrL6o07g",
  "rate_price_multipliers": {},
  "status": "active",
  "subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE"
}