palbaseDocs

Palbase IAP · API

PUT/iap/me/refund-data-consent

Record the customer's consent to refund data

What the signed-in customer said, as the app asked them: whether the App Store is told of their use of a purchase they ask Apple a refund of (Apple's CONSUMPTION_REQUEST). With it, Palbase answers Apple within its 12 hours — whether it gave what was bought, whether a free trial came first, how much of a pack of credits was spent — and states no preference of its own; without it, Apple is told nothing. The latest word counts.

Called by a signed-in user of your app, with their token and the publishable key.

Request body

consentedboolean · requiredtrue: Palbase answers the App Store's question when they ask Apple for a refund; false: it never does.
curl
curl -X PUT "https://<your-ref>.palbase.studio/iap/me/refund-data-consent" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"consented":false}'

Responses

200What was recorded

400No `consented` (`consented_required`), or the body is not the request

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`)

409The customer was merged into an account (`customer_merged`): sign in to it

410The user was deleted (`customer_erased`)

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 SetRefundDataConsent of iap's contract.