AI-generated Key Takeaways
-
This document outlines how to create a new subscription offer using the Android Publisher API.
-
Creating a subscription offer is only possible for auto-renewing base plans, and the offer will initially be in a DRAFT state until activated.
-
The HTTP request uses a POST method to a specific URL endpoint including the package name, product ID, and base plan ID.
-
Required parameters for creating an offer include the package name, product ID, base plan ID, the desired offer ID, and the version of available regions.
-
A successful request will return a newly created SubscriptionOffer instance in the response body and requires the
https://www.googleapis.com/auth/androidpublisher
OAuth scope.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Creates a new subscription offer. Only auto-renewing base plans can have subscription offers. The offer state will be DRAFT until it is activated.
HTTP request
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
packageName |
Required. The parent app (package name) for which the offer should be created. Must be equal to the packageName field on the Subscription resource. |
productId |
Required. The parent subscription (ID) for which the offer should be created. Must be equal to the productId field on the SubscriptionOffer resource. |
basePlanId |
Required. The parent base plan (ID) for which the offer should be created. Must be equal to the basePlanId field on the SubscriptionOffer resource. |
Query parameters
Parameters | |
---|---|
offerId |
Required. The ID to use for the offer. For the requirements on this format, see the documentation of the offerId field on the SubscriptionOffer resource. |
regionsVersion |
Required. The version of the available regions being used for the subscriptionOffer. |
Request body
The request body contains an instance of SubscriptionOffer
.
Response body
If successful, the response body contains a newly created instance of SubscriptionOffer
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidpublisher