v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Purchases

List purchases for a user

Returns a paginated list of purchases for the specified user. Purchases are ordered by purchase date (newest first). Supports cursor-based pagination and optional platform filtering.

get/users/{user_id}/purchases

Path parameters

user_idstring required

The user identifier.

Query parameters

limitinteger

Maximum number of purchases to return. Min 1, max 100.

starting_afterstring

Cursor for pagination. Pass the id of the last purchase from the previous page to fetch the next page.

filter[platform]string[]

Filter purchases by platform. Repeat the query parameter to match multiple platforms (OR logic). Example: ?filter[platform]=app_store&filter[platform]=stripe.

Response

A paginated list of purchases.

object'list' required
urlstring required
has_moreboolean required
next_cursorstring nullable

ID to pass as starting_after on the next request. Present only when has_more is true; otherwise null.

Example response

{
  "object": "list",
  "url": "/v4/users/user_abc123/purchases",
  "has_more": false,
  "next_cursor": null,
  "data": [
    {
      "object": "purchase",
      "id": "12345",
      "url": "/v4/users/user_abc123/purchases/12345",
      "user_id": "user_abc123",
      "platform": "app_store",
      "product_id": "com.example.monthly",
      "currency": "USD",
      "price": "9.99",
      "purchased_at": "2025-04-01T10:30:00Z",
      "expires_at": "2025-05-01T10:30:00Z",
      "is_auto_renewing": true,
      "store_data": {
        "transaction_id": "2000000123456789",
        "original_transaction_id": "2000000123456789",
        "product_id": "com.example.monthly"
      },
      "created_at": "2025-04-01T10:30:00Z"
    }
  ]
}