curl --request GET \
--url https://api.example.com/v1/sdk/purchases/{purchaseRef}{
"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 a single purchase including plan snapshot, usage, and billing details.
curl --request GET \
--url https://api.example.com/v1/sdk/purchases/{purchaseRef}{
"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": {}
}Purchase reference or ID
"pur_1A2B3C4D"
Purchase retrieved successfully
Purchase reference
"pur_1A2B3C4D"
Customer reference
"cus_3C4D5E6F"
Customer email
"customer@example.com"
Product reference
"prd_1A2B3C4D"
Purchase status
"active"
Amount in USD cents (normalised for aggregation)
9900
Original payment currency code
"GBP"
Start date
Is recurring
true
Created at
Product name
"API Gateway Manager"
Plan snapshot at time of purchase (null for credit topups)
Show child attributes
Original amount in the payment currency (cents/pence)
10000
Exchange rate from original currency to USD
1.3082
End date
Paid at timestamp
Usage billing state for usage-based plans
Show child attributes
Billing cycle
weekly, monthly, quarterly, yearly Next billing date
Auto-renew enabled
Cancelled at
Cancellation reason
Arbitrary metadata attached to the purchase