We offer an easy way for developers to validate and load purchases.

Get all the purchases of your products

cURL
GET /api.sidedish.dev/purchases
-H X-Sidedish-API-Key=sidedish account token of the merchant of the product
-H X-Sidedish-Store-Id= specific store id
productId
string

The id of the product. Limit results to specific product.

userId
string

The id of the user. Limit results to specific user.

type
string

The type of purchase. Limit results to specific type [one-time, subscription]

active
boolean

Limit results to active subscriptions or unconsumed products

In order to check if a user has bought the service you query this with a specific product and user. Then filter results for an active purchase.

{
    "purchases":  [
        {
            "id": "5f8d0f0a-d8a0-4f5e-a2d7-e2e0e8e9e8e7",
            "active": true,
            "type": "subscription",
            "productId": "5f8d0f0a-d8a0-4f5e-a2d7-e2e0e8e9e8e7",
            "userId": "5f8d0f0a-d8a0-4f5e-a2d7-e2e0e8e9e8e7",
        }
    ]
}