---
title: ZEPETO.Product
slug: world-sdk-guide/zepetoproduct
docTags: 
createdAt: 2026-08-28T01:33:49.684Z
---

| Type                                                                | Description                                                                                                                                                        |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [BaseResponse](./#baseresponse)                                     | Base class for response classes.                                                                                                                                   |
| [BaseRequest](./#baserequest)                                       | `BaseRequest` class that accepts a generic `TResponse` type as the response data.                                                                                  |
| [ProductListResponse](./#productlistresponse)                       | The `ProductListResponse` class provides the API call result and the retrieved product information list.                                                           |
| [ProductBaseResponse](./#productbaseresponse)                       | Base class for product-related response classes.                                                                                                                   |
| [ProductResponse](./#productresponse)                               | The `ProductResponse` class provides the API call result and the retrieved product information.                                                                    |
| [PurchaseResponse](./#purchaseresponse)                             | The `ProductResponse` class provides the API call result and the purchase information.                                                                             |
| [CurrencyListResponse](./#currencylistresponse)                     | The `CurrencyListResponse` class provides the API call result and the currency information list.                                                                   |
| [CurrencyResponse](./#currencyresponse)                             | The `CurrencyResponse` class provides the API call result and the currency information.                                                                            |
| [ProductRecord](./#productrecord)                                   | Product information.                                                                                                                                               |
| [CurrencyRecord](./#currencyrecord)                                 | Currency information.                                                                                                                                              |
| [ItemPackageUnitRecord](./#itempackageunitrecord)                   | Details of individual products included in the item product package.                                                                                               |
| [CurrencyPackageUnitRecord](./#currencypackageunitrecord)           | Details of individual currencies included in the currency product package.                                                                                         |
| [ProductType](./#producttype)                                       | Enum representing the product type.                                                                                                                                |
| [PurchaseType](./#purchasetype)                                     | Enum representing the product purchase type.                                                                                                                       |
| [ProductStatus](./#productstatus)                                   | Enum representing the product status.                                                                                                                              |
| [CurrencyType](./#currencytype)                                     | Enum representing the currency type.                                                                                                                               |
| [ProductService](./#productservice)                                 | `ProductService` manages operations associated with in-World products. Players can access in-World product information and perform purchases through this service. |
| [ProductPurchaseButton](./#productpurchasebutton)                   | Class managing the functionality of an in-World product purchase button.                                                                                           |
| [ProductError](./#producterror)                                     | The error code specifies the reason for the failure of product-related requests.                                                                                   |
| [OfficialCurrencyBalanceRequest](./#officialcurrencybalancerequest) | Represents an asynchronous request for retrieving the balance for ZEPETO’s official currency (ZEM).                                                                |

## BaseResponse

`class`

Base class for response classes.

### Properties

| Name      | Type      | Description                                                                           |
| --------- | --------- | ------------------------------------------------------------------------------------- |
| isSuccess | `boolean` | Represents the success status of the request. Set to true upon successful completion. |
| message   | `string`  | Describes the result of the request.                                                  |

## BaseRequest

`class` · extends `BaseAPIRequest`

`BaseRequest` class that accepts a generic `TResponse` type as the response data.

### Properties

| Name         | Type        | Description                                    |
| ------------ | ----------- | ---------------------------------------------- |
| responseData | `TResponse` | Response data of the generic `TResponse` type. |

## ProductListResponse

`class` · extends [ProductBaseResponse](./#productbaseresponse)

The `ProductListResponse` class provides the API call result and the retrieved product information list.

### Properties

| Name     | Type                                  | Description                  |
| -------- | ------------------------------------- | ---------------------------- |
| products | [ProductRecord\[\]](./#productrecord) | List of product information. |

## ProductBaseResponse

`class` · extends [BaseResponse](./#baseresponse)

Base class for product-related response classes.

### Properties

| Name      | Type                            | Description                                            |
| --------- | ------------------------------- | ------------------------------------------------------ |
| ErrorCode | [ProductError](./#producterror) | Retrieves the error code for a failed product request. |

## ProductResponse

`class` · extends [ProductBaseResponse](./#productbaseresponse)

The `ProductResponse` class provides the API call result and the retrieved product information.

### Properties

| Name    | Type                              | Description          |
| ------- | --------------------------------- | -------------------- |
| product | [ProductRecord](./#productrecord) | Product information. |

## PurchaseResponse

`class` · extends [ProductBaseResponse](./#productbaseresponse)

The `ProductResponse` class provides the API call result and the purchase information.

### Properties

| Name        | Type     | Description                                            |
| ----------- | -------- | ------------------------------------------------------ |
| userId      | `string` | User ID of the player performed the purchase.          |
| productId   | `string` | ID of the purchased in-World product.                  |
| price       | `number` | Price of the purchased in-World product.               |
| receiptId   | `string` | Receipt ID for the purchase.                           |
| purchasedAt | `Date`   | Date and time when the in-World product was purchased. |

## CurrencyListResponse

`class` · extends [ProductBaseResponse](./#productbaseresponse)

The `CurrencyListResponse` class provides the API call result and the currency information list.

### Properties

| Name       | Type                                    | Description                   |
| ---------- | --------------------------------------- | ----------------------------- |
| currencies | [CurrencyRecord\[\]](./#currencyrecord) | List of currency information. |

## CurrencyResponse

`class` · extends [ProductBaseResponse](./#productbaseresponse)

The `CurrencyResponse` class provides the API call result and the currency information.

### Properties

| Name     | Type                                | Description           |
| -------- | ----------------------------------- | --------------------- |
| currency | [CurrencyRecord](./#currencyrecord) | Currency information. |

## ProductRecord

`class`

Product information.

### Properties

| Name                 | Type                                                          | Description                                                                                        |
| -------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| productId            | `string`                                                      | Product ID.                                                                                        |
| name                 | `string`                                                      | Product name.                                                                                      |
| price                | `number`                                                      | Product price.                                                                                     |
| isPurchased          | `boolean`                                                     | Indicates whether the user has purchased the product, applicable only for non-consumable products. |
| itemPackageUnits     | [ItemPackageUnitRecord\[\]](./#itempackageunitrecord)         | Items included in the product if `ProductType` is `ItemPackage`.                                   |
| currencyPackageUnits | [CurrencyPackageUnitRecord\[\]](./#currencypackageunitrecord) | Currencies included in the product if `ProductType` is `CurrencyPackage`.                          |
| ProductType          | [ProductType](./#producttype)                                 | Returns the `ProductType` of the product.                                                          |
| PurchaseType         | [PurchaseType](./#purchasetype)                               | Returns the `PurchaseType` of the product.                                                         |
| ProductStatus        | [ProductStatus](./#productstatus)                             | Returns the `ProductStatus` of the product.                                                        |
| CurrencyType         | [CurrencyType](./#currencytype)                               | Returns the type of currency used for purchasing the product.                                      |
| currencyId           | `string`                                                      | Returns the ID of the currency used for purchasing the product.                                    |
| currencyName         | `string`                                                      | Returns the name of the currency used for purchasing the product.                                  |

### Methods

### GetCurrencySprite

`GetCurrencySprite() → Sprite`

Returns the image of the currency used for purchasing the product.

**Returns:** `Sprite`

## CurrencyRecord

`class`

Currency information.

### Properties

| Name               | Type      | Description                                                                                 |
| ------------------ | --------- | ------------------------------------------------------------------------------------------- |
| currencyId         | `string`  | Currency ID.                                                                                |
| name               | `string`  | Currency name.                                                                              |
| isOfficialCurrency | `boolean` | Indicates whether the currency is ZEPETO’s official currency (ZEM) or an in-World currency. |

## ItemPackageUnitRecord

`class`

Details of individual products included in the item product package.

### Properties

| Name      | Type     | Description    |
| --------- | -------- | -------------- |
| productId | `string` | Product ID.    |
| itemName  | `string` | Item name.     |
| quantity  | `bigint` | Item quantity. |

## CurrencyPackageUnitRecord

`class`

Details of individual currencies included in the currency product package.

### Properties

| Name         | Type     | Description        |
| ------------ | -------- | ------------------ |
| currencyId   | `string` | Currency ID.       |
| currencyName | `string` | Currency name.     |
| quantity     | `bigint` | Currency quantity. |

## ProductType

`enum`

Enum representing the product type.

| Name            | Value | Description                                              |
| --------------- | ----- | -------------------------------------------------------- |
| Item            | 0     | Single-item product.                                     |
| ItemPackage     | 1     | Item product package, including multiple items.          |
| CurrencyPackage | 2     | Currency product package, including multiple currencies. |

## PurchaseType

`enum`

Enum representing the product purchase type.

| Name          | Value | Description             |
| ------------- | ----- | ----------------------- |
| Consumable    | 0     | Consumable product.     |
| NonConsumable | 1     | Non-consumable product. |

## ProductStatus

`enum`

Enum representing the product status.

| Name      | Value | Description                               |
| --------- | ----- | ----------------------------------------- |
| Active    | 0     | Active state.                             |
| InActive  | 1     | Inactive state.                           |
| Forbidden | 2     | Forbidden state due to expiration of use. |

## CurrencyType

`enum`

Enum representing the currency type.

| Name             | Value | Description                      |
| ---------------- | ----- | -------------------------------- |
| OfficialCurrency | 0     | ZEPETO’s official currency (ZEM) |
| UserCurrency     | 1     | In-World currency.               |

## ProductService

`class`

`ProductService` manages operations associated with in-World products.
Players can access in-World product information and perform purchases through this service.

### Events

| Name                         | Type                                             | Description                                                                                                                                                                                                                                              |
| ---------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OnPurchaseCompleted (static) | `UnityEvent<ProductRecord, PurchaseResponse>`    | Event triggered upon a successful in-World product purchase. Listeners can be added, receiving `ProductRecord` (the purchased product information) and `PurchaseResponse` (the purchase result information) instances as arguments.                      |
| OnPurchaseFailed (static)    | `UnityEvent<ProductRecord, ProductBaseResponse>` | Event triggered upon a failed in-World product purchase. Listeners can be added, receiving `ProductRecord` (product information in the attempted purchase) and `PurchaseResponse` (the unsuccessful purchase result information) instances as arguments. |

### Methods

### GetProductsAsync

`static GetProductsAsync(productIds: string[]) → BaseRequest<ProductListResponse>`

This asynchronous method retrieves the in-World product list based on provided product IDs.

| Parameter  | Type       | Description                   |
| ---------- | ---------- | ----------------------------- |
| productIds | `string[]` | IDs of the products to fetch. |

**Returns:** [BaseRequest\<ProductListResponse>](./#baserequest) — A `BaseRequest` object. When the asynchronous process is complete, you can access the `ProductListResponse` object by the `responseData` property.

### GetProductAsync

`static GetProductAsync(productId: string) → BaseRequest<ProductResponse>`

This asynchronous method retrieves the in-World product information based on the provided product ID.

| Parameter | Type     | Description                 |
| --------- | -------- | --------------------------- |
| productId | `string` | ID of the product to fetch. |

**Returns:** [BaseRequest\<ProductResponse>](./#baserequest) — A `BaseRequest` object. When the asynchronous process is complete, you can access the `ProductResponse` object by the `responseData` property.

### PurchaseProductAsync

`static PurchaseProductAsync(product: ProductRecord, reason?: string) → BaseRequest<PurchaseResponse>`

This asynchronous method performs a purchase to the in-World product based on provided product information.

| Parameter         | Type                              | Description                                          |
| ----------------- | --------------------------------- | ---------------------------------------------------- |
| product           | [ProductRecord](./#productrecord) | `ProductRecord` instance of the product to purchase. |
| reason (optional) | `string`                          | Explanation for the purchase.                        |

**Returns:** [BaseRequest\<PurchaseResponse>](./#baserequest) — A `BaseRequest` object. When the asynchronous process is complete, you can access the `PurchaseResponse` object by the `responseData` property.

### PurchaseProductAsync

`static PurchaseProductAsync(productId: string, reason?: string) → BaseRequest<PurchaseResponse>`

This asynchronous method performs a purchase to the in-World product based on the provided product ID.

| Parameter         | Type     | Description                    |
| ----------------- | -------- | ------------------------------ |
| productId         | `string` | ID of the product to purchase. |
| reason (optional) | `string` | Explanation for the purchase.  |

**Returns:** [BaseRequest\<PurchaseResponse>](./#baserequest) — A `BaseRequest` object. When the asynchronous process is complete, you can access the `PurchaseResponse` object by the `responseData` property.

### GetCurrenciesAsync

`static GetCurrenciesAsync() → BaseRequest<CurrencyListResponse>`

Asynchronous method to get a list of currencies.
Upon completion, the list of currencies is obtained, and you can access the `CurrencyListResponse` object through the `responseData` property.

**Returns:** [BaseRequest\<CurrencyListResponse>](./#baserequest)

### GetCurrencyAsync

`static GetCurrencyAsync(currencyId: string) → BaseRequest<CurrencyResponse>`

This asynchronous method retrieves the in-World currency information based on the provided product ID.

| Parameter  | Type     | Description                  |
| ---------- | -------- | ---------------------------- |
| currencyId | `string` | ID of the currency to fetch. |

**Returns:** [BaseRequest\<CurrencyResponse>](./#baserequest) — A `BaseRequest` object. When the asynchronous process is complete, you can access the `CurrencyResponse` object by the `responseData` property.

### OpenPurchaseUI

`static OpenPurchaseUI(product: ProductRecord) → void`

This method opens the in-World product purchase UI.

| Parameter | Type                              | Description                                          |
| --------- | --------------------------------- | ---------------------------------------------------- |
| product   | [ProductRecord](./#productrecord) | `ProductRecord` instance of the product to purchase. |

## ProductPurchaseButton

`class`

Class managing the functionality of an in-World product purchase button.

### Properties

| Name      | Type                              | Description                                                                 |
| --------- | --------------------------------- | --------------------------------------------------------------------------- |
| productId | `string`                          | Gets the ID of the in-World product available for purchase.                 |
| product   | [ProductRecord](./#productrecord) | Retrieves the in-World product information associated with the `productId`. |

### Methods

### SetProductId

`SetProductId(productId: string) → void`

Sets the ID of an in-World product available for purchase using this button.

| Parameter | Type     | Description |
| --------- | -------- | ----------- |
| productId | `string` | Product ID. |

## ProductError

`enum`

The error code specifies the reason for the failure of product-related requests.

| Name                             | Value | Description                                                                                                                                     |
| -------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Unknown                          | -1    | Error: Unknown error.                                                                                                                           |
| NetworkError                     | 0     | Error: Errors related to network issues, including disconnections or unstable connections.                                                      |
| UserCanceled                     | 1     | Error: Request is canceled by the user.                                                                                                         |
| ProductRefreshResponseError      | 2     | Error: Invalid product metadata in the request.                                                                                                 |
| ItemPackageProductsResponseError | 3     | Error: Failed to retrieve one or more item information in the item product package.                                                             |
| IAPCardError                     | 4     | Error: Failed to retrieve the on or more currency information in the currency product package.                                                  |
| ProductPriceChanged              | 4001  | Error: Product price mismatch.                                                                                                                  |
| ProductAlreadyPurchased          | 4002  | Error: Product is already purchased.                                                                                                            |
| BalanceOfficialCurrencyNotEnough | 4003  | Error: Insufficient ZEPETO’s official currency (ZEM) balance for the purchase.                                                                  |
| BalanceUserCurrencyNotEnough     | 4004  | Error: Insufficient in-World currency balance for the purchase.                                                                                 |
| ProductNotActive                 | 4005  | Error: Product is not active.                                                                                                                   |
| InvalidCreator                   | 4006  | Error: Player's user ID differs from the World creator's user ID. This error only occurs in the development environment using the Unity editor. |

## OfficialCurrencyBalanceRequest

`class` · extends [BaseRequest\<BalanceResponse>](./#baserequest)

Represents an asynchronous request for retrieving the balance for ZEPETO’s official currency (ZEM).
