TentuPlay.sendPurchase

Description

The sendPurchase method collects the purchase behavior of user. It needs to be called when the user gets things by paying real money for them.

Example
sendPurchase({
	playerUUID: "9BEIN2XUEN2P7ZW",
	characterUUID: "arc923859",
	purchasableSlug: "welcome_pass",
	purchaseQuantity: 1,
	purchaseUnitPrice: 9900,
	purchaseTotalPrice: 9900,
	purchaseCurrencyCode: "KRW",
	isAdRemove: false
});

Parameters

Name Description Type Required

playerUUID

The unique ID of user or player

string

required

characterUUID

The unique ID of player’s character

Set characterUUID to TentuPlayKeyword._DUMMY_CHARACTER_ID_ in one or more of the following cases:

  • If your product is not a game

  • If there is no character in your game

  • If you want to use it for the player, not a character

string

required

purchasableSlug

The unique name of the purchased product

string

required

purchaseQuantity

The number or amount of purchased products

number

required

purchaseUnitPrice

The unit price of purchased product

number

required

purchaseTotalPrice

The total price of purchased products

number

required

purchaseCurrencyCode

The three-letter alphabetic code of currency used for the purchase defined by ISO 4217

string

required

isAdRemove

Whether the purchased item either includes or is related to in-app ad removal

The default value is false

boolean

optional

Do you need help?

Contact us at TentuPlay Discord if you have any questions or feedback on the documentation.