Use-case tutorial: Marketplace

In this tutorial, you demonstrate the interactions that are common in a Marketplace.

Allow about 30 minutes to complete this tutorial.

The following diagram shows the interactions that are often found in a digital marketplace and demonstrated in this tutorial.

Diagram of marketplace interactions

To demonstrate common Marketplace interactions, the exercises in this tutorial:

  • Add new users: a payer, a recipient, and a creator
  • Show the payer buying tokens to use in the marketplace
  • Show the payer using tokens to buy digital goods from the recipient
  • Show the recipient receive fiat currency for their earned tokens

API operations in this tutorial

Tutorial interaction API operations used
Create new users Register account
Add a payment method (UI) Add Payment Method widget
Get payer's payment methods Get payment methods
Start token purchase Initiate token purchase
Finish token purchase Execute token purchase
Get wallet info Get wallets by account
View wallet balances Get wallet balances
Check payer's TOS status Check for Terms of Service
Check user's KYC status Check KYC status
Create a user-to-user invoice Create a new invoice
Pay a user-to-user-invoice Pay invoice
Payout tokens as fiat currency Payout UI widget

To complete this tutorial

This tutorial uses requests from the _Manage user accounts and Explore Tilia transactions collections from the shared workspace.

To complete this tutorial successfully:

  1. Make sure the software described in Get started with the tutorials has been installed on your system and configured.
  2. In Postman:
    1. Open the Tilia tutorial workspace you created in Get started with the tutorials for this tutorial.
    2. Make sure you have the Manage user accounts and Explore Tilia transactions collections forked to your Tilia tutorial workspace .
    3. Make sure that you've selected the Tilia Client Info environment and confirmed that it has your Tilia developer credentials.
    4. In your Tilia tutorial workspace , open the list of Collections .

Add new users to the marketplace

The User account tutorials demonstrate these tasks that add new users to your marketplace and prepare them to make transactions:

  1. Add new users to a marketplace.
  2. Add a payment method to the payer so they can buy tokens.
  3. Buy tokens so the payer can purchase digital goods.
  4. View the users' wallets and their current balances.
  5. Ensure that the users have accepted Tilia's Terms Of Service
  6. Ensure that the recipient has provided the necessary tax information to be able to accept payout.

To run these tasks, in another window, open the User account tutorials and follow the tasks to Create new users.

After you complete the User account tutorials, return to this topic and continue to the next section.

Buy digital goods from another user

In this exercise, the payer uses some of the tokens they just purchased from the publisher to buy an In-game digital bundle from another user.

This section includes these interactions:

Tutorial interaction API operations used
Create a user-to-user invoice Create a new invoice
Pay a user-to-user-invoice Pay invoice

To create and pay for the In-game digital bundle, in another window, open Make standard transactions and complete the tutorial.

After you complete the transaction in that tutorial, return to this topic to continue exploring other marketplace interactions.

If you're curious, you can review the wallet balances of the users involved in this transaction by using the exercises in the Get info about transactions tutorial before continuing.

Payout to user

This exercise pays a token balance it its corresponding fiat currency value and deposits the fiat currency value to the user's payment method, such as PayPal.

After a seller (recipient) has earned enough tokens, they can collect the token value as fiat currency. Generally, the seller should have convertible tokens worth USD $5.00 or more before they initiate a payout. If the recipient doesn't have enough tokens for a payout, repeat the Make standard transactions tutorial several times to increase their token balance.

To pay the recipient in fiat currency for the convertible tokens they have collected from sales, complete the Payout to a user tutorial.

Conclusion

The exercises in this tutorial walked you through the interactions that are common in a marketplace. You can build your marketplace on these Tilia services to get started. You can also enhance the marketplace experience by adding these features: