Payment

Overview

The Payment service allows transactions to be performed with both real and virtual currency, and integrates with Adyen, Xsolla, PayPal, AliPay, WxPay, and wallet services. The payment service provides a retry mechanism that prevents notifications from failing to appear during the payment process. This retry mechanism will resend failed notifications until the client acknowledges their receipt, or the maximum number of retries has been reached.

The Payment service includes several features to support the payment process, including:

  • Real and virtual currency One payment service can cover both real currency purchases of games or add-ons, or in-game purchases of items or boosters using AccelByte coins.
  • Support for multiple payment providers AccelByte Payment services can integrate with Adyen and Xsolla payment aggregators, and can accept payments from PayPal, Visa, Mastercard, AliPay, and WxPay.
  • Payment account management Our Admin Portal allows you to manage what types of payments you accept and configure your payment aggregators.
  • Customized payment station You can change the look of your payment station to highlight your brand.
  • Email notifications for paid orders Players receive email verification of successful transactions.

Tutorials

Setting Up Payment Configuration

The AccelByte Payment Configuration feature helps to manage your payment process, such as setting up a new payment configuration for different regions or namespace using a different Payment Aggregator and Payment Methods. This feature enables you to have a personalized payment configuration according to where and how you want the payment process to be carried out.

How to Set Up Payment Configuration in the Admin Portal

  1. Add a new configuration by selecting the Payment Configurations > Payment Configurations menu in Admin Portal and the Payment Configurations page will appear.

    setting-up-payment-configuration

  2. Click the New Configuration button to create a new payment configuration.

    setting-up-payment-configuration

  3. Then, the Add New Configuration modal will appear.

    setting-up-payment-configuration

  1. Select whether you want to use the new configuration for a single Namespace or All Namespace in the Namespace selection.

  2. In selecting a Region, you can select all regions or a single region.

  3. Select your payment aggregator from the Payment Aggregator dropdown list.

  4. Select your payment method from the Payment Method dropdown list. You can add more than one payment method.

  5. Finally, click the Add button to add the new configuration or click the Cancel button to cancel the process.

  6. After that, you will automatically be directed to the Payment Configurations detail page. If you are not directed automatically, you can click the View button on Payment Provider Configuration list.

    setting-up-payment-configuration

How to Manage Payment Configuration Basic Info.

  1. In the Payment Configurations detail page, go to the Basic Info panel. There, you can change your payment aggregator in the Payment Aggregator selection.

    setting-up-payment-configuration

  2. You can also change or add more payment methods in the Payment Methods selection. To do so, click the Add more… button. The Edit Configuration modal will appear.

    setting-up-payment-configuration

  3. Select the additional payment methods from the Payment Methods dropdown list.

  4. Click the Submit button to submit the new payment method. You can click the Cancel button to cancel the process.

How to Manage Payment Aggregator.

The payment aggregator setting detail will automatically change according to the selected payment aggregator. In this case, Adyen payment aggregator is being used.

  1. In the Payment Aggregator panel, click Configure Now button to set your first configuration.

    setting-up-payment-configuration

  2. After that, the Adyen Configuration window will appear and you can fill in the appropriate fields.

    setting-up-payment-configuration

  3. Once you are done, click the Add button to submit the Adyen Configuration.

    setting-up-payment-configuration

How to Manage Payment Methods.

The payment method setting detail will automatically change according to the selected payment method. In this case, Alipay payment method is being used.

  1. In the AliPay tab in the Payment Methods panel, input the App ID in the text box by clicking the Pencil button.

setting-up-payment-configuration

  1. Then, click the Check button to add the App ID and click the X button to cancel it.
  2. Input the Private Key by clicking the Pencil button.
  3. Input the Public Key by clicking the Pencil button.
  4. Input the Return URL by clicking the Pencil button.
  5. Click the Test button to test the payment configuration.

Please use the steps above as the references to manage the AliPay Sandbox in the AliPay Sandbox tab.

Configuring Adyen as a Payment Aggregator

In setting up a payment configuration, you need to have an account in Adyen or Xsolla as they are the payment aggregator. In this documentation, setting up Adyen will be used as the example.

Getting the API Key in Adyen

An API key is a unique value that is used to authenticate API requests from a particular account. The AccelByte Payment Aggregator also uses Adyen as the payment aggregator, thus you will need to provide the API Key in each of your API requests to the Adyen payment platform. Please see below for instructions on how to generate an API Key:

How to the Get API Key in Adyen
  1. First, log in to your Customer Area.
  2. Then, navigate to Account and choose Users.
  3. After that. click the user ws@Company.[YourCompanyAccount].
  4. Under Authentication, click Generate New API Key.

Don't forget to copy and securely store the API Key in your system. If you lose this API Key you won't be able to restore.

  1. Finally, click Save at the bottom of the page.

Getting HMAC Keys and Skins

