Transactions

List and retrieve purchases, renewals, and refunds.

A transaction is a single monetary event validated by CashSDK — an initial purchase, a subscription renewal, or a refund. Transactions are created automatically as receipts are validated and store notifications arrive; this API is read-only.

The transaction object#

idstring

Unique identifier, prefixed with txn_.

app_user_idstring

The customer this transaction belongs to.

product_idstring

The product that was purchased or renewed.

amountinteger

Amount in the currency's minor units (cents).

currencystring

ISO 4217 currency code, e.g. USD.

typestring

One of purchase, renewal, or refund.

storestring

The source store, e.g. app_store or play_store.

created_atstring

ISO 8601 timestamp of the transaction.

List transactions#

GET /v1/apps/{app}/transactions

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

appstringrequired

The app ID.

app_user_idstring

Filter to a single customer's transactions.

typestring

Filter by type: purchase, renewal, or refund.

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/transactions?app_user_id=u_812" \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "data": [
    {
      "id": "txn_9f2a1c",
      "app_user_id": "u_812",
      "product_id": "pro_monthly",
      "amount": 899,
      "currency": "USD",
      "type": "purchase",
      "store": "app_store",
      "created_at": "2026-07-17T18:24:05Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Retrieve a transaction#

GET /v1/apps/{app}/transactions/{id}

appstringrequired

The app ID.

idstringrequired

The transaction ID, e.g. txn_9f2a1c.

bash
curl https://api.cashsdk.com/v1/apps/app_2mK4pQ/transactions/txn_9f2a1c \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "id": "txn_9f2a1c",
  "app_user_id": "u_812",
  "product_id": "pro_monthly",
  "amount": 899,
  "currency": "USD",
  "type": "purchase",
  "store": "app_store",
  "created_at": "2026-07-17T18:24:05Z"
}

Next steps#