getUserSubscriptions
Retrieve a member's subscription history: membership plan, billing cycle, next due date, status, and past subscriptions. Requires user ID or client ID.
Instructions
Get member subscriptions (membership plan history) - Fetch the subscription / membership-plan history for a specific member. Read-only. Backed by the WHMCS billing integration.
Required: exactly one of user_id (standard — the BD member ID) OR client_id (power-user — the WHMCS billing record ID stored on the user as users_data.clientid). Default to user_id; reach for client_id only when you already have one in hand and want to bypass the user lookup.
Empty result with misleading error: if the member has no billing record yet (never enrolled in any paid plan), BD returns HTTP 400 + {status:"error", message:"user_id or client_id is required"} even though the identifier WAS sent. The error wording is BD's, not the wrapper's. Treat that exact error message on this endpoint as "no billing data for this member" rather than "missing parameter".
Use when: checking a member's current membership plan, their billing cycle (Monthly/Yearly), next due date, plan upgrade history, whether auto-renewal is on, or past canceled subscriptions.
See also: getUserTransactions (invoice-level billing records - different resource), getUser (member profile - profile-level subscription references subscription_id), listMembershipPlans (all plan definitions on the site).
Returns: { status: "success", message: { total: <count>, subscriptions: [{...subscription records}] } }. Each subscription includes id, userid, packageid (membership plan ID), regdate, nextduedate, billingcycle (e.g. Monthly, Yearly), paymentmethod, amount, domainstatus (Active, Cancelled, etc.), and related fields. NOT a simple list of rows - the message is an object containing subscriptions as the array.
Reference support articles:
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | Member ID (the standard input). Pass this OR `client_id`. | |
| client_id | No | WHMCS billing record ID. Power-user alternative to `user_id`. Pass this OR `user_id`. |