Skip to main content

Validate Google Play Store Purchase

POST 

/purchases/play-store/validate

Validates an in-app purchase or subscription completed through the Google Play Store. This endpoint confirms the purchase token with Google and links the transaction to the user profile and paywall context.

Follow the notes below for a successful request:
  • subscriptionOfferDetails is required for subscriptions and must match the purchased offer.

  • paywallId, isExperiment, and aiPricingModelId must match the values returned by the Get Paywall API.

  • Use environment: production for live apps and sandbox for testing.

  • If you previously called Get Paywall, include isExperiment and aiPricingModelId from that response to improve analytics attribution.

  • At least one of profileId or customerUserId must be provided to identify the user.


Finding the token

If you are having trouble finding the token, you can refer to the official Google documentation:


Note on trial periods

A trial period is identified when at least one element within pricingPhases contains priceAmountMicros = 0.

For a trial subscription, the system expects to receive a pricingPhase with:

  • priceAmountMicros: 0 (to indicate a free trial)

  • The usual fields: billingPeriod, recurrenceMode, and billingCycleCount

This zero-priced phase allows our system to correctly identify the event as a trial rather than a paid subscription.

If this zero-priced phase is missing, the event will be interpreted as a paid subscription, which will impact your revenue statistics.

Update: One-Time Purchase (OTP) Support

This endpoint supports both subscription and one-time purchase (OTP) validations. In addition to the existing subscriptionOfferDetails field, you can send oneTimePurchaseOfferDetails for one-time purchases.

Important: You must send either oneTimePurchaseOfferDetails or subscriptionOfferDetails, but not both. The choice depends on whether you're validating a one-time purchase or a subscription.

Request

Responses

Validated.