Subscriptions
Retrieve a Subscription
Retrieves a Subscription by its ID
get/subscriptions/{id}
Path parameters
idstring required
Response
OK
Example response
{
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "sub_2QC7PqoUeOxQEWscJJt6B3PkvyL",
"status": "active",
"autoBillingEnabled": true,
"autoBillingDisabledReason": "subscription_cancelled",
"cancelAtPeriodEnd": true,
"cancelAtCycle": 2,
"currentCycle": 1,
"billingSettings": {
"captureDelay": 3
},
"upcomingInvoice": {
"amount": 1500,
"currency": "usd",
"periodStart": "2023-01-01T00:00:00Z",
"periodEnd": "2023-01-31T23:59:59Z",
"statementDescriptor": "SUBSCRIPTION",
"comment": "Invoice for subscription 123, period January 2023"
},
"customer": {
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "cus_2QC7PqoUeOxQEWscJJt6B3PkvyL",
"email": "user@gmail.com",
"name": "John Doe",
"phoneNumber": "+1234567890",
"dateOfBirth": "2020-01-01",
"gender": "male",
"restrictReason": "Customer restricted due to suspicious activity",
"isRestricted": true
},
"price": {
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "price_2R4e2xDqbww8ewmkIYWE1A6Zcfp",
"type": "recurring",
"active": true,
"name": "My Digital Subscription",
"amount": 1500,
"quantity": 1,
"currency": "usd",
"product": {
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "prod_2QC7PqoUeOxQEWscJJt6B3PkvyL",
"active": true,
"name": "My product",
"description": "Best selling product",
"statementDescriptor": "Face Yoga subscription",
"category": "digital",
"sku": "FY-YOGA-MAT-01"
},
"billingSchedule": {
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "bsch_2QC7PqoUeOxQEWscJJt6B3PkvyL",
"currency": "usd",
"cycleDefinitions": [
{
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"position": 1,
"amount": 1500,
"currency": "usd"
}
]
},
"recurringSchedule": {
"intervalUnit": "month",
"intervalCount": 1,
"trial": {
"intervalUnit": "day",
"intervalCount": 7,
"amount": 199
}
}
},
"invoices": [
{
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"status": "open",
"voidedReason": "Grace period expired",
"comment": "This is a comment for the invoice",
"amount": 999,
"currency": "usd",
"type": "setup",
"number": "2W12-1004",
"customer": {
"createdAt": "2024-02-18T12:00:00Z",
"updatedAt": "2024-02-21T12:15:00Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"id": "cus_2QC7PqoUeOxQEWscJJt6B3PkvyL",
"email": "user@gmail.com",
"name": "John Doe",
"phoneNumber": "+1234567890",
"dateOfBirth": "2020-01-01",
"gender": "male",
"restrictReason": "Customer restricted due to suspicious activity",
"isRestricted": true
}
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.