I'm contacting with a question regarding the in-app purchase price settings that use the App Store Connect API.
Using App Store Connect API v2.3, we understand that we are supposed to be able to do the following:
・Change price for base country for in-app purchases
・Customize prices for in-app purchases
https://developer.apple.com/documentation/appstoreconnectapi/add_a_scheduled_price_change_to_an_in-app_purchase
Following this, we made a payload and tried to use it.
・Change price for base country for in-app purchases
This worked without issue.
・Customize prices for in-app purchases
This did not work.
Regarding the customizaton of prices, is there any API available other than this one?:
https://api.appstoreconnect.apple.com/v1/inAppPurchasePriceSchedules
Any help you can provide on customizing in-app purchase prices would be much appreciated.
For reference, here is the payload we tested:
payload := {
"data": {
"type": "inAppPurchasePriceSchedules",
"relationships": {
"baseTerritory": {
"data": {
"type": "territories",
"id": TERITORY_1(※),
},
},
"inAppPurchase": {
"data": {
"type": "inAppPurchases",
"id": ITEM_ID(※),
},
},
"manualPrices": {
"data": {
{
"type": "inAppPurchasePrices",
"id": PRICE_POINT_ID_1(※),
},
},
},
},
},
"included": {
{
"attributes": {
"startDate": null,
},
"relationships": {
"inAppPurchasePricePoint": {
"data": {
"type": "inAppPurchasePricePoints",
"id": PRICE_POINT_ID_2(※),
},
},
"inAppPurchaseV2": {
"data": {
"type": "inAppPurchases",
"id": ITEM_ID(※),
},
},
},
"type": "inAppPurchasePrices",
"id": PRICE_POINT_ID_3(※),
},
{
"type": "territories",
"id": TERITORY_2(※),
},
},
}
We tested it in the following ways. Areas with (※) indicate changed values.
Pattern 1: Success (set base country price)
TERITORY_1: Base country code (e.g. USA
ITEM_ID: In-app purchase item ID
PRICE_POINT_ID_1-3: Base country price point (e.g. eyJzIjoiNjQ0NjQ3OTMwNSIsInQiOiJERVUiLCJwIjoiMTAzNTcifQ
TERITORY_2: Base country code (e.g. USA
Pattern 2: Failure (customize price outside of base country)
TERITORY_1: Base country code (e.g. USA)
ITEM_ID: In-app purchase item ID
PRICE_POINT_ID_1: Base country price point (e.g. eyJzIjoiNjQ0NjQ3OTMwNSIsInQiOiJERVUiLCJwIjoiMTAzNTcifQ
PRICE_POINT_ID_2: Price point to be customized in another country (e.g. axKaHdnaoADFGojkpfafQ3OTMwNSIsInQiOldaDfaeAEfBdageDlkP
PRICE_POINT_ID_3: Price point to be customized in another country (e.g. axKaHdnaoADFGojkpfafQ3OTMwNSIsInQiOldaDfaeAEfBdageDlkP
TERITORY_2: Country code to be customized (e.g. JPN
Error message:
{
"errors" : [ {
"id" : "e29b37ff-2159-4a15-b238-264ae96e9da1",
"status" : "409",
"code" : "ENTITY_ERROR.RELATIONSHIP.REQUIRED",
"title" : "The provided entity is missing a required relationship",
"detail" : "You must provide a value for the relationship 'inAppPurchasePricePoint' with this request",
"source" : {
"pointer" : "/included/0/relationships/inAppPurchasePricePoint"
}
} ]
}
Pattern 1 and 2 use the same payload, so we have set the "inAppPurchasePricePoint" in the relationship.