GET
/
v1
/
customer
/
{customerId}
/
getSubscription
curl --request GET \
  --url https://api.unprice.dev/v1/customer/{customerId}/getSubscription \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "projectId": "<string>",
  "createdAtM": 123,
  "updatedAtM": 123,
  "customerId": "<string>",
  "status": "idle",
  "active": true,
  "planSlug": "<string>",
  "timezone": "<string>",
  "locked": true,
  "lockedAt": 123,
  "currentCycleStartAt": 123,
  "currentCycleEndAt": 123,
  "previousCycleStartAt": 123,
  "previousCycleEndAt": 123,
  "invoiceAt": 123,
  "renewAt": 123,
  "endAt": 123,
  "lastRenewAt": 123,
  "lastInvoiceAt": 123,
  "metadata": {
    "reason": "payment_failed",
    "note": "<string>",
    "dates": {
      "lastChangeAt": 123,
      "cancelAt": 123
    }
  },
  "project": {
    "enabled": true
  },
  "customer": {
    "active": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerId
string
required

The customer ID

Example:

"cus_1H7KQFLr7RepUyQBKdnvY"

Response

200
application/json

The result of the get subscription

The response is of type object.