Skip to main content

Setting up payments

Last updated on March 14, 2024

Overview

The payment service included in AccelByte Gaming Services (AGS) allows transactions to be performed with both real and virtual currency, and can integrate with Adyen, Xsolla, Stripe, 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.

AGS Starter

The Payment service feature is not yet supported in AGS Starter.

AGS's Payment service boasts 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. Our payment service can integrate with Adyen, Xsolla, and Stripe payment aggregators, and can accept payments from PayPal, Visa, Mastercard, AliPay, and WxPay.
  • Payment account management. Our Admin Portal allows you to configure your payment aggregators and manage what types of payments you accept.
  • Customized payment station. You can change the look of your payment station to highlight your brand.
  • Email notifications. Players receive email verification of successful transactions.

Goals

  • Explain in detail on how to Setup payment in the Admin Portal for Adyen, Xsolla, Stripe, and Checkout.
  • Explain in detail on how to Manage payment methods.

Prerequisites

  • Access to AccelByte Admin Portal
  • Appropriate Namespaces are created

Configure Adyen for payments

  1. In the Admin Portal, go to the top-right menu menu, click Platform Configurations, and select Payment Configurations.

    click platform configurations for Adyen

  2. Click New Configuration.

    click new configuration button for Adyen

  3. Fill in the required fields.

    add new configuration for Adyen

    • Select the Namespace for the payment configuration. You can select all namespaces if desired.
    • Select the Region for the payment configuration. You can select all regions if desired.
    • Select Adyen from the Payment Aggregator dropdown list.
    • You can leave the Payment Methods field empty.
    • If you want to use TaxJar, enable the TaxJar Integration option. The Production and Sandbox API Token fields will fill automatically based on your global TaxJar configuration if one exists. Change the Production API Token value to the token from the TaxJar account you want to use for this namespace. You can choose to use the global Sandbox API Token, or use your own.
  4. Once completed, click the Submit button and you will be redirected to the Payment Configuration page.

  5. In your newly created payment configurations, go to the Payment Aggregator section and click the Configure Now button.

    click the configure now button for Adyen

  6. Fill in the required fields.

    fill out configuration for Adyen

    • Input the API Key from Adyen.
    • Input the Adyen Merchant Account.
    • Input the Notification Hmac Key.
    • Input the Notification Username and Password.
    • Input the Return URL.
    • Input the Live Endpoint URL Prefix
    • Choose if you want to enable Authorize as Capture
  7. Once completed, click Add to save your configuration.

Set up the Adyen Drop-In SDK

In response to Adyen's decision to phase out Checkout Web SDK, AccelByte has started migrating to Drop-in. If you currently use Checkout Web SDK, you will need to follow the below steps to migrate.

  1. In the Adyen Payment Configuration Details page, scroll down to Payment Aggregator (ADYEN) and click the Drop-In Setting tab. Adjust these settings according to your preferences. See Adyen's optional configuration guide for a full list of settings with descriptions.

    configure Adyen Drop-In Setting tab

Configure Xsolla for payments

  1. In the Admin Portal, go to the Payment Configurations menu under the Platform Configurations dropdown on the top-right header.

    click platform configurations for Xsolla

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

    click new configuration button for Xsolla

  3. Fill in the required information.

    add new configuration for Xsolla

    • Select the Namespace for the payment configuration. You can select all namespaces if desired.
    • Select the Region for the payment configuration. You can select all regions if desired.
    • Select Xsolla from the Payment Aggregator dropdown list.
    • You can leave the Payment Methods field empty.
  4. Click Submit to continue. You will be redirected to the Payment Configuration page.

  5. In the Payment Aggregator section, under the Xsolla tab, fill in the required information.

    fill out payment configuration details for Xsolla

    • Input your Xsolla Merchant ID.
    • Input your Project ID / Project Number from Xsolla.
    • Input your Project Secret Key from Xsolla.
    • Input the API Key from Xsolla.
    • Input the Completion URL with the appropriate format, as seen below:
      • Dev environment: https://dev.example.accelbyte.io/paymentCallback
      • Production environment: https://example.com/paymentCallback
  6. Click the Test button and make sure you get Xsolla configured correctly notification.

    Xsolla configured correctly notification

Configure Stripe for payments

  1. In the Admin Portal, go to the Platform Configurations dropdown and choose Payment Configurations.

    click platform configurations for Stripe

  2. Click the New Configuration button to add a new configuration.

    click new configuration button for Stripe

  3. Fill in the required fields.

    add new configuration for Stripe

    • Select the Namespace for the payment configuration. You can select all namespaces if desired.

    • Select the Region for the payment configuration. You can select all regions if desired.

    • Select Stripe from the Payment Aggregator dropdown list.

    • You can leave the Payment Methods field empty.

    • If you want to use TaxJar, enable the TaxJar Integration option. The Production and Sandbox API Token fields will fill automatically based on your global TaxJar configuration if one exists. Change the Production API Token value to the token from the TaxJar account you want to use for this namespace. You can choose to use the global Sandbox API Token, or use your own.

      When you're done, click the Submit button and you will be redirected to the Payment Configuration page.

  4. In the Payment Aggregator section, click Configure Now.

    click the configure now button for Stripe

  5. Fill in the required fields.

    • Input the Publishable Key field with the key you received from the Stripe dashboard.

    • Input the Secret Key field with the key you received from the Stripe dashboard.

    • Input the Webhook Secret field with the secret you received from the Stripe dashboard.

      fill out configuration for Stripe

  6. Click the Test button and make sure you receive a notification that Stripe has been configured correctly.

    placeholder

