In-game purchase
Call the purchase related methods so that you can view in-app purchase results on dashboard in the console.
Purchase currency
When a user make a payment to acquire different types of in-game currency, call the following methods.
-
Call
InAppPurchase
andGetCurrency
when a user pays cash for in-game currency such as gem or diamond.-
InAppPurhcase
method is used only when a user pays in cash (that is, real money). -
Enter the type of purchased item such as event, package, currency, or consumable in
from_category_slug
. -
To record that purchased game currency is paid in cash, enter
entity.InAppPurchase
infrom_entity
forGetCurrency
method.
When paid in cash,
purchasable_slug
forInAppPurchase
method andfrom_slug
fromGetCurrency
method must share the same input value. In the table below, it is120 diamonds
as an example value.Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
purchasable_slug
string
Required
120 diamonds
purchase_quantity
float
Required
1
purchase_unit_price
float
Required
3300
purchase_total_price
float
Required
purchase_currency_code
Required
currencyCode.KRW
is_ad_remove
boolean
Optional
FALSE
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
currency_slug
string
Required
diamond
currency_quantity
float
Required
120
currency_total_quantity
float
Optional
9999
from_entity
Optional
entity.InAppPurchase
from_category_slug
string
Optional
currency
from_slug
string
Optional
120 diamonds
-
-
Call
UseCurrency
andGetCurrency
when a user pays Hard Currency (that is, currency that can only be acquired through cash payment) to acquire Soft Currency (that is, currency that can be acquired through game play).Since the purchase of soft currency by hard currency takes place in an in-app store, enter
entity.ShopPurchase
inwhere_to_entity
fromUseCurrency
method and infrom_entity
fromGetCurrency
method.Since user pays hard currency for a certain item that yield soft currency in return,
where_to_slug
forUseCurrency
method andfrom_slug
forGetCurrency
method must share the same label for the item, whilewhere_to_category_slug
for UseCurrency andfrom_category_slug
for GetCurrency must share the same label for the item category.In the table below, it is
1000 gold
andgold
for each example value.Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
currency_slug
string
Required
diamonds
currency_quantity
float
Required
50
currency_total_quantity
float
Optional
9999
where_to_entity
Optional
entity.ShopPurchase
where_to_category_slug
string
Optional
gold
where_to_slug
string
Optional
1000 gold
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
currency_slug
string
Required
gold
currency_quantity
float
Required
1000
currency_total_quantity
float
Optional
9999
from_entity
Optional
entity.ShopPurchase
from_category_slug
string
Optional
gold
from_slug
string
Optional
1000 gold
Purchase random box
When a user pays cash to purchase random box item, call the following methods.
-
Call the following methods when a specific item is acquired immediately after purchasing a random box.
When recording item or currency that can be acquired from a random box,
purchasable_slug
forInAppPurchase
method andfrom_slug
forGetRandomBox
andGetEquipment
method must share the same input value. In the table below, it is written as "common firearm random box".Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
purchasable_slug
string
Required
common firearm random box
purchase_quantity
float
Required
1
purchase_unit_price
float
Required
3300
purchase_total_price
float
Required
purchase_currency_code
Required
currencyCode.KRW
is_ad_remove
boolean
Optional
FALSE
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
TentuPlayKeyword._DUMMY_CHARACTER_ID_
item_slug
string
Required
common firearm random box
item_quantity
float
Required
1
from_entity
Optional
entity.InAppPurchase
from_category_slug
string
Optional
firearm store
from_slug
string
Optional
common firearm random box
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
TentuPlayKeyword._DUMMY_CHARACTER_ID_
item_slug
string
Required
common firearm random box
item_quantity
float
Required
1
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
TentuPlayKeyword._DUMMY_CHARACTER_ID_
item_slug
string
Required
A firearm
item_quantity
float
Required
1
from_entity
Optional
entity.OpenRandomBox
from_category_slug
string
Optional
common
from_slug
string
Optional
common firearm random box
-
Call
InAppPurchase
andGetRandomBox
when a certain random box acquired from purchase can be opened any time at user’s disposal.When a user opens a certain random box in the future to acquire a certain object, call
OpenRandomBox
andGetRandomBox
.Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
purchasable_slug
string
Required
Alegoria Box
purchase_quantity
float
Required
1
purchase_unit_price
float
Required
3300
purchase_total_price
float
Required
purchase_currency_code
Required
currencyCode.KRW
is_ad_remove
boolean
Optional
FALSE
Method Parameter Type Required Notes player_uuid
string
Required
character_uuid
string
Required
TentuPlayKeyword._DUMMY_CHARACTER_ID_
item_slug
string
Required
Alegoria Box
item_quantity
float
Required
1
from_entity
Optional
entity.InAppPurchase
from_category_slug
string
Optional
Diadium
(store name)from_slug
string
Optional
Alegoria Box × 1
Purchase package item
When a user pays cash to purchase a package item that includes multiple items, call InAppPurchase
along with Get{ Object }
methods.
TentuPlay algorithm provides 10 different types of in-game object, such as Character, Currency, and Equipment. For each type of Object, you can call the method in |
Let’s assume that a user has purchased "monster summoning package 1" that contains two currencies (that is, "gem" and "cosmo") and a token (namely, "premium ticket"). In this case, you need to call InAppPurchase
, GetToken
, and GetCurrency
two times as shown in the following table:
Method | Parameter | Type | Required | Notes |
---|---|---|---|---|
player_uuid |
string |
Required |
||
character_uuid |
string |
Required |
|
|
purchasable_slug |
string |
Required |
|
|
purchase_quantity |
float |
Required |
|
|
purchase_unit_price |
float |
Required |
|
|
purchase_total_price |
float |
Required |
||
purchase_currency_code |
Required |
|
||
is_ad_remove |
boolean |
Optional |
|
Method |
Parameter |
Type |
Required |
Notes |
|
---|---|---|---|---|---|
Currency A |
Currency B |
||||
player_uuid |
string |
Required |
|||
character_uuid |
string |
Required |
|
||
currency_slug |
string |
Required |
|
|
|
currency_quantity |
float |
Required |
|
|
|
currency_total_quantity |
float |
Optional |
|
|
|
from_entity |
Optional |
|
|||
from_category_slug |
string |
Optional |
|
||
from_slug |
string |
Optional |
|
Method | Parameter | Type | Required | Notes |
---|---|---|---|---|
player_uuid |
string |
Required |
||
character_uuid |
string |
Required |
|
|
item_slug |
string |
Required |
|
|
item_quantity |
float |
Required |
|
|
from_entity |
Optional |
|
||
from_category_slug |
string |
Optional |
|
|
from_slug |
string |
Optional |
|
Purchase ad-removal
Call InAppPurchase
when a user pays cash to purchase the ad-removal item.
Enter |
Method | Parameter | Type | Required | Notes |
---|---|---|---|---|
player_uuid |
string |
Required |
||
character_uuid |
string |
Required |
||
purchasable_slug |
string |
Required |
ad_removal item name |
|
purchase_quantity |
float |
Required |
|
|
purchase_unit_price |
float |
Required |
|
|
purchase_total_price |
float |
Required |
||
purchase_currency_code |
Required |
|
||
is_ad_remove |
boolean |
Optional |
|