My request is
`{
"packageName": "com.test.package",
"sku": "title",
"status": "inactive",
"subscriptionPeriod": "P1M",
"purchaseType": "subscription",
"listings": {
"en-US": {
"title": "title",
"description": "title"
}
},
"defaultLanguage": "en-US",
"defaultPrice": {
"priceMicros": "100000000",
"currency": "SGD"
}
}`
to the post call for inserting a product (reference : [https://www.googleapis.com/androidpublisher/v2/applications/packageName/inappproducts]). Getting error response for this request
`{
"error": {
"errors": [
{
"domain": "androidpublisher",
"reason": "inAppProductRegionsMissingPricing",
"message": "Must provide a price for each region the app has been published in."
}
],
"code": 403,
"message": "Must provide a price for each region the app has been published in."
}
}`
Can anyone explain this error, because i have set a default price ? And also how do i get all the countries list and its currencies in which the app is published in from google play console ?
You really don't want to do this, imagine you having to send all that to about 150 countries. You can just parse the ['autoConvertMissingPrices' => true]
when inserting or updating a product so Google does the conversion.
In my case here is what I do. { 'autoConvertMissingPrices' => true }
$purchase = $service->inappproducts->update(
'app.package.name',
'product_sku',
$product,
['autoConvertMissingPrices' => true]
);
Go to PRICING & DISTRIBUTION Page of your app in https://play.google.com/apps/publish/
In Countries find out how many region you have selected for this app.
while inserting the in app product you have provide price for all region you have selected.
so suppose if you have selected Pakistan as region
then you request should be
{
"packageName": "com.test.package",
"sku": "title",
"status": "inactive",
"subscriptionPeriod": "P1M",
"purchaseType": "subscription",
"listings": {
"en-US": {
"title": "title",
"description": "title"
}
},
"defaultLanguage": "en-US",
"defaultPrice": {
"priceMicros": "100000000",
"currency": "SGD"
},
"prices": {
"PK": {
"priceMicros": "100000000",
"currency": "SGD"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With