API reference · Commerce
Purchases
Read completed and in-progress purchase history without exposing payment credentials or refund actions.
Endpoints2
Primary objectPurchaseObject
Tenant boundaryCredential studio
GET
/purchasesList purchases
Lists purchase history, optionally for one member, and respects location restrictions.
- Required scope
purchases:read- Success
200- Response
Page<PurchaseObject>
Parameters
member_idqueryuuidReturn purchases for one member.
cursorqueryuuidOpaque cursor returned by the previous page. Pass it back unchanged.
limitqueryintegerNumber of records to return. Defaults to 50; maximum 200.
Example request
curl -X GET "https://api.getclassflow.com/partner/v1/purchases" \
-H "X-ClassFlow-Key: $CLASSFLOW_API_KEY"Example response
200 · application/json
{
"object": "list",
"data": [{
"id": "a9ef2870-a454-4e38-bc73-5dd72b820a55",
"object": "purchase",
"member_id": "5fef0f5c-2165-48e0-a730-9c066eb37f9a",
"product_key": "five-class-pack",
"product_type": "package",
"quantity": 1,
"amount_total": "165.00",
"currency": "USD",
"status": "completed",
"created_at": "2026-08-02T21:02:00Z"
}],
"has_more": false,
"next_cursor": null
}GET
/purchases/{purchase_id}Retrieve a purchase
Returns one purchase. This API does not expose payment credentials or refund mutation endpoints.
- Required scope
purchases:read- Success
200- Response
PurchaseObject
Parameters
purchase_idpathrequireduuidThe stable ClassFlow identifier for the purchase.
Example request
curl -X GET "https://api.getclassflow.com/partner/v1/purchases/YOUR_PURCHASE_ID" \
-H "X-ClassFlow-Key: $CLASSFLOW_API_KEY"Example response
200 · application/json
{
"id": "a9ef2870-a454-4e38-bc73-5dd72b820a55",
"object": "purchase",
"member_id": "5fef0f5c-2165-48e0-a730-9c066eb37f9a",
"product_key": "five-class-pack",
"product_type": "package",
"quantity": 1,
"amount_total": "165.00",
"currency": "USD",
"status": "completed",
"created_at": "2026-08-02T21:02:00Z"
}Object schema
PurchaseObject
iduuidStable purchase identifier.
member_iduuidPurchasing member.
product_iduuid | nullPurchased product when linked.
amount_totaldecimal | nullRecorded purchase total.
currencystring | nullISO currency code.
refunded_amountdecimal | nullRead-only historical refunded amount.
statusstring | nullPurchase status.