Purchases
Get purchases for a customer
Changed onRetrieves all purchases for a specific customer. Useful for billing history and access checks.
get/v1/sdk/purchases/customer/{customerRef}
Request
- Base URLhttps://api.solvapay.com
- AuthHTTP bearer
- TypeScripthttps://skmtc.dev/solvapay/apis/solvapay-rest-api/docs/v1/sdk/purchases/customer/:customerRef/get.tsA function with typed inputs. Its response is checked against the schema.
Path parameters
customerRefstring required
Example:cus_3C4D5E6F
Customer reference or ID
Query parameters
includeFreeboolean
Include free auto-enrollments (default true for customer-scoped views)
Response
Customer purchases retrieved successfully
Example response
{
"purchases": [
{
"amount": 9900,
"cancellationReason": "Customer request",
"cancelledAt": "2025-10-28T10:00:00Z",
"currency": "GBP",
"customerEmail": "customer@example.com",
"customerRef": "cus_3C4D5E6F",
"endDate": "2025-11-27T10:00:00Z",
"exchangeRate": 1.32,
"isRecurring": true,
"origin": "paid",
"originalAmount": 7500,
"planRef": "pln_abc123",
"planSnapshot": {
"currency": "USD",
"isMetered": true,
"name": "Pro Monthly",
"price": 2999,
"reference": "pln_1A2B3C4D"
},
"productName": "API Gateway Manager",
"productRef": "prd_abc123",
"reference": "pur_1A2B3C4D",
"startDate": "2025-10-27T10:00:00Z",
"status": "active",
"usage": {
"periodEnd": "2025-11-01T00:00:00Z",
"periodStart": "2025-10-01T00:00:00Z"
}
}
]
}Changes
- info
added to the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status
- info
- info
added the optional property
//to the response with the status - info
added the optional property
///////to the response with the status
- info