Purchases
List purchases for provider
Retrieves all purchases for the authenticated provider with optional filtering by status, product, or customer.
get/v1/sdk/purchases
Query parameters
status'pending' | 'active' | 'trialing' | 'past_due' | 'cancelled' | 'expired' | 'suspended' | 'refunded'
Filter by purchase status
productRefstring
Filter by product reference
customerRefstring
Filter by customer reference
includeFreeboolean
Include free recurring purchases and free auto-enrollments (default true)
Response
Purchases retrieved successfully
Example response
{
"purchases": [
{
"amount": 9900,
"currency": "GBP",
"customerEmail": "customer@example.com",
"customerRef": "cus_3C4D5E6F",
"exchangeRate": 1.3082,
"isRecurring": true,
"originalAmount": 10000,
"planSnapshot": {
"billingCycle": "monthly",
"creditsPerUnit": 1,
"currency": "USD",
"freeUnits": 100,
"limit": 5000,
"meterRef": "mtr_1A2B3C4D",
"name": "Pro Monthly",
"planType": "recurring",
"price": 2999,
"reference": "pln_1A2B3C4D"
},
"productName": "API Gateway Manager",
"productRef": "prd_1A2B3C4D",
"reference": "pur_1A2B3C4D",
"status": "active",
"usage": {
"periodEnd": "2025-11-01T00:00:00Z",
"periodStart": "2025-10-01T00:00:00Z",
"used": 150
}
}
]
}