Skip to content

Aeropay onboarding

Configure Aeropay in the Unity Portal and connect your merchant account.

At createComponent(), the Android SDK requires non-empty session allowedFundingTypes.payByBanks.aeropay.externalMerchantId and configurationId.

Before you start

If you haven't already, make sure that you have activated the Components service in the Unity Portal. For more information, see Activate Components.

You'll also need the following account details, provided by Aeropay:

  • Merchant ID
  • API key
  • API secret
  • Configuration ID

Step 1: Ensure Aeropay is enabled at the merchant group level

Aeropay must be enabled for your merchant group before it can be configured on individual sites.

  1. In the Unity Portal, go to Merchant setup > Merchant groups.
  2. Select your merchant group.
  3. In the Services tab, find Aeropay service.
  4. If Aeropay isn't listed, click Add service and select Aeropay.

Step 2: Get your PXP API credentials

Your backend needs API credentials to create checkout sessions with HMAC authentication.

  1. In the Unity Portal, go to Merchant setup > Merchant groups.
  2. Select your merchant group.
  3. Click the Inbound calls tab.
  4. Copy the Client ID shown in the top-right corner.
  5. Click + New token to create an authentication token.
  6. Choose an expiry period and click Save.
  7. Copy both the token ID and token value. Store these securely on your backend.

Never expose your token value or HMAC credentials in your Android app. Session creation must happen on your backend.

Step 3: Configure Aeropay on your site

Add your Aeropay account details to each site where you'll accept Aeropay payments or payouts.

  1. In the Unity Portal, go to Merchant setup > Sites.
  2. Select the site you want to enable Aeropay for.
  3. Click the Services tab.
  4. Select Aeropay service and click Edit.
  5. Enter the Merchant ID, API key, API secret, and Configuration ID provided by Aeropay.
  6. Click Save in the top right.

Step 4: Verify session configuration

After saving your Aeropay account settings, create a test session from your backend and confirm that Aeropay is included in the response.

Include Aeropay in the session request. Set transactionMethod.intent.aeropay and amounts.currencyCode to USD:

{
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "amounts": {
    "currencyCode": "USD",
    "transactionValue": 25.00
  },
  "transactionMethod": {
    "intent": {
      "aeropay": "Authorisation"
    }
  }
}

For the full session-creation request, including HMAC authentication, see Install the Android SDK — Step 4.

A correctly configured session includes Aeropay pay-by-bank settings:

{
  "sessionId": "c5f0799b-0839-43ce-abc5-5b462a98f250",
  "hmacKey": "904bc42395d4af634e2fd48ee8c2c7f52955a1da97a3aa3d82957ff12980a7bb",
  "encryptionKey": "20d175a669ad3f8c195c9c283fc86155",
  "data": "eyJzZXNzaW9uSWQiOiJjNWYwNzk5Yi0wODM5LTQzY2UtYWJjNS01YjQ2MmE5OGYyNTAifQ==",
  "allowedFundingTypes": {
    "payByBanks": {
      "aeropay": {
        "externalMerchantId": "your-aeropay-merchant-id",
        "configurationId": "your-aerosync-configuration-id"
      }
    }
  }
}

The Merchant ID saved in the Unity Portal is returned in the session as allowedFundingTypes.payByBanks.aeropay.externalMerchantId. Map this value into SessionConfig.allowedFundingTypes.payByBanks.aeropay.externalMerchantId when initialising the SDK.

The excerpt above shows the Aeropay-specific fields. The full Sessions API response also includes data and other standard session fields required by Android SessionConfig. Pass the complete session payload to your app. See Install the Android SDK.

Map the Aeropay funding fields into SessionConfig as follows. Use null-safe access so a missing Aeropay block doesn't crash your parsing before the SDK can throw SDK0113:

val aeropay = sessionResponse.allowedFundingTypes?.payByBanks?.aeropay
allowedFundingTypes = AllowedFundingTypes(
    payByBanks = PayByBanksConfig(
        aeropay = AeropayFundingConfig(
            externalMerchantId = aeropay?.externalMerchantId,
            configurationId = aeropay?.configurationId,
        ),
    ),
)

Empty or missing values still cause SDK0113 at createComponent() — this snippet is for safe parsing, not a substitute for a valid session.

If allowedFundingTypes.payByBanks.aeropay is missing, or externalMerchantId or configurationId is empty, checkout.createComponent(ComponentType.AERO_PAY_BUTTON, …) throws a BaseSdkException subclass with errorCode = SDK0113. See Portal and session setup and the error-handling sample.

After verifying the session response, set transactionData.currency to "USD", transactionData.entryType to EntryType.Ecom, and transactionData.intent.aeropay to an AeropayIntentType value. If any of these are wrong or missing, createComponent(ComponentType.AERO_PAY_BUTTON, …) throws a BaseSdkException subclass:

Error codeCause
SDK0114transactionData.entryType isn't EntryType.Ecom
SDK0115transactionData.intent.aeropay isn't set
SDK0116transactionData.currency isn't "USD"

See Troubleshooting — Setup and configuration. For the full initialisation sample, see Implementation.

What's next?

  • Implementation: Integrate the Aeropay button into your Android app.
  • Testing: Test your integration in the UAT environment.
  • How it works: Understand the Aeropay payment and payout flows.

If you run into setup issues, see Portal and session setup in Troubleshooting.