# Aeropay onboarding

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

## 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](/guides/checkout/components/activate).

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 is not 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 frontend code. 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. Find *Aeropay service* and switch the **Active** toggle to on.
5. Click **Edit**, then open the Aeropay account settings.
6. Enter the **Merchant ID**, **API key**, **API secret**, and **Configuration ID** provided by Aeropay.
7. 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.

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

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

If `allowedFundingTypes.payByBanks.aeropay` is missing, or `externalMerchantId` or `configurationId` is empty, the SDK throws `SDK0113` when you create the component. See [Portal and session setup](/guides/checkout/components/web/aeropay/troubleshooting#portal-and-session-setup).

## What's next?

* **[Implementation](/guides/checkout/components/web/aeropay/implementation):** Integrate the Aeropay button into your checkout.
* **[Testing](/guides/checkout/components/web/aeropay/testing):** Test your integration in the UAT environment.
* **[How it works](/guides/checkout/components/web/aeropay/how-it-works):** Understand the Aeropay payment and payout flows.


If you run into setup issues, see [Portal and session setup](/guides/checkout/components/web/aeropay/troubleshooting#portal-and-session-setup) in Troubleshooting.