> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Airpay

> Add Airpay as a payment provider on Optimizer.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

Airpay is an integrated omnichannel payment processing platform designed for businesses in India, offering solutions for mobile, online and offline transactions. It acts as a payment aggregator, enabling businesses to accept various instruments like cards, UPI and wallets across multiple sales channels.

Follow the steps below to onboard Airpay as a payment provider.

<AccordionGroup>
  <Accordion title="Prerequisites">
    * Ensure you have Optimizer enabled for your Razorpay account. This payment provider is available only with Optimizer.
    * To ensure a successful integration, you must complete the following items prior to configuration:
      * **Procure Credentials:** Ensure you have an **active account with Airpay** and possess the necessary **API credentials** (for example, Merchant ID, Secret Key, Username and Password).
      * **Whitelisting:** Ensure you have whitelisted the necessary URLs/IP addresses to allow traffic from the Optimizer platform. Please contact Airpay for this.
    * **UPI Collect is not supported** by this integration. You must use an alternative provider to accept these payments (Razorpay is available for Optimizer users). [Handle UPI Collect transactions](#1-handling-upi-collect-transactions).

    <Info>
      **Handy Tips**

      No additional configuration is required on your end for Airpay integration.
    </Info>
  </Accordion>
</AccordionGroup>

## Add Airpay as Payment Provider

<AccordionGroup>
  <Accordion title="To add Airpay as a payment provider:">
    1. Log in to your Dashboard and select **Optimizer**.
    2. Click **Payment Provider** → **Add Provider**.
    3. Navigate to **Card, Netbanking, and UPI** → **Airpay**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-add-provider.jpg" class="click-zoom" alt="Add Airpay payment provider in Razorpay" width="700" />
    4. Enter your **Provider Details**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-add-provider-details.jpg" class="click-zoom" alt="Add Airpay payment provider in Razorpay" width="700" />
    5. Add your **Airpay Production API Details** and click **Submit**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-provider-api-prod-details.jpg" class="click-zoom" alt="Add Airpay production API details in Razorpay Optimizer" width="700" />

    <Warning>
      **Watch Out!**

      **UPI Collect is not supported** by this integration. You must use an alternative provider to accept these payments (Razorpay is available for Optimizer users). [Handle UPI Collect transactions](#1-handling-upi-collect-transactions).
    </Warning>

    You have successfully added Airpay as a payment provider to Optimizer.
  </Accordion>
</AccordionGroup>

## Configure Custom Rule

<AccordionGroup>
  <Accordion title="Add custom rule to route your transactions via Airpay:">
    1. Log in to your Dashboard and click **Optimizer**.
    2. Click **+ Add New Rule**.
           <img src="https://razorpay.com/docs/build/browser/assets/images/add-simpl-rule.jpg" class="click-zoom" alt="Add new rule in Razorpay Optimizer for Airpay" width="700" />
    3. Enter the **Rule Name** and **Rule Description**. Click **Next**.
           <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-add-rule-name-desc.jpg" class="click-zoom" alt="Enter rule name and description for Airpay in Optimizer" width="700" />
    4. Select the rule conditions and click **Next**, for example:
       * **When** - `Payment Method`.
       * **is** - `One Of`.
       * `Netbanking, Card, UPI Intent`.

    <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-rule-conditions.jpg" class="click-zoom" alt="Configure rule conditions for Airpay payment routing" width="700" />

    5. In the **Route** field, enter **100**, and select **Airpay** in the **payment via** field. Click **Next**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-priority-route.jpg" class="click-zoom" alt="Add Airpay Route" width="700" />
    6. Click **Publish Rule**.

    Following this example rule, transactions originating from **iOS devices** and using **Card, Netbanking or UPI payment methods** will be routed through **Airpay**.
  </Accordion>
</AccordionGroup>

## Configure Custom Rules for Limitations

You must create routing rules to manage the known limitations of the Airpay integration, routing specific transaction types to an alternative provider.

### 1. Handling UPI Collect Transactions

Airpay integration currently **does not support "UPI Collect"** requests.

<Info>
  **Handy Tips**

  Create a separate rule for UPI Intent transactions to ensure they are routed to Airpay.
</Info>

<AccordionGroup>
  <Accordion title="Rule to exclude Airpay for UPI Collect payments:">
    1. Log in to your Dashboard and click **Optimizer**.
    2. Click **+ Add New Rule**.
    3. Enter the **Rule Name** (for example, `Exclude Airpay for UPI Collect`) and **Rule Description**. Click **Next**.
    4. Select the rule conditions as follows and click **Next**:
       * **When** - `Payment Method`
       * **is** - `Equal to`
       * `UPI Collect`
    5. In the **Route** field, enter **100** and select your **\[Alternative Gateway Provider]** in the **payment via** field. Click **Next**.
    6. Click **Publish Rule**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-upi-collect-limitation-rule.jpg" alt="Configure rule to exclude Airpay for UPI Collect payments in Razorpay Optimizer" width="700" />
  </Accordion>
</AccordionGroup>

### 2. Handling Card Transactions

Airpay integration **does not support Tokenised Card** payments.

<AccordionGroup>
  <Accordion title="Rule to exclude Airpay for tokenised card payments:">
    1. Log in to your Dashboard and click **Optimizer**.
    2. Click **+ Add New Rule**.
    3. Enter the **Rule Name** (for example, `Exclude Airpay for Tokenised Cards`) and **Rule Description**. Click **Next**.
    4. Select the rule conditions as follows:
       * **Condition 1:**
         * **When** - `Payment Method`
         * **is** - `Equal to`
         * `Card`
       * **AND** (Add another condition)
       * **Condition 2:**
         * **When** - `Card Tokenised`
         * **is** - `Equal to`
         * `True`
    5. Click **Next**.
    6. In the **Route** field, enter **100** and select your **\[Alternative Gateway Provider]** in the **payment via** field. Click **Next**.
    7. Click **Publish Rule**. <img src="https://razorpay.com/docs/build/browser/assets/images/optimizer-airpay-tokenised-cards-limitation-rule.jpg" alt="Configure rule to exclude Airpay for tokenised card payments in Razorpay Optimizer" width="700" />
  </Accordion>
</AccordionGroup>

## Best Practices

Please note these best practices before routing all or some of your traffic to a new gateway via Optimizer:

<AccordionGroup>
  <Accordion title="Live and Test Mode Rules">
    Rules set up in the Razorpay Dashboard apply to live mode. However, you must manually configure live mode credentials; test mode credentials will not copy over.
  </Accordion>

  <Accordion title="Sanity Test at Razorpay">
    For basic integration testing, contact [Razorpay Support](https://razorpay.com/support/). We will attempt a small test payment to confirm your credentials.
  </Accordion>
</AccordionGroup>

## Go Live

After the integration is tested and successful, you can go live with Airpay on Razorpay Optimizer.
