Documentation menu
POST/v1/customers/apple/synchronize

Synchronize Apple purchases

Verifies an AppTransaction JWS and optional transaction JWS values, stores the verified purchases, and returns the current entitlements.

Request body

signedAppTransactionRequired
string

A signed StoreKit AppTransaction JWS value.

signedTransactionsOptional
string[]

Optional StoreKit transaction JWS values.

applicationAccountIdentifierOptional
string | null

An optional stable account identifier from the application.

Responses

200The synchronized customer's current entitlements.
customerIdentifierRequired
string | null · uuid

The Purpl customer identifier, when a customer was resolved.

entitlementsRequired
CustomerEntitlement[]
400The request body, parameter, or verified store payload is invalid.
errorRequired
string

A stable machine-readable error code.

404The application, store configuration, customer, or paywall was not found.
errorRequired
string

A stable machine-readable error code.

409The customer identity conflicts with an existing verified identity.
errorRequired
string

A stable machine-readable error code.

Request example

cURL
curl 'https://api.purpl.sh/v1/customers/apple/synchronize' \
  --header 'Content-Type: application/json' \
  --data '{
    "signedAppTransaction": "<app-transaction-jws>",
    "signedTransactions": ["<transaction-jws>"],
    "applicationAccountIdentifier": "user-123"
  }'