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.
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
Add a new configuration by selecting the Payment Configurations > Payment Configurations menu in Admin Portal and the Payment Configurations page will appear.
Click the New Configuration button to create a new payment configuration.
Then, the Add New Configuration modal will appear.
Select whether you want to use the new configuration for a single Namespace or All Namespace in the Namespace selection.
In selecting a Region, you can select all regions or a single region.
Select your payment aggregator from the Payment Aggregator dropdown list.
Select your payment method from the Payment Method dropdown list. You can add more than one payment method.
Finally, click the Add button to add the new configuration or click the Cancel button to cancel the process.
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.
How to Manage Payment Configuration Basic Info.
In the Payment Configurations detail page, go to the Basic Info panel. There, you can change your payment aggregator in the Payment Aggregator selection.
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.
Select the additional payment methods from the Payment Methods dropdown list.
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.
In the Payment Aggregator panel, click Configure Now button to set your first configuration.
After that, the Adyen Configuration window will appear and you can fill in the appropriate fields.
Once you are done, click the Add button to submit the Adyen 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.
- In the AliPay tab in the Payment Methods panel, input the App ID in the text box by clicking the Pencil button.
- Then, click the Check button to add the App ID and click the X button to cancel it.
- Input the Private Key by clicking the Pencil button.
- Input the Public Key by clicking the Pencil button.
- Input the Return URL by clicking the Pencil button.
- 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
- First, log in to your Customer Area.
- Then, navigate to Account and choose Users.
- After that. click the user ws@Company.[YourCompanyAccount].
- 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.
- 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
- First, sign in to the Customer Area using your company-level account.
- After that, from the main menu, select Account and choose Skins.
- Then, select an existing skin from the List tab or create a new skin by switching to the New tab.
- Next, click Generate new HMAC key both for the Test platform and Live platform.
- Then copy the new keys and store them in a secure place in your system to access these values later.
- You also need to provide a description for this skin.
- 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
- Go to your Customer Area and select Account.
- After that, select Server Communication.
- Then, click the Add button in the Standard Notification.
- Next, under the Transport, enter your server's:
- SSL Version.
- CommunicationMethod(JSON, SOAP, or HTTP POST).
- Enter the Username and Password in the Authentication.
- Generate your Notification HMAC key in the additional settings page.
- Finally, click Save Configuration.
Customizing Payment Methods
How to Customize Payment Methods
- Go to your Customer Area and select Account.
- After that, choose the Payment Methods.
- Finally, you can do the customization.
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
Open the Xsolla Publisher Dashboard.
Go to Projects, from the left sidebar menu.
On the Projects page, click Create a new project.
Fill the following information.
Input the Project Name
Input your Website URL
Input your project Description
Input the Webhook URL with the appropriate format. See below for the example of the Webhook URL.
- You can copy and paste the format then adjust the link with your own URL. The project number will be generated after the configuration is saved. You will need to edit the Webhook URL again after you have the project number ready.
Generate the Secret Key and make sure to store it somewhere safe. You will need the key for the Payment Station configuration in the AccelByte admin portal.
Make sure to enable Simple Checkout.
Also, make sure to enable External ID under the Advanced Settings (you can leave other configurations as default).
Save the configuration to complete.
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
Integrating Admin Portal with XSOLLA
Make sure you have logged in to our Admin Portal.
Go to the Payment Configurations menu under the Platform Configurations dropdown on the top-right header.
Add a new configuration by clicking the New Configuration button.
Fill in the required information
- 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.
Click Submit to continue. You will be redirected to the Payment Configuration page.
On the Payment Aggregator section, under the Xsolla tab, fill in the required information.
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.
- Click the Test button, and make sure you get Xsolla Configured Correctly notification.
Retrieving Xsolla API Key
- Open the Xsolla Publisher Dashboard.
- Click Settings - Company from the top navigation menu.
- You can copy your Xsolla API Key under the API Key section.
- You can also click generate and save if you haven’t already got one.
Xsolla Simple Checkout Test
- Open the Xsolla Publisher Dashboard.
- Go to Projects, from the left sidebar menu.
- Click the Simple Checkout link, on your selected project.
- 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.
- Click the Test button and make sure all the test result indicators are green.
- Go to the next step by clicking Launch on the top navigation bar.
- Make sure The module is launched in enabled.
- For more information about the Payment service check out the API Reference.