Samsung IAP Publish API
The Samsung IAP Publish API is used to view, register, modify, and remove Samsung In-App Purchase (IAP) items. Before you can start using the IAP Publish API, you must meet all requirements and use the required authorization header parameters in your requests. See Get Started with the IAP APIs for more information.
For Sale
state.The following is a quick reference to the IAP Publish APIs:
Name | Request | Description |
---|---|---|
View item list | GET /iap/v6/applications/:packageName/items | Request a list of item information within a scope appropriate for the page and size. |
View individual item | GET /iap/v6/applications/:packageName/items/:id | Request detailed information on one item. |
Create item | POST /iap/v6/applications/:packageName/items | Register an in-app item. |
Modify item | PUT /iap/v6/applications/:packageName/items | Modify an in-app item. |
Partial item modification | PATCH /iap/v6/applications/:packageName/items | Modify the specified parameters of an in-app item. |
Remove item | DELETE /iap/v6/applications/:packageName/items/:id | Remove an in-app item. |
See In-App Purchase for more information about IAP functionality in Seller Portal.
View item list
Request a list of item information within a scope appropriate for the page and size.
Request
GET /iap/v6/applications/:packageName/items?page={}&size={}
Name | Type | In | Description |
---|---|---|---|
page | int | query | Required. Number of pages of content to return |
size | int | query | Required. Number of items to be returned on a page |
curl \
-X GET \
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items?page=1&size=20"
Response
Parameters
Name | Type | Description |
---|---|---|
id | string | Unique identifier of the in-app item registered in Seller Portal. |
title | string | Title of the in-app item registered in Seller Portal. |
description | string | Brief explanation of the in-app item registered in Seller Portal. |
type | string | In-App item type.
|
status | string | Item distribution status in Seller Portal.
|
itemPaymentMethod.phoneBillStatus | Boolean | Whether or not the item is paid with an automatic payment on a phone bill.
|
usdPrice | number | The base price in USD (United States of America dollars) of the item. The price can be set between 0 and 400. |
prices[].countryId | string | Three-character country code (ISO 3166) of the country where the item is sold. |
prices[].currency | string | Three-character currency code (ISO 4217) of the specified country's currency (for example, EUR, GBP, USD). |
prices[].localPrice | string | Price of the item in the specified country's currency. |
totalCount | number | Number of items listed in the response. |
Success
Status: 200 Success
{
"itemList": [
{
"id": "one_gallon_gas",
"title": "1 Gallon gas",
"description": "Fuel for driving game",
"type": "CONSUMABLE",
"status": "PUBLISHED",
"itemPaymentMethod": {
"phoneBillStatus": true
},
"usdPrice": 0.900,
"prices": [
{
"countryId": "KOR",
"currency": "KRW",
"localPrice": "1000.000"
},
{
"countryId": "USA",
"currency": "USD",
"localPrice": "0.900"
}, ...
]
}, ...
],
"totalCount": 3
}
See Failure response codes for a list of possible response codes when a request fails.
View individual item
Request detailed information about one item.
Request
GET /iap/v6/applications/:packageName/items/:id
Name | Type | Description |
---|---|---|
id | string | Required. Unique identifier of the in-app item registered in Seller Portal. |
curl \
-X GET
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items/one_gallon_gas"
Response
See View item response parameters for a description of the response parameters.
Success
Status: 200 Success
{
"id": "one_gallon_gas",
"title": "1 Gallon gas",
"description": "Fuel for driving game",
"type": "CONSUMABLE",
"status": "PUBLISHED",
"itemPaymentMethod": {
"phoneBillStatus": true
},
"usdPrice": 0.900,
"prices": [
{
"countryId": "KOR",
"currency": "KRW",
"localPrice": "1000.000"
},
{
"countryId": "USA",
"currency": "USD",
"localPrice": "0.900"
}, ...
]
}
See Failure response codes for a list of possible response codes when a request fails.
Create item
Register an in-app item.
Request
POST /iap/v6/applications/com.package.name/items
Name | Type | Description |
---|---|---|
id | string | Required. Unique identifier of the in-app item registered in Seller Portal. |
title | string | Required. Title of the in-app item registered in Seller Portal. |
description | string | Required. Brief explanation of the in-app item registered in Seller Portal. |
type | string | Required. In-App item type.
|
status | string | Required. Item distribution status in Seller Portal.
|
itemPaymentMethod.phoneBillStatus | Boolean | Required. Whether or not the item is paid with an automatic payment on a phone bill.
|
usdPrice | number | Required. The base price in USD (United States of America dollars) of the item. The price can be set between 0 and 400. |
prices[].countryId | string | Required. Three-character country code (ISO 3166) of the country where the item is sold. |
prices[].currency | string | Three-character currency code (ISO 4217) of the specified country's currency (for example, EUR, GBP, USD). |
prices[].localPrice | string | Required. Price of the item in the specified country's currency. |
curl \
-X POST \
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
-d '{"id":"one_gallon_gas","title":"1 Gallon gas","description":"Fuel for driving game","type":"CONSUMABLE","status":"PUBLISHED","itemPaymentMethod":{"phoneBillStatus":true},"usdPrice":0.99,"prices":[{"countryId":"KOR","currency":"KRW","localPrice":"1000"},{"countryId":"USA","currency":"USD","localPrice":"0.99"}]}' \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items"
Response
Success
Status: 200 Success
{
"id": "one_gallon_gas",
"type": "CONSUMABLE",
"status": "PUBLISHED",
"prices": [
{
"countryId": "KOR",
"currency": "KRW",
"localPrice": "1000.000"
},
{
"countryId": "USA",
"currency": "USD",
"localPrice": "0.99"
}, ...
]
}
See Failure response codes for a list of possible response codes when a request fails.
Modify item
Modify an in-app item. The request replaces all existing information, except the content ID, of the item.
Request
PUT /iap/v6/applications/:packageName/items
See Create item request for a description of the request parameters.
curl \
-X PUT \
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
-d '{"id":"one_gallon_gas","title":"1 Gallon gas","description":"Fuel for driving game fix","type":"CONSUMABLE","status":"PUBLISHED","itemPaymentMethod":{"phoneBillStatus":true},"usdPrice":1,"prices":[{"countryId":"KOR","currency":"KRW","localPrice":"1000"},{"countryId":"USA","currency":"USD","localPrice":"1"}]}' \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items"
Response
Success
Status: 200 Success
{
"id": "one_gallon_gas",
"type": "CONSUMABLE",
"status": "PUBLISHED",
"prices": [
{
"countryId": "KOR",
"currency": "KRW",
"localPrice": "1000.000"
},
{
"countryId": "USA",
"currency": "USD",
"localPrice": "1"
}, ...
]
}
See Failure response codes for a list of possible response codes when a request fails.
Partial item modification
Modify the title
, countryId
, or localPrice
of an in-app item. The id
cannot be modified. Parameters that are not specified are not modified.
Request
PATCH /iap/v6/applications/:packageName/items
Name | Type | Description |
---|---|---|
id | string | Required. Unique identifier of the in-app item registered in Seller Portal. |
title | string | Title of the in-app item registered in Seller Portal. |
prices[].countryId | string | Three-character country code (ISO 3166) of the country where the item is sold. |
prices[].localPrice | string | Price of the item in the specified country's currency. |
curl \
-X PATCH \
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
-d '{"id":"one_gallon_gas","title":"2 Gallon gas"}' \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items"
Response
Success
Status: 200 Success
{
"id": "one_gallon_gas",
"type": "CONSUMABLE",
"status": "PUBLISHED"
}
See Failure response codes for a list of possible response codes when a request fails.
Remove item
Remove an in-app item.
Request
DELETE /iap/v6/applications/:packageName/items/:id
Name | Type | In | Description |
---|---|---|---|
id | string | path | Required. Unique identifier of the in-app item registered in Seller Portal. |
curl \
-X DELETE
-H "content-type:application/json" \
-H "Authorization: Bearer <your-access-token>" \
-H "service-account-id: <your-service-account-id>" \
"https://devapi.samsungapps.com/iap/v6/applications/com.package.name/items/one_gallon_gas"
Response
Success
Status: 200 OK
{
"id": "one_gallon_gas"
}
See Failure response codes for a list of possible response codes when a request fails.
Failure response codes
The following are response codes you may see when the request fails.
Status | Code and message |
---|---|
400 Bad Request |
|
401 Unauthorized |
|
404 Not Found |
|
409 Conflict |
|