Configure Checkout for payments

  1. In the Admin Portal, go to the Payment Configurations menu under the Platform Configurations dropdown on the top-right header.

    click platform configurations for Checkout

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

    click new configuration button for Checkout

  3. Fill in the required fields.

    add new configuration for Checkout

    • Select the Namespace for the payment configuration. You can select all namespaces if desired.
    • Select the Region for the payment configuration. You can select all regions if desired.
    • Select Checkout from the Payment Aggregator dropdown list.
    • You can leave the Payment Methods field empty.
    • If you want to use TaxJar, enable the TaxJar Integration option. The Production and Sandbox API Token fields will fill automatically based on your global TaxJar configuration if one exists. Change the Production API Token value to the token from the TaxJar account you want to use for this namespace. You can choose to use the global Sandbox API Token, or use your own.
  4. In the Payment Aggregator section, click the Configure Now button.

    click the configure now button for Checkout

  5. A configuration form appears. Fill in the required information.

    • Input the Public Key from checkout.com.

    • Input the Secret Key from checkout.com.

      fill out configuration for Checkout

      After entering the payment configuration, you'll be directed to the Payment Configuration Details. You can click the Test button to make sure that your payment aggregator configuration is working.

      Checkout configured correctly notification

Manage your payment methods

After you've configured your payment aggregator, you can also configure the payment methods you support.

  1. In the Admin Portal, go to Payment Configurations Details and scroll down to the Payment Methods panel.

    navigate to payment methods panel in admin portal

  2. In the Payment Methods section, choose your payment method and input the required information.

    • For AliPay:

      • Input the App ID from the AliPay platform.
      • Input the Private Key.
      • Input the Public Key.
      • Input the Return URL.
    • For AliPay Sandbox:

      • Input the App ID from the AliPay Sandbox platform.
      • Input the Private Key.
      • Input the Return URL.
      • Input the Public Key.
    • For WxPay:

      • Input the App ID from the WxPay platform.
      • Input the Key.
      • Input the MCHID.
      • Input the Return URL.
      • Upload the Certificate AWS Path by clicking the Upload button and searching for the file on your computer.
      • Input the Return URL.
    • For PayPal:

      • Input the Client ID from the PayPal platform.
      • Input the Client Secret.
      • Input the Webhook ID.
      • Input the Return URL.
    • For PayPal Sandbox:

      • Input the Client ID from the PayPal platform.
      • Input the Client Secret.
      • Input the Webhook ID.
      • Input the Return URL.

    Once completed, click the Test button to test the payment configuration.

Payment metadata history

You can view detailed payment metadata history in the Admin Portal.

  1. In the Admin Portal, go to the E-Commerce section, open the Sales section, and select Payment Metadata.

    click payment metadata in admin portal

  2. Here you can see a list of all the payment metadata history in your game namespace. To see the details of a specific payment, click View in the Action column of your selected metadata.

    click view in payment metadata list

  3. The Metadata List will appear. Here you can see the selected metadata's detailed information.

    metadata details

TaxJar integration

In some countries and regions, sales tax needs to be collected during the sale of digital products. Tax law can differ depending on the state, city, or even the district that the player making the purchase lives in. To comply with all of these different regulations, tax handling services can be used. AGS supports integration with TaxJar, which can be used to automatically calculate and apply sales tax to online purchases.

Integration with TaxJar allows you to configure how sales tax is applied to online purchases. There are two types of configurations that you can create in the Admin Portal:

  • Global Configurations apply to all purchases across all namespaces and payment configurations.
  • Specific Configurations for TaxJar apply only to a specific payment configuration or a specific game namespace.

This can be used if the publisher and developer of your game have separate TaxJar accounts, or are located in different regions. This way, even if the publisher's TaxJar account is used for the global configuration, online sales made in the game can still use the developer's TaxJar account for sales tax calculation.

For now, TaxJar can only be enabled for online stores published in the United States (US). Follow the tutorials below to create a global or specific TaxJar integration.

Create a global tax configuration

  1. On the Payment Configuration page of the Admin Portal, switch to the TaxJar Integration tab.

    TaxJar integration tab on payment configuration page

  2. On the TaxJar Integration tab, toggle the integration to enable.

    enable TaxJar integration

  3. Fill in the TaxJar Configuration form.

    TaxJar configuration form

  4. Next, add the appropriate TaxJar product codes to each item type in the TaxJar Product Codes Mapping panel by clicking the pencil icon next to each item type and typing the product code. For digital goods, the product tax code is 31000. You can also browse a list of TaxJar codes in the TaxJar documentation.

    payment configuration TaxJar code mapping

Create a specific tax configuration

  1. On the Payment Configuration page of the Admin Portal, click the New Configuration button.

    click new configuration button for specific taxes

  2. Fill in the Add New Configuration form that appears with the required information:

    add new configuration for specific taxes

    • Select the Single Namespace option and select the game namespace this configuration will apply to from the dropdown menu.
    • Select the Region the payment configuration will apply to. For now, TaxJar can only be used for online purchases made in the US.
    • Select the Payment Aggregator you're using from the dropdown menu.
    • Select the Payment Methods you're using. This field is optional.
    • Enable the TaxJar Integration option. The Production and Sandbox API Token fields will fill automatically based on your global TaxJar configuration if one exists. Change the Production API Token value to the token from the TaxJar account you want to use for this namespace. You can choose to use the global Sandbox API Token or use your own.

    When you're done, click Submit.

    The specific configuration has been added to the Payment Configuration Details page.

    specific configurations details page

    After setting up either a global or specific TaxJar configuration, your TaxJar account will be used to calculate and apply sales tax to online purchases made in your game and publishing platform.

    example payment page with TaxJar tax calculation