Subscription Data Reference

Subscription Events manage changes in a patient’s subscription status, including activation, pauses, cancellations, and renewals. The event payload contains all relevant details about the subscription, the patient, the product, and its billing phases.

Subscription Event Payload

This payload is a representation of a subscription trigger event.

The payload is based on a subscription.upcoming-renewal event, but is relevant for all subscription-based trigger statuses. See the Workflow Events/Triggers article for a full list of available events.

{
    "_id": "6803189d5fa95de751809d9a",
    "organization": "your_org",
    "customer": {
        "_id": "67db225426518e7646bd28e9",
        "email": "your_email@example.com",
        "phone": "+1-XXX-XXX-XXXX",
        "firstName": "Jhon",
        "lastName": "Doe"
    },
    "product": "6740b2cfe34bda25c01b2108",
    "phases": [
        {
            "price": 658,
            "cycles": "1",
            "requirements": [
                {
                    "type": "qnr",
                    "key": "facesheet"
                },
                {
                    "type": "qnr",
                    "key": "facesheet_ext"
                },
                {
                    "type": "qnr",
                    "key": "wlus"
                },
                {
                    "type": "qnr",
                    "key": "govId"
                },
                {
                    "type": "qnr",
                    "key": "selfie"
                },
                {
                    "type": "qnr",
                    "key": "bodySelfie"
                }
            ],
            "fillingCycleInterval": 1,
            "fillingCycleUnit": "month",
            "billableCycleInterval": 1
        },
        {
            "price": 0,
            "cycles": "2",
            "requirements": [
                {
                    "type": "qnr",
                    "key": "wlusmonthly"
                },
                {
                    "type": "qnr",
                    "key": "bodySelfie"
                }
            ],
            "fillingCycleInterval": 1,
            "fillingCycleUnit": "month",
            "billableCycleInterval": 1
        },
        {
            "price": 349,
            "cycles": 1,
            "requirements": [
                {
                    "type": "qnr",
                    "key": "wlusmonthly"
                },
                {
                    "type": "qnr",
                    "key": "bodySelfie"
                }
            ],
            "fillingCycleInterval": 1,
            "fillingCycleUnit": "month",
            "billableCycleInterval": 1
        },
        {
            "price": 349,
            "cycles": 0,
            "requirements": [
                {
                    "type": "qnr",
                    "key": "wlusmonthly"
                },
                {
                    "type": "qnr",
                    "key": "bodySelfie"
                }
            ],
            "fillingCycleInterval": 4,
            "fillingCycleUnit": "week",
            "billableCycleInterval": 1,
            "billingCycleInterval": null,
            "billingCycleUnit": "week"
        }
    ],
    "currentCycle": 4,
    "nextCycleDate": "2025-08-14T18:21:14.150Z",
    "status": "active",
    "statusHistory": [
        {
            "prevStatus": "active",
            "newStatus": "cancelled",
            "updatedAt": "2025-08-07T15:56:26.833Z",
            "userId": "customer"
        }
    ],
    "currency": "USD",
    "meta": {
        "initialTransactionId": "transaction_id"
    },
    "createdAt": "2025-04-19T03:29:33.581Z",
    "updatedAt": "2025-07-14T18:21:14.151Z",
    "__v": 0,
    "nextCycleOverrides": null,
    "upcomingReminderDate": "2025-08-07T18:21:14.150Z"
}

Properties Descriptions

The table below describes the parameters of the payload.

Property

Type

Description

_id

string

The unique identifier for the subscription.

organization

string

The identifier for the organization the subscription belongs to.

customer

object

An object containing details about the patient.

customer._id

string

The unique identifier for the patient.

customer.email

string

The patient's email address.

customer.phone

string

The patient's phone number.

customer.firstName

string

The patient's first name.

customer.lastName

string

The patient's last name.

product

string

The unique identifier for the product associated with the subscription.

phases

array

An array of objects detailing the different phases and cycles of the subscription.

phases.price

number

The price for this phase of the subscription.

phases.cycles

number

The number of cycles for this phase.

phases.requirements

array

An array of objects outlining the requirements for the phase.

phases.requirements.type

string

The type of requirement (e.g., qnr for questionnaire).

phases.requirements.key

string

The specific key for the requirement.

phases.fillingCycleInterval

number

Combined with fillingCycleUnit it will determine the length of the cycle. For example:
- 1 and month, the cycle will be 1 month long.
- 4 and week the cycle will be 4 weeks long

phases.fillingCycleUnit

string

The unit of time for the filling cycle interval (e.g., month, week).

phases.billableCycleInterval

number

The interval for billing cycles.
- If 1 will bill every cycle.
- If 2 will bill every other cycle

currentCycle

number

The current cycle number of the subscription.

nextCycleDate

string

The date and time when the next cycle is scheduled to start, in ISO format.

status

string

The current status of the subscription (e.g., active, paused, cancelled).

statusHistory

array

A chronological list of status changes.

statusHistory[].prevStatus

string

The previous status of the subscription.

statusHistory[].newStatus

string

The new status of the subscription.

statusHistory[].updatedAt

string

The timestamp when the status was updated.

statusHistory[].userId

string

The user who initiated the status change. “customer” is used when the patient initiates the update.

currency

string

The currency used for the subscription (e.g., USD).

meta

object

An object for metadata, such as transaction IDs.

meta.initialTransactionId

string

The ID of the initial transaction.

createdAt

string

The timestamp when the subscription was created.

updatedAt

string

The timestamp when the subscription was last updated.

__v

number

The version key, used for internal tracking.

nextCycleOverrides

null

A field for any overrides for the next cycle.

upcomingReminderDate

string

The date for the next upcoming reminder.