Skip to main content
GET
/
v1
/
ui
/
purchases
Get all purchases for provider
curl --request GET \
  --url https://api.example.com/v1/ui/purchases
{
  "purchases": [
    {
      "id": "507f1f77bcf86cd799439011",
      "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>",
      "productId": "507f1f77bcf86cd799439012",
      "productName": "API Gateway Manager",
      "planSnapshot": {
        "price": 2999,
        "currency": "USD",
        "planType": "recurring",
        "reference": "pln_1A2B3C4D",
        "billingCycle": "monthly",
        "features": {},
        "limits": {},
        "meterId": "507f1f77bcf86cd799439011",
        "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": {}
    }
  ]
}

Query Parameters

status
enum<string>

Filter by status

Available options:
pending,
active,
trialing,
past_due,
cancelled,
expired,
suspended,
refunded
productId
string

Filter by product ID

customerId
string

Filter by customer ID

Response

200 - application/json

Purchases retrieved successfully

purchases
object[]