Events

The event object, the recent event stream, and every event type.

Every meaningful change in CashSDK — a purchase, a renewal, a refund, an entitlement change — produces an event. Events are delivered to your webhook endpoints and are also queryable as a recent stream for debugging and reconciliation.

The event object#

idstring

Unique identifier, prefixed with evt_. Stable across webhook retries — use it to deduplicate.

typestring

The event type, e.g. purchase.completed. See the table below.

created_atstring

ISO 8601 timestamp of when the event occurred.

dataobject

The event payload. Its shape depends on type — for a purchase it carries the transaction, for an entitlement change it carries the affected entitlement and app_user_id.

Event types#

TypeWhen it fires
purchase.completedAn initial purchase was validated.
subscription.renewedA subscription auto-renewed for another period.
subscription.canceledA subscriber turned off auto-renew (access continues until expiry).
subscription.expiredA subscription lapsed and access ended.
trial.startedA free trial or intro offer began.
refund.issuedThe store issued a refund for a transaction.
entitlement.grantedAn entitlement became active for a customer.
entitlement.revokedAn entitlement was removed or expired for a customer.

List recent events#

GET /v1/apps/{app}/events

Returns the app's recent events, newest first. Supports limit and cursor pagination.

appstringrequired

The app ID.

typestring

Filter to a single event type, e.g. purchase.completed.

limitinteger

Page size, up to 100.

cursorstring

Cursor from the previous page's next_cursor.

bash
curl "https://api.cashsdk.com/v1/apps/app_2mK4pQ/events?type=purchase.completed" \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "data": [
    {
      "id": "evt_5b9d2e",
      "type": "purchase.completed",
      "created_at": "2026-07-17T18:24:05Z",
      "data": {
        "app_user_id": "u_812",
        "transaction": {
          "id": "txn_9f2a1c",
          "product_id": "pro_monthly",
          "amount": 899,
          "currency": "USD",
          "type": "purchase",
          "store": "app_store",
          "created_at": "2026-07-17T18:24:05Z"
        }
      }
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6ImV2dF81YjlkMmUifQ"
}

Next steps#