Last Updated: 9/6/2021, 8:19:04 AM

# Currency

# Overview

AccelByte Commerce services allow you to define what currencies you can accept for payment. Both real and virtual currencies are supported.

In the Admin Portal, you can assign different currencies to different namespaces. For example, if you have separate Game and Publisher namespaces, the Game namespace can have virtual currency assigned to it and the Publisher namespace can use real-world currency.

# Permissions

Permissions are used to grant access to specific resources within our services. Make sure your account has the following permissions before you attempt to manage currency in the Admin Portal. For a full list of permissions that impact currency management, see the Platform/Commerce tab of the permissions reference (opens new window).

Usage Permission Tag Action
Create a Currency ADMIN:NAMESPACE:{namespace}:CURRENCY Create

Permissions work slightly differently depending on whether they are assigned to IAM Clients or Roles assigned to users. For more information, read the Authentication and Authorization documentation.

# Managing Currency in the Admin Portal

# Create a Currency

You can create a currency so that you can price the items or games that you’ve created. To create a new currency, follow the steps below:

  1. In the Publisher Namespace, go to the E-Commerce section and click the Currencies menu.

    currency

  2. In the Currencies page, click Add to add a new currency

    currency

  3. After the Add Currency form appears, fill out in the appropriate fields.

    • Select the Currency Type. Select Real if you want to create a real currency and Virtual if you want to create a virtual currency.
    • Input the Currency Code with a unique code that represents a country’s currency. For example USD for United States Dollar. For real currencies, follow the ISO_4217 standardization. For virtual currencies, you can create your own code
    • Input the Currency Symbol.
    • Input the maximum amount per transaction in the Max. Amount/Transaction field. By default, the value is -1 for an unlimited amount.
    • Input the maximum transaction amount per day in the Max. Transaction Amount/Day field. By default, the value is -1 for an unlimited amount.
    • Input the maximum balance a player can have in the Max. Balance Amount field. By default, the value is -1 for an unlimited amount.

    currency

  4. When you’re done, click Add and your new currency will be added to the list.

    currency

# Managing Currency using API

# Create a Currency

  1. Use the Create a Currency: POST /admin/namespaces/{namespace}/currencies endpoint.
  2. Input the Namespace field with the Publisher Namespace.
  3. Fill out the Request Body:
    • Input the Currency Code.
    • Input the Localization Description with the localized name of your currency, if needed.
    • Input the Currency Symbol.
    • Input the Currency Type. The choices are either real or virtual currency.
    • Input the Decimals if you are choosing the Real currency type.
    • Input the maximum amount per transaction in the Max. Amount/Transaction field. By default, the value is -1 for an unlimited amount.
    • Input the maximum transaction amount per day in the Max. Transaction Amount/Day field. By default, the value is -1 for an unlimited amount.
    • Input the maximum balance a player can have in the Max. Balance Amount field. By default, the value is -1 for an unlimited amount.

Upon successful request, the player’s wallet information will appear. Here is an example of a response to a successful request: