Closed Kareem-2000 closed 1 year ago
Hi @Kareem-2000 . Could you verify that the regionsVersion.version
and updateMask
parameters in the request URI are correctly formatted ?
Hi @aria1991, yes they were correctly formatted. I got it to wok by including all the required and non-required parameters. However, i'm facing another issue as follows:
HttpError: <HttpError 400 when requesting https://androidpublisher.googleapis.com/androidpublisher/v3/applications/app/subscriptions/hashtest1?alt=json®ionsVersion.version=2022/01&updateMask=basePlans returned "Invalid currency for region code HR at the specified regions version RegionLaunchVersionId{versionId=202201}.". Details: "Invalid currency for region code HR at the specified regions version RegionLaunchVersionId{versionId=202201}.">
Further on, upon removing that country from the list I want to update, im getting this error:
Details: "6months-7g-hashtest: Regional configs were removed from the base plan: HR">
I have double and triple checked the country's currency on Google Play Console, and it is in EUR, and EUR is what im sending in the API call.
Why does it need all the countries in the body in order to update the base plan? Won't it work if I just need to update a single price for example?
For anyone facing a similar issue, you simply need to change the currency code of HR to "HRK" and not "EUR". Although the currency on play console is in euros, the API still hasn't been updated it seems.
I also have a problem with changing subscriptions using the PATCH. Getting a subscription using GET or LIST works fine.
This is working fine:
subscriptionFromAPI = androidpublisher.monetization().subscriptions().get(
packageName=PACKAGE_NAME,
productId=SUBSCRIPTION_ID
).execute()
However, when I call PATCH:
request = androidpublisher.monetization().subscriptions().patch(
packageName=PACKAGE_NAME,
productId=SUBSCRIPTION_ID,
body=subscriptionFromAPI
)
request.uri += "®ionsVersion.version=2022/01"
request.uri += "&updateMask=basePlans"
request.execute()
It returns this:
HttpError 404 when requesting https://androidpublisher.googleapis.com/androidpublisher/v3/applications/PACKAGE_NAME/subscriptions/SUBSCRIPTION_ID?alt=json®ionsVersion.version=2022/01&updateMask=basePlans returned "Subscription not found for package name 'PACKAGE_NAME' and subscription ID 'SUBSCRIPTION_ID'"
Has anyone had a similar issue?
Hi @aria1991, yes they were correctly formatted. I got it to wok by including all the required and non-required parameters. However, i'm facing another issue as follows:
would you mind elaborating on your solution? You included ALL parameters and then it worked? I am facing the same issue. Just getting Error 500 without any further details.
Hi @aria1991, yes they were correctly formatted. I got it to wok by including all the required and non-required parameters. However, i'm facing another issue as follows:
would you mind elaborating on your solution? You included ALL parameters and then it worked? I am facing the same issue. Just getting Error 500 without any further details.
Yes, I simply included all the fields. One simple way of doing this would be to use the API to get the existing prices for the subscription, then edit that json response with the prices you want to alter, and then patch that subscription.
Thanks @Kareem-2000 that's how I am doing it now and it is working.
Seems like this issue is resolved. Closing.
Sorry, i have a question if you can help me: When i have created the subscription and activate the base plan, i have forgot to specify the node "regionalConfigs". In order to make it available in all countries, do i have to specify "every" regional code and price for all countries or i can just specify US and IT ? Thanks
I'm trying to use the google play developer API to patch a subscription and change its price for all the countries, but I'm getting the following error and have no clue why:
The following is the code I have written.
Can someone please point out what is wrong here? I have tried to test it on the "Try it" section of the documentation but it still does not work.