curl --request GET \
--url https://api.example.com/v1/sdk/purchases/customer/{customerRef}{
"purchases": [
{
"reference": "pur_1A2B3C4D",
"customerRef": "cus_3C4D5E6F",
"customerEmail": "customer@example.com",
"productRef": "prd_1A2B3C4D",
"status": "active",
"amount": 9900,
"currency": "GBP",
"startDate": "<string>",
"isRecurring": true,
"createdAt": "<string>",
"productName": "API Gateway Manager",
"planSnapshot": {
"price": 2999,
"currency": "USD",
"planType": "recurring",
"reference": "pln_1A2B3C4D",
"billingCycle": "monthly",
"features": {},
"limits": {},
"meterRef": "mtr_1A2B3C4D",
"limit": 5000,
"freeUnits": 100,
"creditsPerUnit": 1
},
"originalAmount": 10000,
"exchangeRate": 1.3082,
"endDate": "<string>",
"paidAt": "<string>",
"usage": {
"used": 150,
"overageUnits": 0,
"overageCost": 0,
"periodStart": "2025-10-01T00:00:00Z",
"periodEnd": "2025-11-01T00:00:00Z"
},
"billingCycle": "weekly",
"nextBillingDate": "<string>",
"autoRenew": true,
"cancelledAt": "<string>",
"cancellationReason": "<string>",
"metadata": {}
}
]
}Retrieves all purchases for a specific customer. Useful for billing history and access checks.
curl --request GET \
--url https://api.example.com/v1/sdk/purchases/customer/{customerRef}{
"purchases": [
{
"reference": "pur_1A2B3C4D",
"customerRef": "cus_3C4D5E6F",
"customerEmail": "customer@example.com",
"productRef": "prd_1A2B3C4D",
"status": "active",
"amount": 9900,
"currency": "GBP",
"startDate": "<string>",
"isRecurring": true,
"createdAt": "<string>",
"productName": "API Gateway Manager",
"planSnapshot": {
"price": 2999,
"currency": "USD",
"planType": "recurring",
"reference": "pln_1A2B3C4D",
"billingCycle": "monthly",
"features": {},
"limits": {},
"meterRef": "mtr_1A2B3C4D",
"limit": 5000,
"freeUnits": 100,
"creditsPerUnit": 1
},
"originalAmount": 10000,
"exchangeRate": 1.3082,
"endDate": "<string>",
"paidAt": "<string>",
"usage": {
"used": 150,
"overageUnits": 0,
"overageCost": 0,
"periodStart": "2025-10-01T00:00:00Z",
"periodEnd": "2025-11-01T00:00:00Z"
},
"billingCycle": "weekly",
"nextBillingDate": "<string>",
"autoRenew": true,
"cancelledAt": "<string>",
"cancellationReason": "<string>",
"metadata": {}
}
]
}