palbaseDocs

Palbase IAP · API

GET/iap/customers/{customer_id}/credits/entries

List credit movements

A customer's credit movements, newest first, a page at a time: what they were given and by whom, what each spend took, what expired, what a refund took back and what they owe — support's answer to "where did my credits go". credits reads one credit; cursor goes on from a page's next_cursor. A user never seen here has none.

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

creditsstring · optionalOne credit's movements alone (a key of the catalog's credits).
cursorstring · optionalThe `next_cursor` of the page before.
limitinteger · optionalHow many movements a page holds (50 unless said).
curl
curl -X GET "https://<your-ref>.palbase.studio/iap/customers/<customer_id>/credits/entries" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200The page

400`limit` is not 1 to 200 (`invalid_limit`), or `cursor` is not a page's `next_cursor` (`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`)

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

503Another change to this customer is in progress (`customer_busy`), or the platform could not answer now; retrying is safe after Retry-After

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

Operation ListCreditEntries of iap's contract.