In order to use the Signature Calculation, you need to generate a secret HMAC keys. These request is used to ensure the authenticity and data integrity of an incoming requests to Adyen. Please see below for instructions on how to obtain these keys for the test and live platform:

How to Get HMAC Keys and Skins
  1. First, sign in to the Customer Area using your company-level account.
  2. After that, from the main menu, select Account and choose Skins.
  3. Then, select an existing skin from the List tab or create a new skin by switching to the New tab.
  4. Next, click Generate new HMAC key both for the Test platform and Live platform.
  5. Then copy the new keys and store them in a secure place in your system to access these values later.

configuring-adyen-as-payment-aggregator

  1. You also need to provide a description for this skin.
  2. Finally, in order to save the skin, you need to click the Create New Skin on Test at the bottom of the page.

For more detailed information, please click here.

Setting Up Notifications

The notification is a required process that need to be carried out when integrating with the Adyen payments platform. Please see below for instructions on how to obtain set up the Notification:

How to Set Up Notification
  1. Go to your Customer Area and select Account.
  2. After that, select Server Communication.
  3. Then, click the Add button in the Standard Notification.
  4. Next, under the Transport, enter your server's:
  • URL.
  • SSL Version.
  • CommunicationMethod(JSON, SOAP, or HTTP POST).
  1. Enter the Username and Password in the Authentication.
  2. Generate your Notification HMAC key in the additional settings page.

configuring-adyen-as-payment-aggregator

  1. Finally, click Save Configuration.

Customizing Payment Methods

How to Customize Payment Methods
  1. Go to your Customer Area and select Account.
  2. After that, choose the Payment Methods.

configuring-adyen-as-payment-aggregator

  1. Finally, you can do the customization.

configuring-adyen-as-payment-aggregator

Configuring Xsolla as a Payment Aggregator

In setting up a payment configuration, you can also use Xsolla as the payment aggregator if you are not using Adyen. Please see below for more information on how to set up Xsolla.

Setting Up an Xsolla Project

  1. Open the Xsolla Publisher Dashboard.

  2. Go to Projects, from the left sidebar menu.

  3. On the Projects page, click Create a new project.

  4. Fill the following information.

  5. Make sure to enable Simple Checkout.

  6. Also, make sure to enable External ID under the Advanced Settings (you can leave other configurations as default).

  7. Save the configuration to complete.

  8. After the configuration is saved, the Project Number will be generated in front of the Project Name. You will need to edit the project again to add the project number to the Webhook URL as shown on the following example

    Dev environment:

    https://dev.example.accelbyte.io/platform/public/xsolla/project/53217/notifications

    Production environment:

    https://example.com/platform/public/xsolla/project/53217/notifications

Integrating Admin Portal with XSOLLA

  1. Make sure you have logged in to our Admin Portal.

  2. Go to the Payment Configurations menu under the Platform Configurations dropdown on the top-right header.

    payment

  3. Add a new configuration by clicking the New Configuration button.

    payment

  4. Fill in the required information

    payment

    • In the Namespace field choose All Namespace
    • In the Region field choose All Region
    • Select Xsolla from the dropdown menu in the Payment Aggregator field
    • Leave the Payment Method empty.
  5. Click Submit to continue. You will be redirected to the Payment Configuration page.

  6. On the Payment Aggregator section, under the Xsolla tab, fill in the required information.

    payment

    • Input your Xsolla Merchant ID.

    • Input your Project ID / Project Number from Xsolla

    • Input your Project Secret Key from Xsolla

    • Input the API Key to get your Xsolla API key, please check the tutorial to Retrieving Xsolla API key on the next section.

    • Input the Completion URL with the appropriate format. See below for the example.

      Dev environment:

      https://dev.example.accelbyte.io/paymentCallback

      Production environment:

      https://example.com/paymentCallback
  1. Click the Test button, and make sure you get Xsolla Configured Correctly notification.

Retrieving Xsolla API Key

  1. Open the Xsolla Publisher Dashboard.
  2. Click Settings - Company from the top navigation menu.
  3. You can copy your Xsolla API Key under the API Key section.
  4. You can also click generate and save if you haven’t already got one.

Xsolla Simple Checkout Test

  1. Open the Xsolla Publisher Dashboard.
  2. Go to Projects, from the left sidebar menu.
  3. Click the Simple Checkout link, on your selected project.
  4. You will be redirected to the sample checkout page. You can test if the simple checkout works by entering the following information.
    • Input your AccelByte account User ID. You will get the user ID once you are registered to the AccelByte account.
    • Input the Xsolla Invoice ID. You can fill it with a random number for testing purpose
    • Input the transaction Amount you wish to test
    • Select the preferred Currency from the dropdown list
    • Input the Invoice ID. You can fill it with a random string for testing purpose.
  5. Click the Test button and make sure all the test result indicators are green.
  6. Go to the next step by clicking Launch on the top navigation bar.
  7. Make sure The module is launched in enabled.

What’s Next?

  • For more information about the Payment service check out the API Reference.