palbaseDocs

Palbase IAP · API

GET/iap/customers/{customer_id}/history

Read a customer's history

What happened to the customer, the newest first: their purchases' payments and refunds, their subscriptions' renewal turned off and on, failed charges and ends, the grants given and taken back (with their reason and by whom), the credits granted, taken back, expired and forgiven (spends are the credits' entries: GET …/credits/entries), and the purchases that moved to or from them.

Called by your server, with the project's secret key.

Path

customer_idstring · requiredThe customer: the user's id (a guest merged into an account names the account).

Query

cursorstring · optionalThe `next_cursor` of the page before.
limitinteger · optionalEvents in a page (default 50).
curl
curl -X GET "https://<your-ref>.palbase.studio/iap/customers/<customer_id>/history" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200A page of the history

400A limit out of bounds (`invalid_limit`) or a cursor this did not answer (`invalid_cursor`)

401No key, not a key of this project, or a token that is not valid (the edge's answer)

403Not the project's secret key (`secret_key_required`)

404No customer has this id (`customer_not_found`)

410The user was deleted (`customer_erased`): their id is no customer's again

429Over the project's request limit; Retry-After says when to try again

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation GetCustomerHistory of iap's contract.