Business
Package purchases
Each checkout a client completed for one of your packages, paid or free.
A package purchase is one checkout a client completed for one of your packages, paid or free, with the package's name as it was then and what the client paid. A purchase isn't revenue: renewals and refunds aren't purchases. Purchases made before this API launched aren't recorded.
Attributes
- idstring
Its unique ID.
- clientobject
- packageobject
- amountinteger
What the client paid at checkout, in the currency's minor units (cents, or thousandths for KWD and BHD), as Stripe's amounts are.
0for a free package, a free trial or a full discount. - currencystring
ISO 4217, lowercase, e.g.
usd. - freeboolean
Whether the package was free. A paid package bought on a free trial or with a full discount is
false, with anamountof0. - purchasedAttimestamp
{
"id": "6ad6afb04b9e86b14ba019ae",
"client": {
"id": "6ad6af41d3199442d31b2743",
"name": "Jordan Miller"
},
"package": {
"id": "6ad6afd1a10559d0a103c6cf",
"name": "12-week online coaching"
},
"amount": 14900,
"currency": "usd",
"free": false,
"purchasedAt": "2026-10-26T14:32:05.000Z"
}https://api.hubfit.com/v1/package-purchasesPackages your clients bought, most recent first. Across every client you can reach (team members with the Standard role only see their assigned clients), or one client's with clientId. To pick up new purchases, read from the newest and stop at one you've seen before. Requires clients:read.
Query parameters
- clientIdstring
Only this client's purchases.
- startDatedate
Only purchases from this day, included, as
YYYY-MM-DD, in your own calendar (the timezone in your HubFit settings). - endDatedate
Only purchases up to this day, included, as
YYYY-MM-DD, in your own calendar. - limitinteger
How many results to return, from 1 to 100.
Default25 - cursorstring
The
nextCursorfrom the previous page.
Returns
A page of package purchases.
curl -G https://api.hubfit.com/v1/package-purchases \
-H "Authorization: Bearer $HUBFIT_API_KEY" \
-d startDate=2026-10-01const response = await fetch("https://api.hubfit.com/v1/package-purchases?startDate=2026-10-01", {
headers: {
Authorization: `Bearer ${process.env.HUBFIT_API_KEY}`,
},
});
const { data, nextCursor } = await response.json();import os
import requests
response = requests.get(
"https://api.hubfit.com/v1/package-purchases",
headers={"Authorization": f"Bearer {os.environ['HUBFIT_API_KEY']}"},
params={
"startDate": "2026-10-01",
},
)
page = response.json()
data, next_cursor = page["data"], page["nextCursor"]{
"data": [
{
"id": "6ad6afb04b9e86b14ba019ae",
"client": {
"id": "6ad6af41d3199442d31b2743",
"name": "Jordan Miller"
},
"package": {
"id": "6ad6afd1a10559d0a103c6cf",
"name": "12-week online coaching"
},
"amount": 14900,
"currency": "usd",
"free": false,
"purchasedAt": "2026-10-26T14:32:05.000Z"
}
],
"nextCursor": "eyJpZCI6IjZhZDZhZjNmMjljNTk3ZjE1In0",
"totalCount": 48
}https://api.hubfit.com/v1/package-purchases/{purchaseId}One package purchase, such as the one a package_purchase.created webhook names. Requires clients:read.
curl https://api.hubfit.com/v1/package-purchases/6ad6afb04b9e86b14ba019ae \
-H "Authorization: Bearer $HUBFIT_API_KEY"const response = await fetch("https://api.hubfit.com/v1/package-purchases/6ad6afb04b9e86b14ba019ae", {
headers: {
Authorization: `Bearer ${process.env.HUBFIT_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://api.hubfit.com/v1/package-purchases/6ad6afb04b9e86b14ba019ae",
headers={"Authorization": f"Bearer {os.environ['HUBFIT_API_KEY']}"},
)
data = response.json()["data"]{
"data": {
"id": "6ad6afb04b9e86b14ba019ae",
"client": {
"id": "6ad6af41d3199442d31b2743",
"name": "Jordan Miller"
},
"package": {
"id": "6ad6afd1a10559d0a103c6cf",
"name": "12-week online coaching"
},
"amount": 14900,
"currency": "usd",
"free": false,
"purchasedAt": "2026-10-26T14:32:05.000Z"
}
}Subscribe a webhook endpoint to hear about these as they happen, instead of polling. An event carries the record's id and its clientId, not the record: fetch it with your key. See Webhooks.
- package_purchase.createdA client bought a package.
