Retrieves the subscription with the given ID.
Use a Bearer token to access this API.
"obj_01EXAMPLE00000000000000000"
Filter by customer ID.
"obj_01EXAMPLE00000000000000000"
If true, expands the customer object in the response.
false
Filter by time interval in days (e.g., 30 for last 30 days).
x >= 0"month"
A cursor for use in pagination. starting_after is a subscription ID that defines your place in the list. For instance, if you make a list request and receive 20 subscriptions, ending with fsub_xyz, your subsequent call can include starting_after=fsub_xyz to fetch the next page.
"obj_01EXAMPLE00000000000000000"
A cursor for use in pagination. ending_before is a subscription ID that defines your place in the list. For instance, if you make a list request and receive 20 subscriptions, starting with fsub_abc, your subsequent call can include ending_before=fsub_abc to fetch the previous page.
"obj_01EXAMPLE00000000000000000"
Filter by subscription status (e.g., active, canceled, past_due).
incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, paused "incomplete"
Number of objects to skip before returning results.
x >= 00
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
x >= 010
Comma-separated list of related objects to expand in the response.
Success
{
"subscription_id": "obj_01EXAMPLE00000000000000000",
"created_at": "2024-01-01T00:00:00Z",
"items": [
{
"subscription_item_id": "obj_01EXAMPLE00000000000000000",
"quantity": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"test_mode": false
}
],
"latest_invoice": "string",
"customer": "string",
"status": "incomplete",
"cancel_at_period_end": false,
"current_period_end": "string",
"current_period_start": "string",
"metadata": {},
"test_mode": false,
"client_secret": {
"setup_secret": "string",
"payment_secret": "string"
},
"proration_behavior": "always_invoice",
"trial_start": "string",
"trial_end": "string",
"cancel_at": "2024-01-01T00:00:00Z",
"default_payment_method": "string"
}