CREATE YOUR WORLD
Economy

Gifting API

11min

You can use the gifting API to gift clothing items to other users within ZEPETO World.

However, when using the API, the sender's goods will be deducted.



Install

Window → Package Manager → ZEPETO.World Package Please install version 1.21.14 or higher first.

Afterward, please install the ‘ZEPETO.Module’ package with a version of 1.0.7 or higher.

Ensure that the ZEPETO app is running the version 3.46.000 or higher.

Document image




Gifting API

To use the gifting API, add the import statement below.

TypeScript




If you're interested in the Gifting API, refer to the documentation:

📘 Please refer to the following guide. [ZEPETO.Module.Shop API]



  • In the Unity editor, you can test both success and failure cases. Even if gifting is successful, it will not deduct any currency, and the gift will not be delivered to the recipient.
  • During mobile testing via QR codes or test links, successful transactions will result in actual currency deduction and the gift will be delivered to the recipient.



Usage example

  • Please add a Send Gift Button to the Canvas.
  • Please write the example code as below.
TypeScript




  • After writing the script, connect the button in the inspector and enter the userID and itemID of the person who will receive the gift.

📘 Please refer to the following guide on how to obtain Zepeto Player's UserId. [ZEPETO Player]



  • To test success or failure cases, create a QR code and then test on your mobile device.
  • However, please note that the sender's goods will be deducted.



When sending a gift is successful

  • When you click the button, a pop-up UI for sending a gift will appear.
Document image




  • If the gift is sent successfully, a Toast UI will appear to indicate success, and the example script will generate a log
Document image




Document image




  • Additionally, a gift has arrived for targetUser.
Document image




When sending a gift fails

  • If the case corresponds to ErrorCode, an error message will be displayed in the Toast UI, and the example script will output the corresponding error code.
Document image




Document image