Skip to main content

Managing currencies

Last updated on April 4, 2024

Overview

This article will explain how you can configure the currencies that can be accepted for Store transactions using your Admin Portal. You can configure both real-world and virtual currencies to allow your players to transact using those currencies. Virtual currencies that you create can also be earned by or awarded to players. You will need to set up at least one currency prior to creating a store or item.

notes
  • If you create your currency in the Publisher Namespace, your currency will be available in every namespace.
  • If you create your currency in a specific Game Namespace, your currency will only be available in that specific namespace.
  • If you create a currency with the same code and symbol in multiple Namespaces, they will be treated as different currencies.

Currency Overview

Goals

  • Explain how to Manage Real Currencies
  • Explain how to Manage Virtual Currencies

Prerequisites

  • Access to the AccelByte Admin Portal
  • You have created the appropriate Namespaces

Manage Real Currencies in Admin Portal

AGS Starter

The Real Currencies feature is not yet supported in AGS Starter.

Creating a real currency in the Admin Portal will make that currency available to your players for transactions.

Create Currency

  1. In the desired Namespace, go to the E-Commerce section and open the Currencies menu.

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

  3. The Add Currency form will open. Fill out the required fields:

    • Real Currency will have two decimals when used in prices.
    • Select the Currency Type and select Real to create a real currency.
    • Input the unique identifying code for the currency in the Currency Code field. For real currencies, follow ISO_4217 standardization, such as USD for United States Dollar.
    • Input the symbol associated with the currency in the Currency Symbol field, such as "$". To input a symbol that isn't on your keyboard, input the Unicode for that symbol.

Create Currency

  1. Once completed, click Add. Your new currency will be added to the list.

Manage Virtual Currencies in Admin Portal

Creating a virtual currency in the Admin Portal will make that currency available to your players for transactions.

  1. In the desired Namespace, go to the E-Commerce section and open the Currencies menu.

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

  3. The Add Currency form will open. Fill out the required fields:

    • Select the Currency Type, and select Virtual to create a virtual currency.
    • For virtual currencies, you can create your own currency code.
    • Input the symbol associated with the currency in the Currency Symbol field (e.g., "$"). To input a symbol that isn't on your keyboard, input the Unicode for that symbol. For virtual currencies, you can input any character combination you like, up to eight characters.
  4. Once completed, click Add. Your new currency will be added to the list.

Retrieve Supported Currencies Using the SDK

Our client SDKs for Unity and Unreal Engine can also be used to allow game clients to retrieve information about the currencies you've configured in the Admin Portal.

FAccelByteModelsCurrencyList currencyListResult;
bool bGetCurrencyListDone = false;

FString Namespace = TEXT("sample-namespace");
TArray<FAccelByteModelsCurrencyList> GetCurrencyListAllTypeResult;

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient(TEXT("your-key"));
ApiClient->Currency.GetCurrencyList(Namespace,
THandler<TArray<FAccelByteModelsCurrencyList>>::CreateLambda([=]
(const TArray<FAccelByteModelsCurrencyList>& Result)
{
// Do something if GetCurrencyList has been successful
UE_LOG(LogTemp, Error, TEXT(" Success"));
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if QueryUserAchievements has an error
UE_LOG(LogTemp, Error, TEXT("Error. Code: %d, Reason: %s"), ErrorCode, *ErrorMessage)
});