Method: purchases.subscriptions.acknowledge

  • This page details how to acknowledge a subscription purchase using an HTTP POST request.

  • The request requires path parameters including the package name, subscription ID (optional since May 21, 2025), and the purchase token.

  • The request body can optionally include a developerPayload field as a string.

  • A successful response body is empty.

  • The API call requires the https://www.googleapis.com/auth/androidpublisher authorization scope.

Acknowledges a subscription purchase.

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:acknowledge

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
packageName

string

The package name of the application for which this subscription was purchased (for example, 'com.some.thing').

subscriptionId

string

Note: Since May 21, 2025, subscriptionId is not required, and not recommended for subscription with add-ons. The purchased subscription ID (for example, 'monthly001').

token

string

The token provided to the user's device when the subscription was purchased.

Request body

The request body contains data with the following structure:

JSON representation
{
  "developerPayload": string,
  "externalAccountIds": {
    object (ExternalAccountIds)
  }
}
Fields
developerPayload

string

Payload to attach to the purchase.

externalAccountIds

object (ExternalAccountIds)

Optional. User account identifier in your app.

Response body

If successful, the response body is empty.

Sample

The following is a sample request:

curl -X POST \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.myapp/purchases/subscriptions/monthly_premium_001/tokens/abcDEF123ghiJKL456mnoPQR789:acknowledge' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "developerPayload": "AppSpecificInfo-UserID-12345"
  }'

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/androidpublisher

ExternalAccountIds

User account identifier in your app.

JSON representation
{
  "obfuscatedAccountId": string,
  "obfuscatedProfileId": string
}
Fields
obfuscatedAccountId

string

Optional. Specifies an optional obfuscated string that is uniquely associated with the purchaser's user account in your app.

If you pass this value, Google Play can use it to detect irregular activity. Do not use this field to store any Personally Identifiable Information (PII) such as emails in cleartext. Attempting to store PII in this field will result in purchases being blocked. Google Play recommends that you use either encryption or a one-way hash to generate an obfuscated identifier to send to Google Play.

This identifier is limited to 64 characters.

This field can only be set for resubscription purchases. See https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid to set this field for purchases made using the standard in-app billing flow.

obfuscatedProfileId

string

Optional. Specifies an optional obfuscated string that is uniquely associated with the purchaser's user profile in your app.

If you pass this value, Google Play can use it to detect irregular activity. Do not use this field to store any Personally Identifiable Information (PII) such as emails in cleartext. Attempting to store PII in this field will result in purchases being blocked. Google Play recommends that you use either encryption or a one-way hash to generate an obfuscated identifier to send to Google Play.

This identifier is limited to 64 characters.

This field can only be set for resubscription purchases. See https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid to set this field for purchases made using the standard in-app billing flow.