POST
/v1/customers/google-play/synchronizeSynchronize a Google Play purchase
Verifies a Google Play purchase token, stores the purchase, and returns the current entitlements.
Authentication: None
Request body
packageNameRequiredstringThe Android package name registered in Purpl.
purchaseTokenRequiredstringThe purchase token returned by Google Play.
productKindRequiredsubscription | one_time_productThe Google Play product kind.
productIdentifierOptionalstring | nullThe optional product identifier used to narrow one-time purchase lookup.
applicationAccountIdentifierOptionalstring | nullAn optional stable account identifier from the application.
Responses
200The synchronized customer's current entitlements.
customerIdentifierRequiredstring | null · uuidThe Purpl customer identifier, when a customer was resolved.
entitlementsRequiredCustomerEntitlement[]400The request body, parameter, or verified store payload is invalid.
errorRequiredstringA stable machine-readable error code.
404The application, store configuration, customer, or paywall was not found.
errorRequiredstringA stable machine-readable error code.
409The customer identity conflicts with an existing verified identity.
errorRequiredstringA stable machine-readable error code.
Request example
cURL
curl 'https://api.purpl.sh/v1/customers/google-play/synchronize' \
--header 'Content-Type: application/json' \
--data '{
"packageName": "com.example.app",
"purchaseToken": "<purchase-token>",
"productKind": "subscription",
"productIdentifier": "plus.monthly",
"applicationAccountIdentifier": "user-123"
}'