Skip to main content
const { result, error } = await unprice.subscriptions.get({
  customerId: "cus_1234567890"
});

if (error) {
  console.error(error.message);
  return;
}

console.log(result);
{
  "id": "sub_1234567890",
  "customerId": "cus_1234567890",
  "status": "active",
  "active": true
}

Request

customerId
string
required
The customer ID to load a subscription for.
projectId
string
Optional project ID. Only main-project keys can request another project.

Response

Returns the customer subscription with project, customer, and active phase details.