--- title: Overview description: Easily integrate our payment solution into your application with minimal effort. --- # Overview Easily integrate our payment solution into your application with minimal effort. Our API documentation will guide you through the quick and secure integration process, enabling you to start accepting payments seamlessly. You'll find all the necessary tools to embed a robust, secure payment solution that supports your entire workflow—from initial setup and order confirmation to effortless refunds. Start processing payments with a platform designed to elevate your business. #### API Basics ##### HTTP Methods **GET:** Retrieves data from a specified resource. It is a read-only operation that does not alter server data. **POST:** Sends data to the server to create or update a resource. Typically results in a new record being created or an existing one modified. **PUT:** Replaces the current state of a resource with new data. **DELETE:** Removes a specified resource from the server. #### Request and Response Structure When an API call is made, the client (e.g., browser or application) sends a request specifying a URL, HTTP method (e.g., GET, POST), and, when necessary, additional data. The server processes this request and responds with. **Status:** Indicates whether the request was successful. **Response:** A summary of the server’s reply. **Data:** The actual result of the request, such as retrieved or modified information. --- --- title: Encryption description: Encryption protects sensitive information by transforming readable data into ciphertext --- # Encryption Encryption protects sensitive information by transforming readable data into ciphertext, making it inaccessible to unauthorized users. Only those with the decryption key can revert the ciphertext to its original form, ensuring secure transmission and storage. ##### Encryption Key We use Symmetric Key Encryption, where the same key is applied for both encryption and decryption. This method is efficient and ideal for securing large volumes of data. However, safeguarding the key is critical—any compromise can lead to unauthorized data access. ![Encryption key flow ](../../../../assets/encryption.png) ##### What is AES/CBC/PKCS5PADDING Mechanism AES/CBC/PKCS5PADDING combines three elements: **AES (Advanced Encryption Standard):** A widely trusted algorithm for secure data encryption. **CBC (Cipher Block Chaining):** Chains each block of plaintext with the previous ciphertext block, adding randomness and security. An initialization vector (IV) is used for the first block. **PKCS5Padding:** Ensures the data fits the required block size by adding padding when necessary. This method offers a strong, reliable mechanism for safeguarding sensitive data and preventing identifiable patterns in encrypted content. **Implementation Steps:** 1. **Prepare the Data** — Create the request payload and convert it into a JSON-encoded string. 2. **Generate the Encryption Key** — Apply the MD5 hash to the concatenated string of the provided username and password: ```text md5(username . "~:~" . password) ``` 3. **Generate an Initialization Vector (IV)** — The IV should be a 16-byte random string and must be shared along with the encrypted data for decryption. 4. **Encrypt the Data and Send the Request** — Use AES-256-CBC encryption with the generated key and IV, apply PKCS5Padding to ensure proper block size, and include the encrypted payload in the request. ## Request Body | Parameter | Type | Required | Description | Example | | :--- | :--- | :---: | :--- | :--- | | `data` | String | ✅ | The request payload must be JSON-encoded before encryption. | `{"order_id":"ORD123456","merchant_id":"456"}` | | `encryptionkey` | String | ✅ | The encryption key provided by Airpay used to encrypt all request payloads using the AES/CBC/PKCS5PADDING mechanism. | `a197b462cb0350a093f34996f698dc94` | ## PHP ```php Step 2: Decrypt the Data Decrypt the obtained ciphertext using the specified encryption algorithm and the same key that was used for encryption. ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | response required | String | The encrypted response string is received in the API. | `d96cc495EkT0yuZWFQvoTksxPVbkIyB` | | encryptionkey required | String
(10-200) | The encryption key provided by airpay is used to decrypt all request payloads with the AES/CBC/PKCS5PADDING encryption mechanism. | `a197b462cb0350a093f34996f698dc94` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status_code required | String | The status code signifies the API request's success or failure. | `200` | | response_code required | String | The response code shows whether the API request was successful or not. | `00` | | status required | String | The status indicates the API response's success or failure. | `success` | | message required | String | The message gives further information about the API response or error. | `Success` | | data required | Object | The data contains the actual content or information returned by the API response. | `{"merchant_id":"123356","ap_transactionid":"11314"}` | ## PHP ```php $value) { $checksumdata .= $value; } return hash('SHA256', $checksumdata.date('Y-m-d')); } ``` --- --- title: Oauth2 description: Authenticate using OAuth 2.0 to obtain access tokens for API requests. --- # Oauth2 OAuth 2.0, which stands for "Open Authorization," is a framework that enables a website or application to obtain access to resources managed by other web applications on a user's behalf. This protocol focuses on authorization and relies on access tokens. It is a data element that signifies the user's permission to access specific resources. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/oauth2 ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | client_id required | String
(1-20) | A unique identifier provided by the airpay, used as a credential for generating an access token. | `4b88dc` | | client_secret required | String
(1-200) | A confidential key provided by the airpay team, used along with the Client ID to authenticate and generate an access token. | `51d68722cca2b4bb096262c326bd24bb` | | merchant_id required | Number
(1-20) | airpay merchant identifier. | `456` | | grant_type required | String
(1-50) | Specifies the authentication flow for obtaining an access token. | `client_credentials` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | access_token required | String | A temporary token used to authenticate API requests, obtained using valid client credentials. | `00f9a570f917aa8a5df6ae532b5b773f71a00a1a` | | expires_in required | String | The duration (in seconds) for which the access token remains valid before expiration. | `300` | | scope optional | String | Defines the level of access granted to the access token for specific API resources and actions. | `null` | ## PHP ```php "; $client_secret = ""; $client_id = ""; $secretKey = ''; $data = array(); $data['client_id'] = $client_id; $data['client_secret'] = $client_secret; $data['merchant_id'] = $merchant_id; $data['grant_type'] = 'client_credentials'; $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = ['merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/oauth2/', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; $access_token_data = decrypt($response,$secretKey); ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code": "200", "response_code": "00", "status": "success", "message": "Success", "data": { "access_token": "00f9a570f917aa8a5df6ae532b5b773f71a00a1a", "expires_in": 300, "scope": null } } ``` ### Error Response ```json HTTP/1.1 200 OK { "status_code": "400", "error_code": "903", "status": "fail", "message": "Invalid client id or secret", } ``` --- --- title: Best Practices description: Recommended practices for integrating with Airpay APIs securely and effectively. --- # Best Practices #### Make the most of what airpay API docs have to offer. - **Thoroughly understand the API documentation -** Before starting your integration, take time to explore airpay's API document throughout. Understanding the API's capabilities, endpoints and response structure is key to building effectively. It helps you to anticipate potential issues and align your implementation. - **Implement robust error handling -** Design your integration to gracefully manage various error types such as network failures, validation issues, and authentication problems. Incorporate clear error messages and callback mechanisms to maintain a smooth user experience. Consistently log all failures with relevant context to simplify troubleshooting and support. - **Secure API Keys and Access Tokens -** Ensure your integration includes proper authentication methods like API keys or OAuth tokens to securely access the API. Always transmit credentials over HTTPS to prevent interception or misuse. Store sensitive information in secure environments, avoiding exposure in client-side code or public repositories. :::caution[Security Standards] We handle customer data with the most secure principles aligned with the industry standards. We are compliant with the following standards: ISO 9001:2013, ISO/IEC 27001:2013, SOC1, SOC2, PCI DSS & PCI PIN. ::: - **Validate Input and API Responses -** Always validate the data you send to the API to prevent bad requests or transition failures. Likewise, verify and handle the structure of API responses before using the data. This helps maintain consistency and reduces the chances of runtime errors. - **Monitor Transactions and System Health -** Set up logs and alerts for payment failures, webhook issues, or unusual transaction patterns. Regular monitoring helps identify problems before they affect end users. Use analytics dashboards offered by the gateway for better visibility and control. - **Common Error Codes -** Handle common HTTP error codes to ensure a smooth API experience. Client-side issues like 400, 401 and 403 often relate to invalid requests or authentication. Errors such as 404 or 422 indicate missing resources or validation failures. For 500, 503 and 429, use retries with backoff and monitor rate limits carefully. --- --- title: Shopping Kits description: Airpay shopping kits are ready-made payment plugins for popular e-commerce and CMS platforms — WordPress (WooCommerce), Shopify, Magento 2.4, Wix, OpenCart, PrestaShop, Joomla, Drupal, Moodle, CS-Cart, Zen Cart, Zoho Commerce, and Fynd. Each plugin installs via the platform's standard plugin/module system and adds Airpay as a payment gateway with no custom coding required. --- # Shopping Kits Airpay shopping kits are drop-in payment plugins for major e-commerce and CMS platforms. Install via your platform's plugin manager, enter your Airpay credentials, and start accepting payments no custom development needed. ## Available Plugins --- --- title: Wordpress description: Install and configure the airpay payment extension for Wordpress. --- # Wordpress This guide is for the integration of Wordpress backend with airpay payment application for accepting payments. Download Wordpress Kit and follow the installation steps. If steps correctly followed, the installation will be successful. Wordpress Installation steps: ``` step 1: Login to your wordpress admin and go to Plugins > Add New. step 2: Click on upload tab. step 3: Upload the zip file of plugin. step 4: Activate the plugin. step 5: To enable airpay payment gateway, go to WooCommerce -> Settings -> Payment Gateways. step 6: Check the radio button against airpay and save changes. ``` Enabling the plugin and configuring it with your airpay merchant credentials: ``` step 1: Go to WooCommerce -> Settings -> Payment Gateways , select the airpay submenu. step 2: Scroll down the page and Enable the airpay module. step 3: Add your Merchant Id,Username,Password and secret key (API key) here, which you can get from settings page of your airpay merchant account. step 4: Select the Return Page from drop down and click on save changes. ``` ### Wordpress Kit - v5.8.2 Released Date - June, 2024 **Download:** https://docs.airpay.co.in/kits/v4/airpay_wordpress_v4.rar **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.6 or higher - PHP Requirements – At least PHP 7.4 is required - PHP Extensions: curl, mbstring, xml, zip, json, openssl, fileinfo, gd, imagick, mysqli - Disk Space – 500 MB Minimum Disk Space Required --- --- title: WIX description: Install and configure the airpay payment extension for WIX. --- # WIX This guide is for the installation of the airpay on a WIX store (shopping cart) for the accepting payments. If steps correctly followed, the installation will be successful. **WIX INTEGRATION STEPS:** 1. Log in to your Wix account. This gives you access to your website’s backend where you can manage and configure your site. 2. Access your site’s Dashboard and select the website you want to configure from your Wix account home page. 3. Click on the **Extension** section. This is where you manage third-party integrations and plugins. 4. Find the airpay extension and click **Edit** to open the configuration page. 5. Review the information and URLs provided by airpay. 6. Click **Test Your App** to be redirected to your site’s admin page for further configuration. 7. Go to **Settings** at the bottom left corner of the menu. 8. Select the **Accept Payments** option to manage payment providers for your store. 9. Choose **airpay** as the payment provider and click the **Manage** button to configure its settings. 10. Enter your **Merchant ID** and **Secret Key** received from airpay after onboarding. 11. Click **Save** to activate airpay as a payment method on your Wix store. ### WIX Kit - vv1 Dec, 2023 **Download:** https://docs.airpay.co.in/kits/airpay_wix_v3.zip **Requirements:** - RAM: 8 GB - Disk Space – 512 MB Minimum Disk Space Required --- --- title: Shopify description: Install and configure the airpay payment gateway on your Shopify store. --- # Shopify This guide is for the installation of the airpay on a Shopify store (shopping cart) for the accepting payments. If steps correctly followed, the installation will be successful. SHOPIFY INSTALLATION STEPS: ``` step 1: Log in to your Shopify admin and go to Settings → Payments. step 2: In the Additional payment methods section, click Add payment methods. step 3: Search for airpay in the list of providers and select it. step 4: Click activate, then enter your airpay Merchant ID and Secret Key (available from your airpay merchant dashboard). step 5: Save your changes to enable airpay as a payment option at checkout. ``` CONFIGURING AIRPAY CREDENTIALS: ``` step 1: After activation, click Manage next to airpay in the Payments section. step 2: Complete any additional configuration required. step 3: Click Save to finalize your setup. ``` ### Shopify Kit - v5.8.2 June, 2023 **Download:** https://docs.airpay.co.in/kits/airpay_shopify_v3.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.5 or higher - PHP Requirements – At least PHP 7.0 is required - PHP Extensions: mbstring, gd, curl, xml, zip, json, mysqlnd, openssl - Disk Space – 500 MB Minimum Disk Space Required --- --- title: Zoho description: Install and configure the airpay payment extension for Zoho Books. --- # Zoho This guide is for the installation of the airpay on Zoho Books for the accepting payments. If steps correctly followed, the installation will be successful. airpay Payment Extension Installation Guide (via Private Link): ``` Prerequisites: • A valid Zoho account with admin access. • Access to the private extension link shared by airpay. • airpay Merchant ID and API credentials (shared by airpay during onboarding). Step 1: Open the Private Extension Link Copy and paste the private extension link provided by airpay: https://books.zoho.com/extension#/installprivateextension?name_space=bedd4e7c-bc80-4f69-b186-2b696a098c7c&handle=com_n5zw1p&install_type=private It gets redirected to the Zoho Extension Installation page. Choose your Zoho organization if prompted. Step 2: Install the extension. Click the "Install" button. Choose the appropriate organization. Click Continue and accept the permissions requested by the extension. Complete the installation. Step 3: Configure the Extension After installation, navigate to the Settings or Extensions section in your Zoho product. Look for airpay Configuration or Payment Settings. Enter the following: airpay Merchant ID and Secret key (shared by airpay during onboarding) Click Save/Validate. The system will verify the credentials and enables the integration. Step 4: Use the Payment Integration In Zoho Checkout: The extension will allow collecting payments via airpay on your hosted payment page. ``` Installation through Zoho Market place: ``` Prerequisites: • Merchant must have an active Zoho account. • airpay Merchant ID and credentials (will be used for configuration). Step 1: Locate the Extension on Zoho Marketplace Go to the Zoho Marketplace. Search for "Airpay Payment Extension". Click on the extension to open the detail page. Step 2: Install the Extension Click the "Install" button. Choose the appropriate organization. Click Continue and accept the permissions requested by the extension. Complete the installation. Step 3: Configure the Extension After installation, navigate to the Settings or Extensions section in your Zoho product. Look for airpay Configuration or Payment Settings. Enter the following: airpay Merchant ID and Secret key (shared by airpay while onboarding) Click Save/Validate. The system will verify the credentials and enables the integration. Step 4: Use the Payment Integration Depending on the Zoho product: In Zoho Checkout: The extension will allow collecting payments via airpay on your hosted payment page. ``` ### Zoho Kit - v1.0 February, 2025 **Download:** https://docs.airpay.co.in/kits/v4/airpay_zoho_Integration_handover.zip **Requirements:** - RAM: 8 GB - Disk Space – 512 MB Minimum Disk Space Required --- --- title: Fynd description: Install and configure the airpay payment gateway on the Fynd platform. --- # Fynd This guide is for the installation of the airpay on Fynd platform for the accepting payments. If steps correctly followed, the installation will be successful. Before you begin, ensure the following: - You have an active Fynd merchant account with admin access. - You have the airpay Merchant ID and Secret Key (shared by the airpay team). Installation & Configuration Steps: ``` step 1: Login to your Fynd Platform account. step 2: Select the appropriate business account. step 3: Navigate to the last menu (with the platform name) →Configuration → Payments. step 4: Click on "Payment Configuration". step 5: Click the "Add Payment Method" button on the top-right. step 6: Locate "Airpay Payment Services" from the list and click "Add". step 7: Click the "Install" button in the top-right corner. step 8: Enter your Merchant ID and Secret Key, then click "Submit". step 9: Return to Payment Configuration and click on "Airpay Payment Services". step 10: Enable the radio button next to airpay Payment Services. step 11: Also enable the radio button at the top labeled "Active". step 12: Finally, click the "Save" button to complete the setup. ``` ### Fynd Kit - v1.0 June, 2025 **Download:** https://docs.airpay.co.in/kits/v4/airpay_fynd_Integration_handover.zip **Requirements:** - RAM: 8 GB - Disk Space – 512 MB Minimum Disk Space Required --- --- title: Moodle description: Integrate the airpay payment gateway with your Moodle installation. --- # Moodle This guide is for the integration of Moodle (shopping cart) backend with airpay for accepting payments. Download the Moodle Kit and follow the installation steps. If the steps are correctly followed, the installation will be successful. Introduction: ``` step 1: This is the readme file for airpay Payment Gateway plugin Integration for Moodle v3.x. step 2: The provided package helps store merchants to redirect customers to the airpay Payment Gateway when they choose airpay as their payment method. step 3: After the customer has finished the transaction they are redirected back to an appropriate page on the merchant site depending on the status of the transaction. step 4: The aim of this document is to explain the procedure of installation and configuration of the package on the merchant website. ``` Installation: ``` step 1: Unzip "airpay_moodle_v4.7z". step 2: In moodle root folder, navigate to "moodle > enrol" and paste the unzipped folder "airpay". step 3: From the backend of your moodle site (administration), go to your module list and select "Site administration"-> Plugins-> Enrolments->airpay. step 4: Locate the module "airpay". ``` Configuration: ``` step 1: Click on "airpay" to configure the settings. step 2: You should choose the airpay environment (either to Sandbox or Production). step 3: Enter airpay Merchant Key, Merchant ID, website in the listed parameters on configuration tab. These parameters are Mandatory. step 4: Click on save. ``` ### Moodle Kit - v3.1.0 September, 2024 **Download:** https://docs.airpay.co.in/kits/v4/airpay_moodle_v4.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.5 or higher - PHP Requirements – At least PHP 7.0 is required - PHP Extensions: gd, curl, xmlrpc, zip, json, session, iconv - Disk Space – 500 MB Minimum Disk Space Required --- --- title: Magento description: Integrate the airpay payment gateway with your Magento installation. --- # Magento This guide is for the integration of Magento (shopping cart) backend with airpay for the accepting payments. Download Magento Kit and follow the installation steps. If steps correctly followed, the installation will be successful. Magento Installation steps: ``` step 1: Please make sure that app/ directory is writable step 2: Inside app folder create a folder named code step 3: Inside the code folder place the airpay folder from extracted magento kit (path:/app/code/airpay/airpay/) step 4: Then run below commands as root from app/ directory "$ cd .. "$ php bin/magento cache:clean "$ php bin/magento cache:flush "$ php bin/magento setup:upgrade "$ php bin/magento module:enable Airpay_Airpay --clear-static-content "$ php bin/magento setup:di:compile ``` Enabling the module and configuring it with your airpay merchant credentials: ``` step 1: Navigate to 'https:///admin/' in your browser to configure AirpayPayment step 2: Navigate to 'Stores > Configuration > Sales > Payment Methods step 3: Find 'airpay' Payment Method step 4: Enter your airpay Merchant details and click Save Config Note: If airpay is not visible as a payment method, try clearing cache from System > Cache Management ``` ### Magento Kit - v2.4 April, 2023 **Download:** https://docs.airpay.co.in/kits/airpay_magento_2.4_v3.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.5 or higher - PHP Requirements – At least PHP 7.0 is required - PHP Extensions: gd, curl, xmlrpc, zip, json, session, iconv. - Disk Space – 500 MB Minimum Disk Space Required --- --- title: PrestaShop description: Integrate the airpay payment gateway with your PrestaShop installation. --- # PrestaShop This guide is for the integration of PrestaShop backend with airpay payment application for the accepting payments. Download PrestaShop Kit and follow the installation steps. If steps correctly followed, the installation will be successful. PrestaShop Installation steps: ``` step 1: Login to Prestashop's admin section , under Modules, Click on Modules and click "Upload Module" and upload the kit step 2: Login to Prestashop's admin section, under Modules, click on Modules step 3: You can see the Module name 'airpay' in listing, then click on install button to install this module ``` Enabling the module and configuring it with your airpay merchant credentials: ``` step 1: After installing module, you have to configure it with airpay merchant credentials step 2: Go to Tab 'Modules', click on configure link of airpay Module step 3: Add your Merchant Id, Username, Password and secret key (API Key) here step 4: And Update the Details ``` ### PrestaShop Kit - v1.7.8.5 June, 2022 **Download:** https://docs.airpay.co.in/kits/airpay_prestashop_1.7.8.5_v3.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.6 or higher - PHP Requirements – At least PHP 7.4 is required - PHP Extensions: curl, mbstring, xml, zip, json, openssl, fileinfo, gd, imagick, mysqli - Disk Space – 500 MB Minimum Disk Space Required --- --- title: Joomla description: Integrate the airpay payment gateway with your Joomla installation. --- # Joomla This guide is for the integration of Joomla backend with airpay payment application for accepting payments. Download Joomla Kit and follow the installation steps. If steps correctly followed, the installation will be successful. Joomla Installation steps: ``` step 1: Copy and extract Joomla zip on your localhost. step 2: Browse to extract the path "http://localhost/yourpath". step 3: Install Joomla give super user login details. step 4: Create a database and configure mysql connection. step 5: Select, Install Sample Data -> Default English (GB) Sample Data. step 6: Install it. step 7: Remove Installation folder. ``` Joomla Configuration: ``` step 1: Redirect to administrator login at "http://localhost/yourpath/administrator/" and login. step 2: Go to Install Extension present on the left menubar. step 3: Upload the package and choose virtual mart zip. step 4: After successful installation scroll down and click on install sample data for creating sample items. step 5: After that go to product panel on virtuemart control panel safe path tools and click on "Safe Path Tools". step 6: Go to shop ->vendor->Currency->Indian rupee-> save and close. ``` Install airpay plugin: ``` step 1: Go to extension and install browse package choose airpay-virtualmart-v3.zip. step 2: Go to extension and install browse package choose com_airpay_v3.zip. ``` Configure airpay plugin: ``` step 1: Go to components->virtualmart->controlpanel. step 2: Go to shop payment methods -> add new. step 3: Enter payment method name, select published ->yes, choose ->VM-payment, airpay, select currency and save it. step 4: Configuration tab, fill the details then save and close it. ``` ### Joomla Kit - v3.10.4 September, 2024 **Download:** https://docs.airpay.co.in/kits/v4/airpay_joomla_v4.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.6 or higher - PHP Requirements – At least PHP 7.2.5 is required - PHP Extensions: PDO, XML, GD-library, OpenSSL, JSON, cURL, Mbstring, file_get_contents, allow_url_fopen, Phar - Disk Space – 500 MB Minimum Disk Space Required --- --- title: Drupal description: Integrate the airpay payment gateway with your Drupal Commerce installation. --- # Drupal This guide is for the integration of Drupal (shopping cart) backend with airpay for the accepting payments. Download Drupal Kit and follow the installation steps. If steps correctly followed, the installation will be successful. Adding Module files to your Drupal Commerce: ``` step 1: Two files need to be added 'airpay' and 'airpay_response'. step 2: Unzip the file and add two folder to the 'web/modules/contrib'. step 3: Enable the two modules under the airpay. ``` Enabling the Module: ``` step 1: Login to your Drupal Commerce admin and go to extend. step 2: Under airpay, there are two modules: airpay module and airpay Response module. Enable them. ``` Add Payment Gateway and configure it with your airpay merchant credential: ``` step 1: Login to your Drupal Commerce admin and go to Commerce -> Configuration -> Payment -> Payment Gateways. step 2: Click Add Payment Gateway. step 3: Name should be entered as 'airpay' – This is Mandatory. step 4: Check the 'airpay payment' plugin. step 5: Enter the merchant credentials. ``` ### Drupal Kit - v10.2.6 March,2025 **Download:** https://docs.airpay.co.in/kits/v4/airpay_drupal_10.2.6_v4.rar **Requirements:** - Web Server – Apache 2.4.7 or higher - Database Server – MySQL 5.7.8 or higher - PHP Requirements – At least PHP 8.1 is required - PHP Extensions: PDO, XML, GD-library, OpenSSL, JSON, cURL, Mbstring - Disk Space – 500 MB Minimum Disk Space Required --- --- title: OpenCart description: Integrate the airpay payment gateway with your OpenCart installation. --- # OpenCart This guide is for the integration of OpenCart (shopping cart) backend with airpay for the accepting payments. Download OpenCart Kit and follow the installation steps. If steps correctly followed, the installation will be successful. Opencart Installation steps: ``` step 1: Copy the airpay.php file from admin/controller/extension/payment/ (from plugin) to admin/controller/extension/payment/airpay.php(to opencart installation). step 2: Copy the airpay.php file from admin/language/en-gb/extension/payment/(from plugin) to admin/language/en-gb/extension/payment/airpay.php(to opencart installation). step 3: Copy the airpay.twig file from admin/view/template/extension/payment/(from plugin) to admin/view/template/extension/payment/airpay.twig(to opencart installation). step 4: Copy the airpay.php file from admin/controller/extension/payment/(from plugin) to admin/controller/extension/payment/airpay.php(to opencart installation). step 5: Copy the airpay.php file from catalog/controller/extension/payment/(from plugin) to catalog/controller/extension/payment/airpay.php(to opencart installation). step 6: Copy the response.php file from catalog/controller/common(from plugin) to catalog/controller/common/response.php (to opencart installation). step 7: Copy the airpay.php file from catalog/language/en-gb/common/(from plugin)to catalog/language/en- gb/common/airpay.php (to opencart installation). step 8: Copy the airpay.php file from catalog/language/en-gb/extension/payment/ (from plugin) to catalog/language/en-gb/extension/payment/ airpay.php (to opencart installation). step 9: Copy the airpay.php file from catalog/model/extension/payment/(from plugin)to catalog/model/extension/payment/airpay.php (to opencart installation). step 10: Copy the response.twig file from catalog/view/theme/default/template/common/ (from plugin) to catalog/view/theme/default/template/common/ response.twig (to opencart installation). step 11: Copy the airpay.twig file from catalog/view/theme/default/template/extension). step 12: Copy the payment_method.twig file from catalog/view/theme/default/template/checkout/payment_method.twig (to opencart installation). step 13: Copy the payment_method.php file from catalog/controller/checkout/ (from plugin) to catalog/controller/checkout/payment_method.php (to opencart installation). step 14: Copy the payment_method.php file from catalog/controller/checkout/(from plugin)to catalog/controller/payment_method.php (to opencart installation). step 15: To enable airpay payment gateway, go to Opencart -> Extensions -> Extensions-> Payments. step 16: Install airpay payment method. ``` ### OpenCart Kit - v3.0.4.0 August, 2024 **Download:** https://docs.airpay.co.in/kits/v4/airpay_opencart_v4.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.5 or higher - PHP Requirements – At least PHP 7.0 is required - PHP Extensions: mbstring, gd, curl, xml, zip, json, mysqlnd, openssl - Disk Space – 500 MB Minimum Disk Space Required --- --- title: CS-Cart description: Integrate the airpay payment gateway with your CS-Cart installation. --- # CS-Cart This guide is for the integration of CS-Cart (shopping cart) backend with airpay for the accepting payments. Download CS – Cart Kit and follow the installation steps. If steps correctly followed, the installation will be successful. CS-Cart Installation steps: ``` step 1: Copy the airpay.php file from /app/payments/ (from plugin) and place to /app/payments/(to cscart installation). step 2: Copy the airpay folder from /app/payments/ (from plugin) and place to /app/payments/(to cscart installation). step 3: Copy the responsefromairpay.php from /app/controllers/frontend/ (from plugin) and place to app/controllers/frontend/ (to cscart installation). step 4: Copy the airpay folder from /app/addons (from plugin) and place to /app/addons (to cscart installation). step 5: Copy the admin_admin.tpl from /design/backend/templates/views/payments/components/cc_processors (from plugin) and place to /design/backend/templates/views/payments/components/cc_processors (to cscart installation). ``` ### CS-Cart Kit - v4.14.3 June, 2022 **Download:** https://docs.airpay.co.in/kits/airpay_cscart_4.14.3_v3.zip **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.6 or higher - PHP Requirements – At least PHP 7.3 is required - PHP Extensions: curl, mbstring, xml, zip, json, openssl, fileinfo, gd, imagick, mysqli - Disk Space – 512 MB Minimum Disk Space Required --- --- title: Zen Cart description: Integrate the airpay payment gateway with your Zen Cart installation. --- # Zen Cart This guide is for the integration of ZenCart (shopping cart) backend with airpay for accepting payments. Download the ZenCart Kit and follow the installation steps. If the steps are correctly followed, the installation will be successful. Zen Cart Installation steps: ``` step 1: Fill up airpay integration formation form. step 2: You need to provide your Domain URL an Success URL (index.php?route=common/response) to airpay operations team. ``` Adding plugin files to your zencart installation: ``` step 1: Copy the airpayChecksum and airpay_version.txt from includes/modules/payment(from plugin) to includes/modules/payment(zencart installation). step 2: Copy the paywithairpay.php file from includes/modules/payment(from plugin) to includes/modules/payment(zencart installation). step 3: Copy the airpaylib folder from includes/modules/payment(from plugin) to includes/modules/payment(zencart installation). This folder has the following files: • airpayConstants.php • AirpayHelper.php step 4: Copy the paywithairpay(language file) from includes/languages/english/modules/payment (from plugin) to includes/languages/english/modules/payment(zencart installation). step 5: Copy the header_php.php file from includes/modules/pages/checkout_success(from plugin) to includes/modules/pages/checkout_success(zencart installation). ``` Steps: ``` step 1: Log into your Zencart store using the admin credentials. step 2: On the main menu bar, go to Modules > Payment. The Payment Modules page outlines the list of integrated plugins and the plugin available for integration. step 3: In case of a new airpay payment plugin, click ► next to the PayWithAirpay module under the Action column. step 4: Click the + Install Module button. step 5: Enable airpay Order Module - Select either True or False to accept airpay Order Payments. step 6: Click the Update button to update details. ``` ### Zen Cart Kit - v1.5.8a September, 2024 **Download:** https://docs.airpay.co.in/kits/v4/zencartv4.rar **Requirements:** - Web Server – Apache 2.4 or higher - Database Server – MySQL 5.6 or higher - PHP Requirements – At least PHP 7.3 is required - PHP Extensions: curl, mbstring, xml, zip, json, openssl, fileinfo, gd, imagick, mysqli - Disk Space – 500 MB Minimum Disk Space Required --- --- title: Integration Kits description: Airpay web integration kits let you accept payments using three methods — Iframe (embed checkout in an iframe with minimal backend), Inline (render the payment form inside your own page layout), and Server-Side SDK (process payments entirely from your backend). Kits are available for PHP, Java, JavaScript, Node.js, Python, Ruby on Rails, React.js, React Native, Angular, VB.NET, and C#. --- # Integration Kits Airpay provides three web integration approaches. Choose the one that best fits your architecture, then download the kit for your language or framework. - **Iframe** — The Airpay checkout loads inside an iframe on your page. Minimal backend required; ideal for fast integration. - **Inline** — The payment form renders directly within your page layout. Gives you more control over the UI. - **Server-Side SDK** — All payment logic runs on your server. Best for custom flows, headless setups, or maximum control. ## Available Kits --- --- title: Iframe Kits description: Integrate airpay using iframe kits for seamless payment integration. --- # Iframe Kits This guide is for the integration of Iframe (inline frame) Kits backend with airpay payment application in different languages. If steps are correctly followed as per the documentation, the installation will be successful. Following are the steps: ``` step 1: Collect and Configure Date Collect Data: Use transaction.html to gather buyer details (email, phone, name, address, order ID, etc.) Configure Settings: Set up config.php with your airpay account details (username, password, secret, etc.) step 2: Process and Send Data Send Data: Process and encrypt data in send to airpay.php. Include validation.php and functions.php for validation and encryption. Utility Functions: Use functions.php for encryption, decryption, and checksum calculations. step 3: Handle Responses and Errors Handle Response: Use response from airpay.php to process and validate airpay response. Redirect to error.php if validation fails. ``` ##### Choose Your Iframe Integration Kit to Download! --- --- title: Inline Kits description: Integrate airpay using inline kits for embedded payment integration. --- # Inline Kits This guide is for the integration of Inline Kits backend with airpay payment application in different coding languages. If steps correctly followed as per the documentation, the installation will be successful. Following are the steps: ``` step 1: Collect and Configure Date Collect Data: Use transaction.html to gather buyer details (email, phone, name, address, order ID, etc.) Configure Settings: Set up config.php with your airpay account details (username, password, secret, etc.) step 2: Process and Send Data Send Data: Process and encrypt data in send to airpay.php. Include validation.php and functions.php for validation and encryption. Utility Functions: Use functions.php for encryption, decryption, and checksum calculations. step 3: Handle Responses and Errors Handle Response: Use response from airpay.php to process and validate airpay response. Redirect to error.php if validation fails. ``` ##### Choose Your Inline Integration Kit to Download! --- --- title: Server Side SDK description: Integrate airpay using server-side SDK kits in various programming languages. --- # Server Side SDK This guide is for the integration of Server Side SDK backend with airpay payment application in different coding languages. If steps correctly followed as per the documentation, the installation will be successful. Following are the steps: ``` step 1: Collect and Configure Date Collect Data: Use transaction.html to gather buyer details (email, phone, name, address, order ID, etc.) Configure Settings: Set up config.php with your airpay account details (username, password, secret, etc.) step 2: Process and Send Data Send Data: Process and encrypt data in send to airpay.php. Include validation.php and functions.php for validation and encryption. Utility Functions: Use functions.php for encryption, decryption, and checksum calculations. step 3: Handle Responses and Errors Handle Response: Use response from airpay.php to process and validate airpay response. Redirect to error.php if validation fails. ``` ##### Choose Your Server-Side SDK Integration Kit to Download! --- --- title: MCP Server description: Connect AI assistants to the Airpay Payment Gateway using the Model Context Protocol. --- # MCP Server The **Airpay MCP Server** lets AI assistants — Claude, Cursor, VS Code, ChatGPT, Perplexity — interact with Airpay Payment Gateway through natural language. Once connected, your AI can verify payments, generate QR codes, and process refunds directly in the chat. **Hosted MCP endpoint:** `https://mcp.airpay.co.in/mcp` ## Features - **Payment Verification:** Check the status of any transaction by order ID, transaction ID, or RRN — get real-time payment status, amounts, and processing details. - **Refund Processing:** Initiate full or partial refunds with a built-in two-phase confirmation guard — the AI previews the refund and waits for your explicit approval before processing. - **UPI QR Code Generation:** Generate dynamic UPI QR codes for any amount and customer — ready to share instantly for payment collection. - **UPI Address Validation:** Validate any UPI Virtual Payment Address (VPA) before initiating a transfer to prevent failed payments. - **Subscription Management:** Check the status of eNACH and Standing Instruction mandates — see whether a subscription is active, paused, or completed. - **Bank & Payment Options:** Retrieve the list of supported banks and payment modes available for your merchant account. - **Built-in Security Guardrails:** Read-only mode disables all write tools with a single environment variable. Selective toolsets let you expose only the tools your workflow needs. - **Stateless HTTP Transport:** Each tool call is a self-contained HTTP request — no session state, safe to restart, compatible with load balancers and shared deployments. ## How It Works **Remote Hosted** — OAuth 2 authentication is required once before your AI client can call any tool. After that, tool calls flow directly through the hosted server. ```mermaid sequenceDiagram actor User participant AI as AI Client participant Auth as OAuth 2 participant GW as Airpay Gateway Note over User,Auth: One-time login User->>AI: Connect to MCP Server AI->>Auth: Redirect to login User->>Auth: Enter credentials Auth-->>AI: Access token Note over User,GW: Tool calls User->>AI: "Status of ORD123?" AI->>GW: airpay_verify_order (token) GW-->>AI: Payment status AI-->>User: "ORD123 paid ₹500" ``` **Self-Hosted** — No OAuth 2 required. Your AI client connects directly to your local server using the credentials already configured in `.env`. ```mermaid sequenceDiagram actor User participant AI as AI Client participant MCP as MCP Server participant GW as Airpay Gateway User->>AI: "Status of ORD123?" AI->>MCP: airpay_verify_order (.env creds) MCP->>GW: API request GW-->>MCP: Payment status MCP-->>AI: Result AI-->>User: "ORD123 paid ₹500" ``` ## Prerequisites - **Go 1.25+** or **Docker** - An Airpay merchant account with API credentials (Merchant ID, username, password, secret key, OAuth2 client ID and secret) ## Setup ### Binary (Go) **1. Clone the repository** ```bash git clone https://github.com/airpay/airpay-mcp-server.git cd airpay-mcp-server go mod download ``` **2. Configure credentials** ```bash cp .env.example .env ``` Edit `.env` with your Airpay credentials: ```ini AIRPAY_MERCHANT_ID=your_merchant_id AIRPAY_USERNAME=your_username AIRPAY_PASSWORD=your_password AIRPAY_SECRET=your_secret_key AIRPAY_CLIENT_ID=your_oauth2_client_id AIRPAY_CLIENT_SECRET=your_oauth2_client_secret PAYMENT_DOMAIN=https://yourstore.com ENVIRONMENT=sandbox ``` **3. Build and run** ```bash go build -o airpay-mcp-server ./cmd/airpay-mcp-server ./airpay-mcp-server # Running over Streamable HTTP on :8888 ``` ### Windows ```powershell go build -o airpay-mcp-server.exe ./cmd/airpay-mcp-server .\airpay-mcp-server.exe # Running over Streamable HTTP on :8888 ``` ### go run (any OS) ```bash go run ./cmd/airpay-mcp-server # Running over Streamable HTTP on :8888 ``` **1. Clone and configure** ```bash git clone https://github.com/airpay/airpay-mcp-server.git cd airpay-mcp-server cp .env.example .env ``` Edit `.env` with your Airpay credentials (same variables as the Binary tab). **2. Run with Docker** ```bash docker build -t airpay-mcp-server . docker run --env-file .env -p 8888:8888 airpay-mcp-server ``` ## Connect Your AI Client There are two ways to connect your AI client to the Airpay MCP Server: | Method | Best For | |--------|----------| | **Remote Hosted** *(recommended)* | Most users — no setup, always up to date, hosted by Airpay at `https://mcp.airpay.co.in/mcp` | | **Self-Hosted (Local)** | Developers who need full control or want to run in a private network | :::tip[Recommended] Use the Airpay-hosted MCP Server at `https://mcp.airpay.co.in/mcp`. No infrastructure to manage just point your AI client at the URL and you're ready. ::: ### Remote Hosted *(Recommended)* Point your AI client at the Airpay-hosted server. On first connection, you will be redirected through an **OAuth 2 login flow** — log in with your Airpay merchant credentials to authorize access. After that, your AI client uses the issued token automatically for all subsequent tool calls. **MCP endpoint:** `https://mcp.airpay.co.in/mcp` ### Claude Desktop Edit `claude_desktop_config.json`: - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` ```json { "mcpServers": { "airpay": { "type": "http", "url": "https://mcp.airpay.co.in/mcp" } } } ``` Restart Claude Desktop after saving. ### Cursor Create `.cursor/mcp.json` in your project root: ```json { "mcpServers": { "airpay": { "type": "http", "url": "https://mcp.airpay.co.in/mcp" } } } ``` Restart Cursor after saving. ### VS Code Create `.vscode/mcp.json` in your workspace root: ```json { "servers": { "airpay": { "type": "http", "url": "https://mcp.airpay.co.in/mcp" } } } ``` Reload the VS Code window (`Ctrl+Shift+P` → Reload Window). ### Claude 1. Visit the **Anthropic MCP Directory** or open **Claude.ai → Settings → Integrations** 2. Search for **Airpay MCP Server** 3. Click **Connect** 4. A browser window will open — log in with your Airpay merchant credentials to complete authentication 5. Once authenticated, the Airpay tools are available immediately in Claude Ask Claude: *"What Airpay payment tools are available?"* ### ChatGPT 1. Open **ChatGPT** and go to **Explore → Plugins** or **Settings → Connected Apps** 2. Search for **Airpay MCP Server** 3. Click **Enable** 4. Log in with your Airpay merchant credentials when prompted 5. The Airpay tools are now available in your ChatGPT conversations Ask ChatGPT: *"What Airpay payment tools are available?"* ### Self-Hosted (Local) Run your own instance for private or on-premise deployments. **No OAuth 2 required** — your AI client connects directly to the local server using the credentials you configured in `.env`. See [Setup](#setup) above to build and start the server, then point your client at `http://localhost:8888/mcp`. ### Claude Desktop Edit `claude_desktop_config.json`: - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` ```json { "mcpServers": { "airpay": { "type": "http", "url": "http://localhost:8888/mcp" } } } ``` Restart Claude Desktop after saving. ### Cursor Create `.cursor/mcp.json` in your project root: ```json { "mcpServers": { "airpay": { "type": "http", "url": "http://localhost:8888/mcp" } } } ``` Restart Cursor after saving. ### VS Code Create `.vscode/mcp.json` in your workspace root: ```json { "servers": { "airpay": { "type": "http", "url": "http://localhost:8888/mcp" } } } ``` Reload the VS Code window (`Ctrl+Shift+P` → Reload Window). ## Available Tools | Tool | Read-Only | Description | |------|-----------|-------------| | `airpay_verify_order` | ✅ | Check payment status by order ID, transaction ID, or RRN | | `airpay_get_bank_list` | ✅ | List supported banks and payment options | | `airpay_pos_transaction_detail` | ✅ | Get POS terminal transaction details | | `airpay_initiate_refund` | ❌ | Initiate full or partial refund — requires user confirmation | | `airpay_validate_vpa` | ✅ | Validate a UPI Virtual Payment Address | | `airpay_generate_qr` | ❌ | Generate a dynamic UPI QR code for payment | | `airpay_check_subscription_status` | ✅ | Check eNACH / SI subscription status | **Refund confirmation:** Before any refund is processed, the AI will show you a preview and ask for explicit approval. The refund only executes after you confirm. ## Configuration All configuration is via environment variables. **Required:** | Variable | Description | |----------|-------------| | `AIRPAY_MERCHANT_ID` | Your Airpay merchant ID | | `AIRPAY_USERNAME` | API username | | `AIRPAY_PASSWORD` | API password | | `AIRPAY_SECRET` | Secret key | | `AIRPAY_CLIENT_ID` | OAuth2 client ID | | `AIRPAY_CLIENT_SECRET` | OAuth2 client secret | | `PAYMENT_DOMAIN` | Merchant domain for QR/bank-list requests (e.g. `https://yourstore.com`) | **Optional:** | Variable | Default | Description | |----------|---------|-------------| | `PORT` | `8888` | Server listen port | | `ENVIRONMENT` | `sandbox` | `sandbox` or `production` | | `TOOLSETS` | `all` | Comma-separated toolsets: `payments`, `refunds`, `qr_upi`, `subscriptions` | | `READ_ONLY` | `false` | Set `true` to disable all write tools | | `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error` | :::note[Sandbox vs production] Use `ENVIRONMENT=sandbox` while testing. Switch to `ENVIRONMENT=production` only with live merchant credentials. ::: ## Examples ### Example 1: Verify a Payment **User prompt:** > "What is the status of order ORD123456?" **What happens:** The AI looks up the order and returns the current payment status. ``` User: What is the status of order ORD123456? Assistant: Let me check that order for you. → Calls: airpay_verify_order(orderid="ORD123456") → Returns: Order: ORD123456 Status: SUCCESS Amount: ₹500.00 Transaction ID: 7891234 ``` --- ### Example 2: Process a Refund **User prompt:** > "Refund ₹250 for transaction 7891234." **What happens:** The AI previews the refund and waits for explicit confirmation before processing. ``` User: Refund ₹250 for transaction 7891234 Assistant: I'll initiate a refund preview for you. → Calls: airpay_initiate_refund(transactions=[{ap_transactionid: "7891234", amount: "250.00"}]) → Returns: Preview — Refund ₹250.00 for transaction 7891234 Confirmation required to proceed. User: Yes, confirm Assistant: Processing the refund now. → Calls: airpay_initiate_refund(transactions=[...], confirmed=true, confirmation_token="abc123") → Returns: Refund of ₹250.00 initiated successfully for transaction 7891234. ``` --- ### Example 3: Generate a UPI QR Code **User prompt:** > "Generate a UPI QR code for ₹500 for customer John Doe, john@example.com." **What happens:** The AI generates a dynamic UPI QR code for the specified amount and customer. ``` User: Generate a UPI QR code for ₹500 for customer John Doe, john@example.com Assistant: Generating the QR code now. → Calls: airpay_generate_qr(orderid="ORD789", amount="500.00", customer_name="John Doe", customer_email="john@example.com") → Returns: QR code generated for order ORD789 Amount: ₹500.00 Share the QR with the customer to complete payment. ``` --- ### Example 4: Validate a UPI Address **User prompt:** > "Is merchant@okaxis a valid UPI address?" **What happens:** The AI validates the UPI Virtual Payment Address before a payment is initiated. ``` User: Is merchant@okaxis a valid UPI address? Assistant: Let me validate that UPI address. → Calls: airpay_validate_vpa(vpa="merchant@okaxis") → Returns: merchant@okaxis is a valid UPI Virtual Payment Address. ``` --- ### Example 5: Check a Subscription **User prompt:** > "What is the status of subscription SUB123456?" **What happens:** The AI looks up the eNACH or SI mandate and returns its current status. ``` User: What is the status of subscription SUB123456? Assistant: Let me check that subscription. → Calls: airpay_check_subscription_status(subscription_id="SUB123456") → Returns: Subscription: SUB123456 Status: SUBSCRIBED Next debit scheduled as per the mandate cycle. ``` --- --- title: Mobile Kits description: Airpay mobile SDKs let you accept payments inside Android (Kotlin/Java), iOS (Swift/Objective-C), Flutter (Dart), React Native, Apache Cordova, and Ionic Capacitor apps. Each kit includes a sample app, integration docs, and a prebuilt payment UI that handles card, UPI, netbanking, and wallet flows. --- # Mobile Kits Airpay mobile SDKs embed a secure, PCI-compliant payment experience directly inside your app. Each kit ships with a sample project, step-by-step integration guide, and supports card, UPI, netbanking, and wallet payment methods out of the box. Choose your platform below to download the SDK and follow the integration guide. ## Available SDKs --- --- title: Android Kit description: Integrate the airpay payment gateway into your Android application. --- # Android Kit This guide is for the integration of android kit backend with airpay payment application for accepting payments. If steps correctly followed as per the documentation, the installation will be successful. Integration with Android Standard SDK: The airpay Android Standard SDK package includes a sample project demonstrating the integration process using both "Kotlin" and "Java". Please ensure you add the appropriate SDK dependency to your project as specified below. We recommend upgrading to the latest available SDK version as outlined in the Android kit documentation. For reference and guidance, check the "Sample App", "Documents", "Dependency Version File", included in the SDK kit. Prerequisites: Before you begin integration, ensure the following: ``` step 1: Create an airpay account. step 2: Generate "API Keys" from the airpay dashboard. step 3: For live transactions, switch to "Live Mode API Keys" and update them in your integration. step 4: Familiarize yourself with the airpay Payment Flow. ``` Follow these steps to integrate the airpay Android Standard SDK into your application: ``` step 1: To include the airpay SDK, update your project files as follows: **Project-level `build.gradle`:** groovy dependencies { implementation("com.airpay:Airpay-India-Kit-V4:1.0.0"){ exclude group: 'androidx.core', module: 'core' // or exclude group: 'androidx.legacy', module: 'legacy-support-v4' } } **`settings.gradle`:** groovy repositories { google() mavenCentral() maven { url 'https://gitlab.com/api/v4/projects/69276629/packages/maven' name = "GitLab" credentials { username = "" // Refer to the SDK kit project for credentials password = "" // Refer to the SDK kit project for credentials } } } step 2: Initialize the SDK ``` Refer to the "Request Parameters to Call airpay SDK" section in the documentation for code to initiate requests. Also, manage SDK responses as described in the "Response Messages" section. ``` step 3: Configure ProGuard(if applicable). ``` If you are using "ProGuard", ensure the required rules listed in the SDK documentation are added to your `proguard-rules.pro` file. ##### Choose Your Android Integration Kit to Download! --- --- title: Flutter Kit description: Integrate the airpay payment gateway into your Flutter application. --- # Flutter Kit This guide is for the integration of flutter kit backend with airpay payment application for accepting payments. If steps correctly followed as per the documentation, the installation will be successful. Integration with airpay Flutter Standard Kit : The airpay Flutter Standard Kit includes a sample project that demonstrates the integration process. Ensure that you add the appropriate package version in the pubspec.yaml file as specified below. We recommend upgrading to the latest available dependency version as outlined in the Flutter Kit documentation. For reference and guidance, please consult the "Sample App" and the "Documents" included in the SDK package. Integration Steps: ``` Follow the steps below to integrate the airpay Flutter Standard SDK into your application: step 1: Install airpay Flutter Plugin Download the plugin from Pub.dev. Copy and paste the link in a new tab: https://pub.dev/packages/airpay_flutter_v4 step 2: Add Dependencies Add the following dependency in the dependencies section of your app's pubspec.yaml file. yaml dependencies: airpay_flutter_v4: ^1.0.7 step 3: Import the airpay Package Use the following code to import the airpay_package.dart file into your Flutter project. dart import 'package:airpay_flutter_v4/airpay_package.dart'; step 4: Create Request Instance and Response Handling To initiate the request, please refer to the SDK kit, which includes the request object for the airpay package. It also outlines how the response is handled from the package to the app. ``` ##### Choose Your Flutter Integration Kit to Download! --- --- title: iOS Kit description: Integrate the airpay payment gateway into your iOS application. --- # iOS Kit This guide is for the integration of iOS kit backend with airpay payment application for accepting payments. If steps correctly followed as per the documentation, the installation will be successful. Integration with airpay iOS Standard Kit : The airpay iOS Standard Kit comes with a sample project that illustrates the integration process. Make sure to include the correct version of the framework in your Xcode project. For detailed instructions and examples, refer to the "Sample App" and "Documents" provided in the SDK package. Integration Steps: ``` Follow the steps below to integrate the airpay iOS Standard SDK into your application: step 1: Drag and drop the Airpay_Kit_Swiftui.framework into your Xcode project. step 2: Go to your project's Target Settings → General tab → Embedded Binaries. Click the '+' icon and select Airpay_Kit_Swiftui.framework. Choose the "Embed Without Signing" option. step 3: In the file AirpayDemoview, add the following import statement at the top. import Airpay_Kit_Swiftui step 4: Create Request Instance and Handle Response. To initiate a transaction, refer to the request object included in the SDK kit. The documentation also details how to manage the response returned from the framework to your application. ``` ##### Choose Your iOS Integration Kit to Download! --- --- title: Ionic Capacitor description: Integrate the airpay payment gateway into your Ionic Capacitor application. --- # Ionic Capacitor Integrate the airpay Payment Gateway into your Capacitor-based Ionic application using the official airpay Capacitor plugin. This plugin serves as a wrapper around airpay's native Android and iOS SDKs, enabling seamless payment functionality. Integration with airpay Ionic Capacitor Kit : Integration Steps: ``` step 1: Install the Ionic CLI and Capacitor CLI npm install -g @ionic/cli npm install -g @capacitor/cli step 2: Create a new Ionic project ionic start ionic_sample_app blank --type=angular cd ionic_sample_app/ step 3: Enable Capacitor and add the Android platform ionic integrations enable capacitor npm install @capacitor/android npx cap add android npx cap sync android step 4: Add the iOS platform npm install @capacitor/ios npx cap add ios npx cap sync ios step 5: Install the Airpay Plugin (compatible with Ionic Capacitor v8) npm install https://github.com/Airpay2014/airpay-capacitor-V4-India.git ionic build ionic cap sync android ionic cap sync ios step 6: Create the request instance and handle the response Refer to the SDK documentation for details on how to create the request object, invoke the Airpay plugin, and handle the response flow within your app. ``` ##### Choose Your Ionic Capacitor Integration Kit to Download! --- --- title: Cordova description: Integrate the airpay payment gateway into your Cordova application. --- # Cordova The airpay Cordova Standard Kit provides a sample project that illustrates the complete integration flow. The kit also contains detailed documentation to guide you through the process. For detailed instructions and examples, please refer to the "SampleCordova App" and the "Documents" folder included in the kit package. Integration Steps: ``` step 1: Navigate to your project directory cd your-project-folder step 2: Add the required platform cordova platform add android step 3: Install the Airpay plugin cordova plugin add https://github.com/Airpay2014/airpay-cordova-V4-India.git#master step 4: Create the request instance and handle the response Refer to the SDK kit for details on how to create the request object for the Airpay plugin and manage the response flow between the plugin and your app. For complete integration steps, please refer to the Airpay\_Cordova\_Plugin\_Integration document included in the kit. ``` ##### Choose Your Cordova Integration Kit to Download! --- --- title: React Native description: Integrate the airpay payment gateway into your React Native application. --- # React Native The airpay React Native Standard Kit provides a sample project that illustrates the complete integration flow. The kit also contains detailed documentation to guide you through the process. Integration Steps: ``` step 1: Copy the SDK file to your project Copy the expo-airpay-payment-sdk-1.0.0.tgz file to the root directory of your Expo project. step 2: Install the SDK Navigate to your project directory and install the SDK using npm or Yarn. step 3: Configure the SDK Update the config/config.json file in the SDK with your credentials and configuration details, such as Merchant ID and Success URL. step 4: Import and render PaymentKit in your app In your main app file, import PaymentKit from the SDK and set up the payment flow within a NavigationContainer. step 5: Handle payment completion Use the onComplete callback to process the payment response, navigate to a result screen, display messages, or trigger #### POST-payment actions. step 6: Display payment results Create a landing screen to display payment details like status, message, amount, and transaction ID, customizable with animations or retry options. ``` ##### Choose Your React Native Integration Kit to Download! --- --- title: Affordability description: Showcase affordable payment options like EMI, Cardless EMI, and Pay Later using the airpay Affordability Widget. --- # Affordability The airpay Affordability Widget lets you showcase affordable payment options like EMI, Cardless EMI, and Pay Later directly on your product pages. Easily customisable and integrated with airpay's checkout, it enhances your customers' shopping experience. Steps ``` Step 1: Include the JavaScript File Add the following JavaScript file inside the section of your webpage: Step 2: Add a Widget Placeholder Insert a
element with a unique id at the location where you want the widget to be displayed:
Step 3: Initialize the Widget Use the script below to load and initialize the airpay Affordability Widget: ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Alphanumeric | A unique merchant ID provided by airpay. | `18999` | | amount required | Alphanumeric | The payment amount must be specified with exactly two decimal places | `2000.00` | | currency required | Alphanumeric | The three-letter currency code following ISO standards | `INR` | | key required | Alphanumeric | A secure key provided by airpay to authenticate the merchant. | `2c95bd5cb720c85634de0267b7ec4345ad20f194` | | merchant_domain optional | Alphanumeric | The merchant's domain must be Base64 encoded | `aHR0cDovL2xvY2FsaG9zdA== for http://localhost` | | StyleConfig.backgroundColor optional | Alphanumeric | A hex code or color value to customize the widget background | `#FFFFFF` | | StyleConfig.textColor optional | Alphanumeric | A hex code or color value to customize the widget's text color | `#000000` | | buy_now.url optional | Alphanumeric | To load the payment page from the widget, specify a redirect URL. airpay will redirect to this URL, where the merchant can integrate the airpay payment logic. | | buy_now.kit_type optional | Alphanumeric | To load the payment page in an iframe, pass kit_type=IFrame. | `IFrame` | | buy_now.additional_params optional | Alphanumeric | If any extra parameters are required in the buy_now.url, they should be passed accordingly. | | buy_now.IframeStyle.paymentIframWidth optional | Alphanumeric | Specify the desired width of the payment iframe | `500px or 100%` | | buy_now.IframeStyle.paymentIframHeigt optional | Alphanumeric | Specify the desired height of the payment iframe | `600px or 100%` | --- --- title: Auth Process description: Process a previously authorized transaction by capturing or releasing the hold. --- # Auth Process Processes a previously authorized transaction by either capturing the specified amount or releasing the hold. **Capture Process** - Captures the specified amount from a previously authorized transaction. **Release Process** - Releases the hold on a previously authorized transaction. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/auth-capture ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | ap_transactionid required | int | Transaction ID | `360288334` | | action required | string | Allowed values: "capture" or "release" | `capture` | | amount optional | double | Required only for partial capture. Omit for full capture or release | `50.00` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | status code(200,400) | `200` | | ap_transactionid required | String | Transaction ID | `360288334` | | amount optional | Double | Present only in capture responses | `50.00` | | authorized_amount required | String | Total amount authorized | `100.00` | ## Full Amount Capture Request ```json { "ap_transactionid": "360288334", "action": "capture" } ``` ## Partial Amount Capture Request ```json { "ap_transactionid": "360288335", "action": "capture", "amount": "50.00" } ``` ## Release Request ```json { "ap_transactionid": "360288332", "action": "release" } ``` ### Full Amount Capture Response ```json { "status_code": 200, "response_code": "00", "status": "success", "message": "success", "data": { "status": 200, "ap_transactionid": "360288334", "amount": "100.00", "authorized_amount": "100.00" } } ``` ### Partial Amount Capture Response ```json { "status_code": 200, "response_code": "00", "status": "success", "message": "success", "data": { "status": 200, "ap_transactionid": "360288335", "amount": "50.00", "authorized_amount": "100.00" } } ``` ### Release Process Response ```json { "status_code": 200, "response_code": "00", "status": "success", "message": "success", "data": { "status": 200, "ap_transactionid": "360288332", "authorized_amount": "10.00" } } ``` --- --- title: Create Mandate API description: Establish recurring payment or single mandate agreements with customers. --- # Create Mandate API Establish recurring payment or single mandate agreements with your customers. Easily configure frequency, start/end dates, amount, and payment channel. Enables merchants to automate subscriptions, secure upfront payments, or manage user consents. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/create.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | orderid required | Alphanumeric
(10-200) | Unique order identifier. | | amount required | Numeric
(1–10) | Transaction amount. | | currency_code required | Numeric
(3) | ISO 4217 numeric currency code. | `356` | | iso_currency required | String
(3) | ISO 4217 alphabetic currency code. | `INR` | | buyer_email required | Email
(3–50) | Buyer's email address. | | buyer_phone required | Numeric
(8–15) | Buyer's phone number. | | buyer_firstname required | Alphanumeric
(1–50) | Buyer's first name. | | buyer_lastname required | Alphanumeric
(1–50) | Buyer's last name. | | buyer_address optional | Alphanumeric
(1–50) | Buyer's address. | | buyer_city optional | Alphanumeric
(1–50) | Buyer's city. | | buyer_state optional | Alphanumeric
(1–50) | Buyer's state. | | buyer_pincode optional | Alphanumeric
(4–8) | Buyer's postal code. | | buyer_country optional | Alphanumeric
(2–50) | Buyer's country. | | customvar optional | Alphanumeric/Space/Equal
(1–4096) | Custom data field for merchant use. | | txnsubtype required | Numeric | Transaction subtype identifier. | | start_date required | Alphanumeric
(Date{dd/mm/yyyy}) | Mandate start date. | | end_date required | Alphanumeric
(Date{dd/mm/yyyy}) | Mandate end date. | | period required | String | Frequency or duration period of mandate. | | block_fund required | String
(1) | Required only in case of on-time mandate. | | channel required | String | Transaction channel (e.g., UPI, enach). | | customer_vpa optional | Alphanumeric | Required if channel is UPI. | | account_number optional | Numeric | Required if channel is eNACH. | | account_type optional | String | Required if channel is eNACH. | | ifsc_code optional | Alphanumeric | Required if channel is eNACH. | | auth_mode optional | String | Required if channel is eNACH. | | bank_id optional | Numeric | Required if channel is eNACH. | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Numeric | Unique identifier assigned to the merchant. | | orderid required | Alphanumeric
(`10-200`) | Unique order identifier. | | ap_transactionid required | Numeric | Transaction ID assigned by the payment gateway. | | txn_mode optional | String | Mode of transaction. | `LIVE, TEST` | | chmod required | String | Channel mode. | `upi, enach` | | amount required | Numeric | Transaction amount. | | currency_code required | Numeric | Transaction ID assigned by the payment gateway. | | iso_currency required | String
(`3`) | ISO 4217 alphabetic currency code. | `INR` | | transaction_status required | Numeric | Status code representing the transaction result. | `211 = InProcess, 400 = Failed` | | transaction_payment_status required | String | Status text representing the payment state. | `INPROCESS, SUCCESS, FAILED` | | customer_name optional | String | Name of the customer. | | customer_phone optional | Numeric | Customer's phone number. | | customer_email optional | Email | Customer's email address. | | transaction_type optional | Numeric | Type or category of transaction. | | risk optional | Numeric | Risk indicator or fraud check score (0 = no risk). | | transaction_time optional | String
(`DateTime (dd-mm-yyyy HH:MM:SS)`) | Timestamp of the transaction event. | | customer_vpa optional | Alphanumeric | Required only in case of channel = UPI Customer's Virtual Payment Address (applicable for UPI). | | ap_securehash optional | String | Required only in case of channel = UPI Secure hash for integrity validation of request. | | redirection_url optional | String | Required only in case of channel = eNACH for redirection after mandate. | --- --- title: Create Company description: Register a company for creating invoices and accepting payments via the Airpay invoice pay API. --- # Create Company This API will register the company for creating invoice for accepting payments. We must pass company name, company domain, company code, company address, company email, invoice expire hours, airpay merchant id, username, password, secret key, return format, emailcc and company token in request. If the request has valid details, we will get company token, company id and message "company successfully created". #### POST ``` https://kraken.airpay.co.in/airpay/ms/invoicepay/api/create-company ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | companyname required | Varchar | Need to pass the name of the company (length 1-50) | `newcompanynew` | | companydomain required | Varchar | Need to pass the company domain (length 1-50) | `ak` | | companycode required | Varchar | Need to pass the unique company code (length 1-7) | `4351` | | companyaddress required | Varchar | Need to pass the company address (length 1-250) | `kochi` | | companyemail required | Varchar | Need to pass the email of the company (length 1-50) | `newcompany@xyz.com` | | invoiceexpirehours optional | Numeric | Can pass the expiry hours for the invoices of the respective company (length 1-5) | `168` | | merchantid required | Numeric | Need to pass the airpay merchant id (length 1-11) | `1088` | | username required | Varchar | Need to pass the airpay username (length 1-50) | `1234567` | | secretkey required | Varchar | Need to pass the airpay secret key (length 1-100) | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` | | password required | Varchar | Need to pass the airpay password (length 1-50) | `PaSSA7ab` | | returnformat optional | Varchar | Can pass the format for response (length 1-20)
json or xml or urlencoded | `json` | | emailcc optional | Varchar | Can pass the multiple emails to keep in cc of notifications sent to customer (length 1-255) | `xyz@gmail.com` | | charges optional | Varchar | Can pass the charges on the modes on the different modes of transaction (length 1-255)
"pgdc":"1.10" (debitcard surcharge amount)
"pgcc":"1.15"(creditcard surcharge amount)
"nb":"1.50"(netbank surcharge amount) | `pgdc:1.10` | | returncompanytoken optional | Numeric | Can pass to get company secret token in response (length 1)
Eg. 1 for yes | `1` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | success required | Numeric | Success code
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | `200` | | message required | Varchar | Success message with data. | ## Request Example ``` { "companyname": "newcompanynew", "companydomain": "ak", "companycode": "4351", "companyaddress": "kochi", "companyemail": "newcompany@xyz.com", "invoiceexpirehours": "168", "merchantid": "1088", "username": "1234567", "secretkey":" 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps", "password":" PaSSA7ab", "returnformat": "json", "emailcc": "xyz@gmail.com", "charges": { "pgdc": "1.10", "pgcc": "1.15", "nb": "1.50" } } ``` ### Success Response ``` HTTP/1.1 200 OK { "success": "200", "message": { "data": { "companytoken": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps", "COMPANY_ID": "124", "comCreation": "company successfully created" } } } ``` ### Error Response ``` HTTP/1.1 502 Not Found { "status": 502, "message": [] } ``` --- --- title: Offers API description: Verify unique IDs in offer URLs and retrieve coupon access details. --- # Offers API This API is triggered by the offers system to verify the unique ID in the offers URL for coupon access. When the URL loads, an API call is made to the affiliate callback URL to validate the ID. The response's "data" parameter provides transaction details, including the customer's name (displayed on the offers page) and the amount, which determines the number of coupons shown: - Amount > 2000: 8 coupons. - 2000 > Amount > 1000: 4 coupons. - 1000 > Amount > 500: 2 coupons. Otherwise, show the default token count. If "expiryday" is present, use it as the expiry period; otherwise, use the standard expiry from affiliate data. Expiry day will be considered from the day of transaction datetime. The URL's accessibility period is set during affiliate onboarding. #### POST ``` https://offers.airpay.co.in/app// ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/json | | checksum required | Text
(`64`) | Checksum value(length 64) hash('sha256',); | `91f5evhk72f5` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | affiliateid required | String
(10) | affilate identification code | `91fc5evhk7` | | uniqueid required | String | unique id entered in url in base64 format(max length 10) (required) | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Sattus Code(400- fail,200-success)(required)(length 3) | | message required | String | Status Message(success,fail)(required) | | data required | json | Response data(required) Example: { "transactiontime":"Y:m:d H:i:s","customer":"ravi dubey","amount":"1000.00","expiryday":"4", } | | checksum required | String | Checksum value(required)(length 64) hash('sha256',); | ## Request Example ``` curl --location --request POST '{{Affiliate Verification Url}}' \ --header 'Content-Type: application/json' \ --header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --data-raw '{ "affiliateid":"91fc5evhk7","uniqueid":"30912508233b7r37562g2hps" }' ``` ### Success Response ```json { "status": 200, "message": "success", "data": { "transactiontime": "2021-04-18 00:00:00", "customer": "ravi dubey", "amount": "1000.00", "expiry": "72" }, "checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps" } ``` --- --- title: Create Batch Payout description: Send payout requests in bulk to partners as a single batch. --- # Create Batch Payout The Create Batch Payout Request API allows merchants to send payout requests in bulk to their partners, processed as a single batch. The API uses JSON format for both request and response payloads. To ensure security, all data is encrypted using AES-256 Base64 encryption. Each partner is provided with a unique authentication key and encryption key for secure transaction processing. #### POST ``` http://kraken.airpay.co.in:8000/payout/partner/payout-batches ``` ## Header | Parameter | Type Value | Description | Value Like | | ---------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NT` | ## Request Body | Parameter | Type Value | Description | Value Like | | ------------------------- | ------------------------ | ------------------------------------------ | ---------------------- | | batch_code required | Alphanumeric
(1-25) | Unique code of the payout batch | `BTCH20260806TS2` | | batch_name required | Alphanumeric
(1-100) | Name of the batch | `Test 06 Aug 2026 TS2` | | created_datetime required | DateTime | Batch creation date and time (Y-m-d H:i:s) | `2022-07-24 18:05:43` | | transfers required | Array | Array of transfer data blocks | `[{...}]` | | transfer_number required | Alphanumeric
(1-10) | Unique id of the transfer in the batch | `1` | | UID required | Alphanumeric
(1-50) | Custom variable from partner | `Samuel` | | payee_name required | Alphanumeric
(1-100) | Name of the payee | `Tom AB` | | payee_mobile required | Numeric
(10-15) | Mobile number of the payee | `71234876566` | | payee_email optional | String | Payee email address | `sample@example.com` | | bank_name required | Alphanumeric
(1-50) | Beneficiary bank name | `HDFC` | | account_type required | Alphanumeric | Beneficiary account type | `Saving` | | bank_account_id required | Alphanumeric
(1-30) | Beneficiary account identifier | `00123410001234` | | bank_ifsc required | Alphanumeric
(1-15) | Beneficiary bank IFSC code | `HDFC0000080` | | order_id optional | Alphanumeric
(1-50) | Merchant order ID for reconciliation | `ord2026080602` | | currency required | Alphanumeric
(3) | Currency code. Default value "INR" | `INR` | | amount required | Numeric | Amount to transfer | `2.00` | | transfer_mode required | Alphanumeric | NEFT / IMPS | `NEFT` | | upi_id optional | String | UPI identifier, if applicable | `` | | remarks required | String | Required remarks for the transfer | `Test Txn` | | pan_number optional | Alphanumeric
(10) | Payee PAN number | `ABCS0123A` | ## Success 200 | Parameter | Type Value | Description | Value Like | | ---------------------------- | ------------ | --------------------------------------------------- | ----------------------- | | status required | Alphanumeric | success / error | `status=success` | | message required | Alphanumeric | Response description | `Payout batch created.` | | errors required | Array | Error messages if response status is 'error' | | data required | Array | Response data | | code required | Alphanumeric | Payout batch code | `2022JAN` | | name required | Alphanumeric | Payout Batch of January 2022 Payout batch name | `Affiliate` | | create_datetime required | DateTime | Date and time of payout batch created (Y-m-d H:i:s) | `2022-02-13 09:54:43` | | transfers required | Array | Transfer data block | | transfer_number required | Alphanumeric | Unique id of the transfer in the batch | `10` | | UID required | Alphanumeric | Custom variable from partner | `USER1` | | amount required | Numeric | Amount to transfer | `2500` | | payee_name required | Alphanumeric | Name of the payee | `John Brown` | | payee_mobile required | Numeric | Mobile number of the payee | `9846030201` | | currency required | Alphanumeric | Currency code | `INR` | | partner_bank_id required | Numeric | Partner bank account id | `111` | | bank_name required | Alphanumeric | Beneficiary bank name | `SBI` | | bank_account_type required | Alphanumeric | savings / current | `savings` | | bank_account_number required | Numeric | Beneficiary account number | `560002379833` | | bank_ifsc required | Alphanumeric | Beneficiary bank IFSC code | `SBIN0016387` | | transfer_mode required | Alphanumeric | NEFT / IMPS | | transfer_datetime required | DateTime | Transfer date and time(Y-m-d H:i:s) | `null` | | utr_number required | Alphanumeric | UTR / RRN Number | `null` | | fees required | Numeric | Transfer charge (If transfer status is success) | `0` | ## Request Example ```json { "batch_code": "BTCH20260806TS2", "batch_name": "Test 06 Aug 2026 TS2", "created_datetime": "2022-07-24 18:05:43", "transfers": [ { "transfer_number": "1", "UID": "Samuel", "payee_name": "Tom AB", "payee_mobile": "71234876566", "payee_email": "sample@example.com", "bank_name": "HDFC", "account_type": "Saving", "bank_account_id": "00123410001234", "bank_ifsc": "HDFC0000080", "order_id": "ord2026080602", "currency": "INR", "amount": 2.0, "transfer_mode": "NEFT", "upi_id": "", "remarks": "Test Txn", "pan_number": "ABCS0123A" }, { "transfer_number": "2", "UID": "Ravi", "payee_name": "Ravi Kumar", "payee_mobile": "9876543210", "payee_email": "dummy@example.com", "bank_name": "ICICI", "account_type": "Current", "bank_account_id": "00123420001234", "bank_ifsc": "ICIC0000123", "order_id": "ord2026080603", "currency": "INR", "amount": 500.5, "transfer_mode": "IMPS", "upi_id": "ravi@icici", "remarks": "Second test transaction", "pan_number": "ABCD1234E" } ] } ``` ### Success Response (Decrypted) ```json { "status": "success", "message": "Payout batch created.", "data": { "code": "BTCH20260806TS2", "name": "Test 06 Aug 2026 TS2", "created_datetime": "2022-07-24 18:05:43", "transfers": [ { "transfer_number": "1", "UID": "Samuel", "payee_name": "Tom AB", "payee_mobile": "71234876566", "payee_email": "sample@example.com", "bank_name": "HDFC", "account_type": "Saving", "bank_account_id": "00123410001234", "bank_ifsc": "HDFC0000080", "order_id": "ord2026080602", "currency": "INR", "amount": 2.0, "transfer_mode": "NEFT", "upi_id": "", "remarks": "Test Txn", "pan_number": "ABCS0123A", "status": "PENDING", "transfer_datetime": null, "utr_number": null, "fees": 0 }, { "transfer_number": "2", "UID": "Ravi", "payee_name": "Ravi Kumar", "payee_mobile": "9876543210", "payee_email": "dummy@example.com", "bank_name": "ICICI", "account_type": "Current", "bank_account_id": "00123420001234", "bank_ifsc": "ICIC0000123", "order_id": "ord2026080603", "currency": "INR", "amount": 500.5, "transfer_mode": "IMPS", "upi_id": "ravi@icici", "remarks": "Second test transaction", "pan_number": "ABCD1234E", "status": "PENDING", "transfer_datetime": null, "utr_number": null, "fees": 0 } ] } } ``` --- --- title: Create Single page description: Create a payment form and subdomain for collecting customer payments. --- # Create Single page Single page is used to create the payment form and subdomain (Domain name of the Merchant) which is collecting the details of the customers before payment and displays the details of the merchant. We must pass merchant name, sub domain, airpay merchant id, username, password, and secret key, then we will get success response and subdomain allocated to this merchant. #### POST ``` https://kraken.airpay.co.in/airpay/ms/singlepager/api/create ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_name required | String
(1-80) | Name of the Merchant | `ABC` | | subdomain required | Alphanumeric
(1-80) | Domain name of the Merchant eg. abc.nwpay.co.in | `https://abc.nwpay.co.in` | | airpay_merchant_id required | Numeric
(1-11) | Merchant Id | `1088` | | airpay_username required | Alphanumeric
(1-50) | Merchant Username | `userabc` | | airpay_password required | Alphanumeric
(1-50) | Merchant Password | `passabc` | | airpay_secret_key required | Alphanumeric
(1-100) | Merchant Secret Key | `hk72f56432ec` | | template optional | Numeric | Template (length 1)
Expected Values 1,2,3,4,5, Default Value 1. | | checksum required | Alphanumeric
(1-100) | Checksum
hash_hmac('sha256',merchant_name + subdomain + airpay_merchant_id + airpay_username + airpay_username + airpay_secret_key); | `91f5evhk72f56432ec678s` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Result required | String | Result message
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | `200` | | SinglePager required | String | It will display url of the subdomain | `{"Subdomain":"https://abc.nwpay.co.in"}` | ## Request Example ```json { "merchant_name": "ABC", "subdomain": "https://abc.nwpay.co.in", "airpay_merchant_id": "1088", "airpay_username": "userabc", "airpay_password": "passabc", "airpay_secret_key": "hk72f56432ec", "template": "1", "checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps" } ``` ### Success Response ```json HTTP/1.1 200 OK { "Result": "Success", "SinglePager": {"Subdomain":"https://abc.nwpay.co.in"} } ``` ### Error Response ```json { "SinglePager": { "Errors": { "00": "Header Aunthentication Failed, Invalid Content-Type", "01": "Header Aunthentication Failed, airpay-Key Can Not Be Empty", "02": "Header Aunthentication Failed, Invalid airpay-Key", "03": "Merchant Name Can Not Be Empty", "04": "Subdomain Can Not Be Empty", "05": "airpay Merchant Id Can Not Be Empty", "06": "airpay Username Can Not Be Empty", "07": "airpay Password Can Not Be Empty", "08": "airpay Secret Key Can Not Be Empty", "09": "Domain Already Exist", "10": "Invalid Request", "11": "Checksum Can Not Be Empty", "12": "Wrong Checksum", } }, "Result": "Fail" } ``` --- --- title: Refund description: Initiate full or partial refunds for transactions via the API. --- # Refund This API can be used to initiate refund from the merchant's platform. The partial and full refund can be requested. For partial amount, the amount needs to be filled by the merchant. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/refund/?token= ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mode required | String | Mode "refund" | `refund` | | transactions optional | String | Base64 encoded refund JSON. Example data ``` [{"ap_transactionid": 10265,"amount": "100.00"},{"ap_transactionid": 10264,"amount": "10.00"}] ```
base64 encoded transactions ``` W3siYXBfdHJhbnNhY3Rpb25pZCI6IDEwMjY1LCJhbW91bnQiOiAiMTAwLjAwIn0seyJhcF90cmFuc2FjdGlvbmlkIjogMTAyNjQsImFtb3VudCI6ICIxMC4wMCJ9XQ== ```
ap_transactionid = airpay transaction reference number
amount = Full/Partial refund amount | `yJhbW91bnQiOiAiMTAwLjAwIiB9XQ==` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | transactions required | Object | List of transactions | | ap_transactionid required | Numeric | airpay transaction reference number | `3213213212` | | success required | String | Refund status
"true" = Successfully initiated refund.
"false" = Refund was not initiated. | `false` | | message required | String | can not be performed. Refund already initiated. refund message | `Refund` | | refund_id required | Numeric | Trfund reference number. | `12071` | | mode optional | String | Mode | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['transactions'] = base64_encode('[{"ap_transactionid": 10265,"amount": "100.00"},{"ap_transactionid": 10264,"amount": "10.00"}]'); $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/refund/?token=', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code": "200", "response_code": "00", "status": "Success", "message": "success", "data": { "transactions": [ { "ap_transactionid": 10265, "amount": "100.00", "success": "false", "message": "Refund can not be performed. Refund already initiated.", "refund_id": "12071" }, { "ap_transactionid": "10264", "success": "true", "message": "Transaction accepted for refund", "refund_id": "12076" } ] } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: Consolidated Settlement Report description: Consolidated Settlement Report --- # Consolidated Settlement Report This API retrieves Consolidated Settlement Report #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/report/settlement ``` ## Header | Parameter | Type Value | Description | Value Like | | --------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | ------------------ | ---------- | ------------------------------------------------ | ------------ | | from_date required | String | From date | `YYYY-MM-DD` | | to_date required | String | To Date | `YYYY-MM-DD` | | page_no required | Numeric | Call next page until get error code of no record | `1` | ## PHP ```php $merchant_id, 'encdata' => $encdata, 'checksum' => $checksum ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://kraken.airpay.co.in/airpay/pay/v4/api/report/settlement/?token=", CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); print_r($response); ?> ``` ## Success 200 | Parameter | Type Value | Description | Value Like | | ---------------------------------- | ---------- | ----------------------------------- | -------------------------- | | status_code required | String | HTTP status code | `200` | | response_code required | String | Response code (00 for success) | `00` | | status required | String | Status of the request | `success` | | message required | String | Response message | `success` | | data required | Object | Contains settlement report details | `{}` | | settlement_report_details required | Array | Array of settlement report records | `[]` | | settlement_date required | String | Settlement date (YYYY-MM-DD) | `2026-05-01` | | utr_number required | String | Unique Transaction Reference number | `TESTUTR22026050122576739` | | total_txn_amount required | String | Total transaction amount | `1438241.80` | | total_net_amount required | String | Total net amount | `321678.79` | | version required | Number | Version number of report | `2026-05-01` | ### Success Response (JSON) ```json { "status_code": "200", "response_code": "00", "status": "success", "message": "success", "data": { "settlement_report_details": [ { "settlement_date": "2026-05-02", "version": "2", "utr_number": "KKBKR22X2605M222NN3416", "total_txn_amount": "69936457.77", "total_net_amount": "68821495.77" }, { "settlement_date": "2026-05-02", "version": "10", "utr_number": "KKBKR2202IJ50BY25920JI", "total_txn_amount": "415320.00", "total_net_amount": "415284.00" } ] } } ``` --- --- title: Transaction Wise Settlement Report description: Transaction Wise Settlement Report --- # Transaction Wise Settlement Report This API retrieves Transaction Wise Settlement Report #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/report/settlement ``` ## Header | Parameter | Type Value | Description | Value Like | | --------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | ------------------------ | ---------- | ---------------------------------------------------------------------------------- | ---------------------------- | | api_type required | String | API type identifier | `TRANSACTION_SETTLEMENT_API` | | version required | Numeric | The version number will come in the response of the Consolidated Settlement Report | `1` | | settlement_date required | String | Settlement date | `YYYY-MM-DD` | | page_no required | Numeric | Call next page until get error code of no record | `1` | ## PHP ```php $merchant_id, 'encdata' => $encdata, 'checksum' => $checksum ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://kraken.airpay.co.in/airpay/pay/v4/api/report/settlement/?token=", CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); print_r($response); ?> ``` ## Success 200 | Parameter | Type Value | Description | Value Like | | ------------------------------- | ---------- | ------------------------------------------- | -------------------------- | | status_code required | String | HTTP status code | `200` | | response_code required | String | Response code | `00` | | status required | String | Status of the request | `success` | | message required | String | Response message | `success` | | data required | Object | Contains transaction details | `{}` | | transaction required | Array | Array of transaction records | `[]` | | merchant_txn_date_time required | String | Merchant transaction date time | `28-04-2026 20:42:21` | | transaction_id required | String | Transaction ID | `1885079358` | | merchant_txn_id required | String | Merchant transaction ID | `100006542084312` | | split_config_id required | String | Split configuration ID | `` | | utr_number required | String | Unique Transaction Reference | `TESTUTR22026050122576739` | | id-1 to id-10 required | String | Split settlement amounts with different ids | `1115.40` | | txn_amount required | String | Transaction amount | `1127.20` | | platform_fees required | String | Platform fees | `10.00` | | gst required | String | GST amount | `1.80` | | net_payable required | String | Net payable amount | `1115.4` | | profile_id required | String | Profile ID | `18999` | | payout_date required | String | Payout date | `2026-05-01` | | rrn_number required | String | RRN number | `560280918527` | ### Success Response (JSON) ```json { "status_code": "200", "response_code": "00", "status": "success", "message": "success", "data": { "transaction": [ { "merchant_txn_date_time": "15-05-2026 10:05:04", "transaction_id": "490134489", "merchant_txn_id": "1505261150X984257", "split_config_id": "", "utr_number": "KKBKR2242GIJ16XWI02539", "id-1": "95,000.00", "id-2": "0", "id-3": "0", "id-4": "0", "id-5": "0", "id-6": "0", "id-7": "0", "id-8": "0", "id-9": "0", "id-10": "0", "txn_amount": "95036.00", "platform_fees": "30.51", "gst": "5.49", "net_payable": "95000", "profile_id": "3397371242", "payout_date": "2026-05-16", "rrn_number": "560280918527" }, { "merchant_txn_date_time": "15-05-2026 10:55:07", "transaction_id": "8901412251", "merchant_txn_id": "1505264650IY084270", "split_config_id": "", "utr_number": "KKBKR22XTJ51UID80I2539", "id-1": "756.20", "id-2": "0", "id-3": "0", "id-4": "0", "id-5": "0", "id-6": "0", "id-7": "0", "id-8": "0", "id-9": "0", "id-10": "0", "txn_amount": "792.20", "platform_fees": "30.51", "gst": "5.49", "net_payable": "756.2", "profile_id": "3397371242", "payout_date": "2026-05-16", "rrn_number": "6136710069892" } ] } } ``` --- --- title: Simple Transaction description: Redirect customers to airpay's payment page for completing payments. --- # Simple Transaction In simple transaction, while making a payment the user will be redirected to airpay's payment page for completing the payment.The customer will be redirected to the success url cofigured at airpay after completing the transaction. **Note:** If specific payment modes are specified, only those will be visible to the customer while making a payment. ![Simple Transaction Flow](../../../../assets/simple_txn.png) #### POST ``` https://payments.airpay.co.in/pay/v4/?token= ``` ## Request Body | Parameter | Required | Type / Size | Description | Example | |---|---|---|---|---| | `orderid` | Yes | Alphanumeric (1-30) | Merchant generated transaction ID | `ORD1234` | | `amount` | Yes | Numeric (1-10 .2) | Amount with two decimals | `100.00` | | `currency_code` | Yes | Numeric (3) | Numeric currency code | `356` | | `iso_currency` | Yes | String (3) | ISO currency code | `INR` | | `buyer_email` | Yes | Email (3-50) | Buyer email address | `customer@example.com` | | `buyer_phone` | Yes | Numeric (8-15) | Buyer phone number | `99999999` | | `buyer_firstname` | Yes | Alphanumeric (1-50) | Buyer first name | `John` | | `buyer_lastname` | Yes | Alphanumeric (1-50) | Buyer last name | `Doe` | | `buyer_address` | No | Alphanumeric (1-50) | Buyer address | `711-2880 Nulla St.` | | `buyer_city` | No | Alphanumeric (1-50) | Buyer city | `Mankato` | | `buyer_state` | No | Alphanumeric (1-50) | Buyer state | `Mississippi` | | `buyer_pincode` | No | Alphanumeric (4-8) | Buyer pincode | `96522` | | `buyer_country` | No | Alphanumeric (2-50) | Buyer country | `USA` | | `customvar` | No | Alphanumeric / Space / Equal (1-4096) | Additional information for tracking or custom processing | `1234567\|test\|ABC1234` | | `chmod` | No | Chars | Payment modes available for the user. Leave blank to show all enabled modes.

Supported values:
`ppc` = Prepaid Card
`pg` = Payment Gateway
`nb` = Netbanking
`pgcc` = Credit Card
`pgdc` = Debit Card
`cash` = Cash
`emi` = EMI
`rtgs` = RTGS
`upi` = UPI
`btqr` = Bharat QR
`payltr` = Pay Later
`va` = Virtual Account
`enach` = eNACH
`remit` = Remittance | `pg` | | `txnsubtype` | No | Numeric | Transaction subtype.

`1` = INR Auth-Capture
`2` = INR Sale Auth
`3` = INR Moto
`4` = INR Moto Auth-Capture
`5` = INR Sale DCC
`6` = INR DCC Auth-Capture
`7` = 3 Months EMI
`8` = 6 Months EMI
`9` = 9 Months EMI
`10` = 12 Months EMI
`11` = 18 Months EMI
`12` = INR Subscription
`13` = 24 Months EMI
`36` = 36 Months EMI
`74` = 3 Months Debit EMI
`75` = 6 Months Debit EMI
`76` = 9 Months Debit EMI
`77` = 12 Months Debit EMI | `2` | | `wallet` | No | Numeric | Wallet transaction type.

`0` = Default
`1` = Load Consumer Wallet
`2` = Debit Consumer Wallet | `0` | | `utility_biller_name` | No | Alphanumeric (2-50) | Mandatory for transactions with specific MCCs such as utilities, healthcare, education, and government payments.

Applicable MCCs: `4900`, `6012`, `6051`, `6300`, `6513`, `8011`, `8050`, `8062`, `8099`, `8111`, `8211`, `8220`, `8241`, `8244`, `8249`, `8299`, `8351`, `9311` | `Electricity Board` | | `token` | Yes | Alphanumeric (2-30) | Token (if tokenization is enabled) | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` | | `kittype` | No | Chars | Type of integration kit being used.

Supported values:
`inline`
`iframe`
`server_side_sdk`
`mobile`
`cs-cart`
`drupal`
`joomla`
`magento`
`opencart`
`shopify`
`wordpress`
`prestashop` | `joomla` | | `savecard` | No | Char (1) | Save card in tokenized format (`Y` / `N`) | `N` | | `sb_nextrundate` | No | Date (20) | Next subscription date for `txnsubtype = INR-SI`.
Format: `DD/MM/YYYY`.
Date must be current date +1 (T+1). | `01/01/2025` | | `sb_period` | No | Char (1) | Subscription period for `txnsubtype = INR-SI`.
Supported values:
D - Day, W - Week, M - Month, Y - Year, A - Adhoc| `D` | | `sb_frequency` | No | Numeric (1-3) | Subscription frequency | `12` | | `sb_amount` | No | Numeric (1-10 .2) | Subscription amount | `100.00` | | `sb_isrecurring` | No | Numeric (1) | Is subscription recurring (for enabling subscription) (for txnsubtype INR-SI) (`1` / `0`) | `1` | | `sb_recurringcount` | No | Numeric (1-3) | Subscription recurring count.
If value is `999`, subscription becomes never-ending (applicable for eNACH transactions). | `12` | | `sb_retryattempts` | No | Numeric (1) | Subscription retry attempts | `3` | | `sb_maxamount` | No | Numeric (1-10 .2) | Maximum subscription charge amount | `500.00` | | `uid` | No | Alphanumeric (1-32) | Unique user identifier from merchant.
Applicable for channels: `ppc`, `nb`, `EMI` | `USER123` | | `upi_tpv_account` | No | Numeric (12-18) | Restricts UPI payments to the linked bank account number. Payments from other accounts will be rejected. | `123456789012` | | `upi_tpv_ifsc` | No | Alphanumeric (1-11) | IFSC code for the UPI TPV account.
Mandatory when `upi_tpv_account` is provided. | `SBIN0001234` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | ap_transactionid required | Numeric | airpay transaction reference number | `11314` | | transaction_payment_status required | Alphanumeric | Transaction payment status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS | `SUCCESS` | | merchant_id required | Numeric | Merchant ID | `123356` | | orderid required | Alphanumeric | orderid you have send to airpay system | `ORDER123456` | | txn_mode optional | Alphanumeric | Transaction mode LIVE or Sandbox | `LIVE` | | chmod required | Alphanumeric | Channel of Payment done | `pg` | | amount required | Numeric | Transaction amount | `100.00` | | currency_code optional | Numeric | Payment Currency | `356` | | transaction_status required | Numeric | Transaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found | `200` | | message required | Alphanumeric | Response message received from payment gateway
Success Transaction is success
Transaction in Process Transaction in processing
Failed Transaction in failed
Dropped The transaction will not register properly
Cancel Payment that has not yet been processed
Incomplete Not recieved any call back from bank
Bounced The transaction has bounced
No Records There is no records found | `Success` | | customer_name optional | Alphanumeric | Customer Name | `John Doe` | | customer_phone optional | Alphanumeric | Customer Phone | `987654321` | | customer_email optional | Email | Customer Email | `customer@example.com` | | transaction_type optional | Numeric | Transaction Type
Mandate approved, Auth - 310
Sale - 320
Capture - 330
Refund - 340
Chargeback - 350
Reversal - 360
SaleComplete - 370
SaleAdjust - 380
TipAdjust - 390
Sale+Cash - 400
Cashback - 410
Void - 420
Release - 430
Cashwithdrawal - 440 | `320` | | risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | `0` | | billed_amount optional | Numeric | Includes total amount of bill amount with two decimals | `110.00` | | token optional | Alphanumeric | Token string | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` | | transaction_time optional | Date | Transaction Time | `30-11-2023 12:32:59` | | card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | | card_unique_code optional | Alphanumeric | Card unique Code, this field is available in pg | `c237b1ba20f5f6cbe32f47e6db1d1d53` | | bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | `AXIS BANK` | | card_country optional | Alphanumeric | Card issued country, this field is available in pg | `IND` | | card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | `cc` | | bank_response_msg optional | Alphanumeric | Response message from the bank | `Success` | | reason optional | Alphanumeric | Failed Reason | `Fund` | | ap_SecureHash required | Alphanumeric | Secure hash generated by airpay ``` Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); ``` If chmod is UPI, then ap_SecureHash is ``` Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME. : .CUSTOMER_VPA); ``` | `1490948220` | | custom_var optional | Alphanumeric
(`1-120`) | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in ***custom_var*** separated by the '|' symbol. | `1234567|test|ABC1234` | | subscription_id optional | Alphanumeric | Subscription ID, if subscription transaction | | subscription_next_rundate optional | Alphanumeric | subscription next run date, if subscription transaction | ## PHP ```php >"; $username = ""; $password = ""; $secret = ""; $client_secret = ""; $client_id = ""; $secretKey = ''; $data = array(); $data['buyer_email'] = 'customer@example.com'; $data['buyer_phone'] = '99999999'; $data['buyer_firstname'] = 'John'; $data['buyer_lastname'] = 'Doe'; $data['amount'] = '10.00'; $data['orderid'] = 'ORD123456'; $data['currency_code'] = "356"; $data['iso_currency'] = "inr"; $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); ?> airpay
Do Not Refresh or Press Back
Redirecting to airpay
``` ### Success Response ```json HTTP/1.1 200 OK { "status_code":"200", "status":"success", "response_code":"00", "message":"Success", "data": { "transaction_payment_status":"SUCCESS", "merchant_id":"123356", "orderid":"ORDER123456", "ap_transactionid":"11314", "txn_mode":"LIVE", "chmod":"pg", "amount":"100.00", "currency_code":"356", "transaction_status":200, "message":"Success", "bank_response_msg":"Success", "customer_name":"John Doe", "customer_phone":"987654321", "customer_email":"customer@example.com", "transaction_type":320, "risk":"0", "customvar":"0", "token":"", "uid":"U123", "transaction_time":"30-11-2023 12:32:59", "surcharge_amount":"51.41", "card_scheme": "visa" "card_number": "462294XXXXXX3713" "bank_name": "anz bank" "card_country": "australia" "card_type": "Credit" "token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk" "ap_SecureHash":"1490948220" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: Manage Subscription description: Manage recurring payment subscriptions by unsubscribing, pausing, or resuming them. --- # Manage Subscription This API will be used by merchant who wants to accept recurring payments via subscription model. Auto debit can be done based on the preference or interval. Unsubscribe allows to stop the subscription to no longer continue it, Pause allows you to pause the subscription for an interval and Resume allows you to again start the subscription after an interval. #### POST ``` https://kraken.airpay.co.in/airpay/api/updatesubscription.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number | Merchant Identification Number | `11111` | | subscription_id required | Number | airpay Subscription Id | `1000001` | | action required | String | Request Type
"U" - Unsubscribe
"P" - Pause
"R" - Resume | `U,P,R` | | sb_date required | Date | Request date is future date when to update the subscription (Ex : DD-MM-YYYY) | `12-12-2020` | | checksum required | Alphanumeric
(10-200) | Checksum
privatekey = hash('sha256', secret.'@'.username.':|:'.password)
Hash generated by: hash_hmac('sha256', subscription_id+private_key+ merchant_id+action+sb_date , )
Note: Use the same secret key, username and password provided on payment kit to generate private key | `92c617a556982a8d124ff2b7ce9eae3e` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status value will pass as per the condition | `200,533` | | message required | String | Status message value will pass as per the condition | `Subscription updated successfully,Error in unsubscription` | ## Request Example (JSON) ```json { "merchant_id" : "11111", "subscription_id" :"1000001", "action" : "U", "sb_date" : "12-12-2020", "checksum" : "92c617a556982a8d124ff2b7ce9eae3e" } ``` ## Request Example (XML) ```xml ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", } ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "status" : "400", "message" : "Charge not possible on this Date.", } ``` ### Success Response (XML) ```xml HTTP/1.1 200 OK 200 Subscription updated successfully. ``` ### Error Response (XML) ```xml HTTP/1.1 200 OK 400 Charge not possible on this Date. ``` ### Status List ``` 200 - Subscription updated successfully 533 - Error in unsubscription 603 - Subscription is in Unsubscribed state 604 - Amount should not be greater than 605 - Amount should be greater than or equal to 1 619 - Subscription id is invalid 620 - Subscription request was not accepted 621 - Subscription action is invalid 622 - Subscription is already set one skip recurring 623 - Error in update amount subscription 624 - Subscription is already in Subscribed state 625 - Subscription is already in Paused state 626 - No future recurring subscription 627 - Error in pausing subscription 628 - Error in resuming subscription ``` --- --- title: Create VA description: Create or assign a virtual account for a user. --- # Create VA A Virtual Account is a digital payment method through an account that is created virtually for each customer. To make payments, customers will be referred to their own Virtual Accounts. This API will create/assign virtual account for user provided if we pass merchant id and buyer phone then it returns assigned virtual account number along with other bank details. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - create | `create` | | private_key required | Alphanumeric | Private Key (length 10-200)
privatekey = hash('sha256', secret.'@'.username.':|:'.password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | buyer_phone required | Numeric|Space|Hyphen | Mobile number of user | `7208246368` | | buyer_email required | Email | Email Id of user | `consultant.prathamesh@airpay.co.in` | | UID required | Alphanumeric | Unique user identifier from the merchant | `1235` | | checksum required | Alphanumeric | Hash generated by : sha1(buyer_email.buyer_phone.UID.action.merchant_id.private_key) (required) | `a1d4d016a23a4c7bff1fe0c965bc1f987de37ac2` | | mer_dom optional | Alphanumeric
(1-50) | Merchant Domain in BASE_64 | `aHR0cCUzQSUdyRiUyRmtovY2FsaG9zdA==` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code Success - 200
Failed - 400 | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found | `success,fail` | | VIRTUALACCNO required | String | Virtual Account No | | BENEFICIARYNAME required | String | Beneficiary Name | | IFSC required | String | IFSC Code | | BANK required | String | Bank Name | | BRANCH required | String | Branch Name | | BANKADDRESS required | String | Bank Address | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=create' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'buyer_phone=7208246368' \ --form 'buyer_email=consultant.prathamesh@airpay.co.in' \ --form 'checksum=a1d4d016a23a4c7bff1fe0c965bc1f987de37ac2' \ --form 'UID=1235' \ --form 'mer_dom =aHR0cCUzQSUdyRiUyRmtovY2FsaG9zdA==' ``` ### Success Response ```json HTTP/1.1 200 OK { { "STATUS": "200", "MESSAGE": "Success", "VIRTUALACCNO": "22936640000000010242" "BENEFICIARYNAME": "AIRPAY PAYMENT SERVICES PRIVATE LIMITED" "IFSC": "ICIC0000103" "BANK": "ICICI BANK" "BRANCH": "MUMBAI" "BANKADDRESS": "ICICI Bank Ltd, 163, H.T. Parekh Marg, Backbay Reclamation, Churchgate,Mumbai 400 028" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "STATUS": "400", "MESSAGE": "Failed" } } ``` --- --- title: Create Wallet Account description: Create a wallet account for a user on the merchant application. --- # Create Wallet Account This API is used to create a wallet account for a user on the merchant application. It requires merchant ID, private key, buyer's details, and UID in the request. A successful request returns the transaction mode as wallet, transaction status, wallet balance, and other details. #### POST ``` https://kraken.airpay.co.in/airpay/wallet/api/walletCreate.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number
(1-20) | Merchant ID | `18999` | | private_key required | String
(10-200) | Private Key, generated as hash('sha256', secret.'@'.username.':|:'.password) | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | buyer_email required | String
(6-50) | Email of the wallet user | `test@xyz.com` | | buyer_phone required | String
(10-15) | Mobile number of the wallet user (numeric, spaces, or hyphens allowed) | `9877412412` | | buyer_first_name required | String
(1-50) | First name of the wallet user (alphanumeric, spaces allowed) | `ABC` | | buyer_last_name required | String
(1-50) | Last name of the wallet user (alphanumeric, spaces allowed) | `XYZ` | | UID required | String | Merchant-generated Unique User ID | `1234` | | outputFormat optional | String
(1-3) | Response format: json or xml (default: xml) | `xml` | | checksum required | String
(10-100) | MD5 hash: md5(buyer_email.buyer_phone.buyer_first_name.buyer_last_name.UID.date('Y-m-d').private_key) | `72ce8cfbb1347905c34e121336bb3d09` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | | MESSAGE required | String | Response message from the payment gateway (e.g., "Successful", "Invalid checksum") | | CHMOD required | String | Transaction channel mode (always "wallet") | `wallet` | | MERCHANTID required | String | Merchant ID | `18999` | | USERNAME required | String | Email or username of the wallet user | | WALLETBALANCE required | Number | Wallet balance after transaction | `50.00` | ## Request Example ``` curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletCreate.php' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'merchant_id=18999' \ --data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'buyer_email=aatest12@gmail.com' \ --data-urlencode 'buyer_phone=9234337892' \ --data-urlencode 'buyer_first_name=test' \ --data-urlencode 'buyer_last_name=test' \ --data-urlencode 'UID=1234' \ --data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09' ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "CHMOD": "wallet", "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "MERCHANTID": "18999", "USERNAME": "aatest12@gmail.com", "WALLETBALANCE": 50.00 } } ``` ### Success Response (XML) ```xml 200 Successful wallet 18999 aatest12@gmail.com 50.00 ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" } } ``` ### Error Response (XML) ```xml 400 Invalid checksum ``` --- --- title: Execute API description: Trigger scheduled or one-time payments against active mandates. --- # Execute API Trigger scheduled or one-time payments against active mandates. Merchants can debit customer accounts for the authorized amount and frequency, handling periodic billing or on-demand charges. Supports detailed transaction scheduling and UPI-specific notification flows. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/execute.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | Numeric
(1–10) | Unique identifier assigned to the subscription or mandate. | | orderid required | Alphanumeric
(10-200) | Unique order reference associated with the transaction. | | amount required | Numeric
(1–10) | Transaction amount to be executed under the mandate. | | notification_id optional | Alphanumeric | Required only in case of UPI transactions and after 5 minutes of mandate creation. | | execution_time required | Alphanumeric
(Date (dd/mm/yyyy)) | Scheduled execution date for the transaction or subscription debit. For UPI execution_time should current date. For eNACH execution_time should be greater than current date. | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Numeric | Unique identifier assigned to the merchant. | | orderid required | Alphanumeric
(`10-200`) | Unique order reference number for the transaction. | | ap_transactionid required | Numeric | Transaction ID assigned by the payment gateway. | | amount required | Numeric | Transaction amount. | | transaction_status required | Numeric | Status code representing the transaction result. | `211 = InProcess, 400 = Failed` | | transaction_payment_status required | String | Status text representing the payment state. | `INPROCESS, SUCCESS, FAILED` | | message required | String | Status message describing transaction result or reason. | | transaction_type required | String | Defines the type of transaction. | `sale, refund, mandate, etc.` | | transaction_time required | String
(`DateTime (dd-mm-yyyy HH:MM:SS)`) | Timestamp of the transaction event. | | customer_vpa optional | Alphanumeric | Required only in case of channel = UPI Customer's Virtual Payment Address (applicable for UPI). | --- --- title: Get Company Details description: Retrieve company details including company ID, name, domain, code and email using merchant ID and email. --- # Get Company Details This API will get the company details. We must pass merchant id and email id in request. If the request has valid details, we will get details like company id, company name, company domain, company code and company email etc. #### POST ``` https://kraken.airpay.co.in/airpay/ms/invoicepay/api/merchant-details ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Numeric | Need to pass the merchant id of company (length 1-11) | `1088` | | email_id required | Varchar | Need to pass the email_id of the company (length 1-50) | `xyz@company.com` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | result required | String | Result message
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | `success` | | data required | Varchar | Data contains
COMPANY_ID - Company id
COMPANY_NAME - Company name
COMPANY_DOMAIN - Company domain
COMPANY_CODE - Company code
COMPANY_EMAIL - Company email
AIRPAY_MERCHANT_ID - airpay merchant id
AIRPAY_USERNAME - airpay username
AIRPAY_PASSWORD - airpay Password
AIRPAY_SECRET_KEY - airpay secret key
EXPIRED_ON - Expired on is valid period for the invoice
EXPIRED_ON_OLD - Expired on old is valid period for the invoice
COMPANY_SECRET_TOKEN - Company secret token | ## Request Example ``` { "merchant_id": 1088, "email_id": "xyz@company.com" } ``` ### Success Response ``` HTTP/1.1 200 OK { "result":"success", "data": { "COMPANY_ID":"034", "COMPANY_NAME":"newcompany", "COMPANY_DOMAIN":"testcompany", "COMPANY_CODE":"123", "COMPANY_EMAIL":"xyz@sample.com", "AIRPAY_MERCHANT_ID":"1088", "AIRPAY_USERNAME":" 1234567", "AIRPAY_PASSWORD":" passABc", "AIRPAY_SECRET_KEY":" 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps", "EXPIRED_ON":"168", "EXPIRED_ON_OLD":"168", "COMPANY_SECRET_TOKEN":"91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps" } } ``` ### Error Response ``` HTTP/1.1 502 Not Found { "status": 502, "message": [] } ``` --- --- title: Get Payout Batches description: Retrieve all payout batches for a partner within a date range. --- # Get Payout Batches This API will return all the payout batches of all the partner. We will pass date range to get the payout details and no of rows in response then we will get status: success/error, payout details of the batch in terms of code, name, created date, transaction type count. get ``` http://kraken.airpay.co.in:8000/payout/partner/payout-batches ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NT` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | from_date required | Date | Payout batch created from date. (Y-m-d) | `2022-01-10` | | to_date required | Date | Payout batch created to date. (Y-m-d) | `2022-01-25` | | offset required | Numeric | Which row to start retrieve from | `0` | | limit required | Numeric
(1-25) | Number of rows in response. | `25` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Alphanumeric | success / error | `success` | | message required | Alphanumeric | Response description | `Payout batches` | | errors required | Array | Error messages if response status is 'error' | | data required | Array | Response data | | code required | Alphanumeric | Payout batch code | `2022JAN` | | name required | Alphanumeric | Batch name | `Affiliate Payout January 2022- Batch 2` | | created_datetime required | DateTime | Batch created date time (Y-m-d H:i:s) | `2022-02-12 20:48:14` | | transfers_count required | Numeric | Total number of transfers in the batch | `2` | | pending_transfers_count required | Numeric | Number of transfers waiting for airpay approval | `1` | | approved_transfers_count required | Numeric | Number of transfers approved by airpay | `1` | | processing_transfers_count required | Numeric | Number of transfers in process | `0` | | success_transfers_count required | Numeric | Number of successful transfers | `1` | | failure_transfers_count required | Numeric | Number of failed transfers | `1` | | rejected_transfers_count required | Numeric | Number transfers rejected by airpay | `0` | ## Request Example ``` HTTP get GET 'partner/payout-batches?offset=0&limit=25&from_date=2022-01-10&to_date=2022-01-25' ``` ### Success Response (Decrypted) ```json { "status": "success", "message": "Payout batches", "data": [ { "code": "2022JANP1", "name": "Affiliate Payout January 2022- Batch 2", "created_datetime": "2022-02-12 20:48:14", "transfers_count": 2, "pending_transfers_count": 1, "approved_transfers_count": 1, "processing_transfers_count": 1, "success_transfers_count": 0, "failure_transfers_count": 0, "rejected_transfers_count": 1 }, { "code": "2022JAN", "name": "Affiliate Payout January 2022", "created_datetime": "2022-02-07 05:46:12", "transfers_count": 2, "pending_transfers_count": 2, "approved_transfers_count": 0, "processing_transfers_count": 0, "success_transfers_count": 0, "failure_transfers_count": 0, "rejected_transfers_count": 0 } ] } ``` --- --- title: List Singlepager description: List all subdomains allocated to a specific merchant. --- # List Singlepager This API will list out all sub domains allocated to the specific merchant. We must pass airpay merchant id and secret key in request, we will get a success response and all the subdomains in terms of url. #### POST ``` https://kraken.airpay.co.in/airpay/ms/singlepager/api/list ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | airpay_merchant_id required | Numeric
(1-11) | Merchant Id | `1088` | | airpay_secret_key required | Alphanumeric
(1-100) | Merchant Secret Key | `91f5evhk72f56912508233b7r37562g2hps` | | checksum required | Alphanumeric
(1-100) | Checksum
hash_hmac('sha256',airpay_merchant_id + airpay_secret_key); | `91f5evhk72f56437r37562g2hps` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Result required | String | Result message
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is in process)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction is dropped in between)
Cancel - 402 (The transaction is cancelled)
Incomplete - 403 (The transaction is incomplete)
Bounced - 405 (Transaction is rejected from bank)
No Records - 503 (There are no records for this transaction) | `Success` | | SinglePager required | String | It will display url of the subdomain | `{ "Subdomains": [ "https://abc.nwpay.co.in", "https://def.nwpay.co.in",... ] }` | ## Request Example ```json { "airpay_merchant_id": 1088, "airpay_secret_key":"91f5evhk72f56912508233b7r37562g2hps", "checksum":"91f5evhk72f56437r37562g2hps" } ``` ### Success Response ```json HTTP/1.1 200 OK { "Result": "Success", "SinglePager": { "Subdomains": [ "https://abc.nwpay.co.in", "https://def.nwpay.co.in",... ] } } ``` ### Error Response ```json { "SinglePager": { "Errors": { "00": "Header Aunthentication Failed, Invalid Content-Type", "01": "Header Aunthentication Failed, airpay-Key Can Not Be Empty", "02": "Header Aunthentication Failed, Invalid airpay-Key", "05": "airpay Merchant Id Can Not Be Empty", "08": "airpay Secret Key Can Not Be Empty", "10": "Invalid Request", "11": "Checksum Can Not Be Empty", "12": "Wrong Checksum", "13": "airpay Merchant Id Does Not Exist", } }, "Result": "Fail" } ``` --- --- title: Seamless Transaction description: Process payments from the merchant's page without redirecting to airpay. --- # Seamless Transaction In seamless transaction, the user will be doing the payment from the merchant's page itself instead of being redirected to airpay's payment page for completing the payment. ![seamless transaction flow ](../../../../assets/seamless_txn.png) #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/seamless/?token= ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | orderid required | Alphanumeric
(1-30) | Merchant generated transaction id | `ORD1234` | | amount required | Numeric
(1-10 .2) | Amount with two decimals | `100.00` | | currency_code required | Numeric
(3) | Numeric currency code | `356` | | iso_currency required | String
(3) | ISO Currency code | `inr` | | buyer_email required | Email
(3-50) | Buyer Email | `customer@example.com` | | buyer_phone required | Numeric
(8-15) | Buyer Phone | `99999999` | | buyer_firstname required | Alphanumeric
(1-50) | Buyer First Name | `John` | | buyer_lastname required | Alphanumeric
(1-50) | Buyer Last Name | `Doe` | | buyer_address optional | Alphanumeric
(1-50) | Chapman, 711-2880 Nulla St.] Buyer Address | `Cecilia` | | buyer_city optional | Alphanumeric
(1-50) | Buyer City | `Mankato` | | buyer_state optional | Alphanumeric
(1-50) | Buyer State | `Mississippi` | | buyer_pincode optional | Alphanumeric
(4-8) | Buyer Pincode | `96522` | | buyer_country optional | Alphanumeric
(2-50) | Buyer Country | `USA` | | customvar optional | Alphanumeric|Space|Equal
(1-4096) | Any customized info affiliate can pass | | chmod optional | Chars | Payment Mode
pg - payment gateway
upi - UPI
Allowed values: `pg`, `upi` | `pg` | | txnsubtype optional | Numeric | Transaction SubType, type of transaction. Confirms the cardholder's ability to pay 3 - INR-Moto
When a customer makes a card payment over the phone or through mail order
Allowed values: `2`, `3` | `3` | | wallet optional | Numeric | Transaction Wallet Default - 0 1 – Load consumer Wallet 2 – Debit consumer wallet
Allowed values: `0`, `1{1}` | `0` | | card_number required | Numeric
(12-19) | Card Number/ or Token in case of tokenized transaction (required for pg and emi). | `6321***3123` | | card_cvv required | Numeric
(3-4) | Card CVV (required for pg and emi) | `123` | | expiry_mm required | Numeric
(2) | Card Card Expiry Month (required for pg and emi) | `12` | | expiry_yy required | Numeric
(2) | Card Expiry Year (required for pg and emi) | `25` | | savecard optional | Chars
(1) | Y – For saving card in tokenized format. | | token optional | Alphanumeric
(2-30) | Token (if token is enabled) | | uid optional | Alphanumeric
(1-32) | Unique user identifier from merchant If channel is "ppc" or "nb" or "EMI" | | sb_nextrundate optional | Date
(20) | Next subscription date (for enabling subscription) (for txnsubtype INR-SI) dd/mm/yyyy date must be current date+1 (t+1) | | sb_period optional | Char
(1) | Subscription period (for enabling subscription) (for txnsubtype INR-SI)
D - Day, W - Week, M - Month, Y - Year, A - Adhoc| D | sb_frequency optional | Numeric
(1-3) | Subscription frequency (for enabling subscription) (for txnsubtype INR-SI) | | sb_amount optional | Numeric
(1-10 .2) | Subscription amount (for enabling subscription) (for txnsubtype INR-SI) | | sb_isrecurring optional | Numeric
(1) | Is subscription recurring (for enabling subscription) (for txnsubtype INR-SI) (`1` / `0`) | `1` | | sb_recurringcount optional | Numeric
(1-3) | Subscription Recurring Count (for enabling subscription and Is Subscription Recurring is Yes , if recurring count is 999 than subscription is set as never ending end date its apply only for enach transaction) (for txnsubtype INR-SI) | | sb_retryattempts optional | Numeric
(1) | Subscription retry attempts (for enabling subscription) (for txnsubtype INR-SI) | | sb_maxamount optional | Numeric
(1-10 .2) | Maximum amount can char (for txnsubtype INR-SI) | | utility_biller_name optional | Alphanumeric
(2-50) | The Utility Biller Name parameter shall be mandatory for transactions with the following Merchant Category Codes (MCCs):
4900, 6012, 6051, 6300, 6513, 8011, 8050, 8062, 8099, 8111, 8211, 8220, 8241, 8244, 8249, 8299, 8351, 9311. | | channel required | Alphaumeric | Payment Type
pg - pg
upi - UPI
Allowed values: `pg`, `upi{1-12}` | `pg` | | mer_dom required | Alphanumeric | Base64 encoded merchant domain. | `aHR0cDovL2xvY2FsaG9zdA==` | | domain_url optional | Alphanumeric
(1-90) | Domain URL. | `http://localhost` | | bank_code optional | Alphanumeric
(1-20) | Bank Code | | cash_pincode required | Numeric | Pin code for cash payment (required only for cash) | `680192` | | customer_vpa required | Alphanumeric
(1-25) | Customer Virtual Payment Address (required in UPI) | `test@okhdfcbank` | | upi_tpv_account optional | Numeric
(12-18) | Bank Account number passed within this parameter will be used for restricting the Payments accepted to the UPI Account linked with mentioned bank account number. Any other Bank account used to complete the UPI transaction will be rejected. Please contact the airpay support team to enable this. | | upi_tpv_ifsc optional | Alphanumeric
(1-11) | The IFSC code of the UPI TPV account number is mandatory if the upi_tpv_account is being activated. | | customer_consent required | chars
(1) | Consent flag to be sent by Merchant.
Allowed values: `Y`, `N` | `Y` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | ap_transactionid required | Numeric | airpay transaction reference number | `11314` | | transaction_payment_status required | Alphanumeric | Transaction payment status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS | `SUCCESS` | | merchant_id required | Numeric | Merchant ID | `123356` | | orderid required | Alphanumeric | orderid you have send to airpay system | `ORDER123456` | | txn_mode optional | Alphanumeric | Transaction mode LIVE or Sandbox | `LIVE` | | chmod required | Alphanumeric | Channel of Payment done | `pg` | | amount required | Numeric | Transaction amount | `100.00` | | currency_code optional | Numeric | Payment Currency | `356` | | transaction_status required | Numeric | Transaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found | `200` | | message required | Alphanumeric | Response message received from payment gateway | `Success` | | customer_name optional | Alphanumeric | Customer Name | `John Doe` | | customer_phone optional | Alphanumeric | Customer Phone | `987654321` | | customer_email optional | Email | Customer Email | `customer@example.com` | | transaction_type optional | Numeric | Transaction Type
Mandate approved, Auth - 310
Sale - 320
Capture - 330
Refund - 340
Chargeback - 350
Reversal - 360
SaleComplete - 370
SaleAdjust - 380
TipAdjust - 390
Sale+Cash - 400
Cashback - 410
Void - 420
Release - 430
Cashwithdrawal - 440 | `320` | | risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | `0` | | billed_amount optional | Numeric | Includes total amount of bill amount with two decimals | `110.00` | | token optional | Alphanumeric | Token string | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` | | transaction_time optional | Date | Transaction Time | `30-11-2023 12:32:59` | | card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | | card_unique_code optional | Alphanumeric | Card unique Code, this field is available in pg | `c237b1ba20f5f6cbe32f47e6db1d1d53` | | bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | `AXIS BANK` | | card_country optional | Alphanumeric | Card issued country, this field is available in pg | `IND` | | card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | `cc` | | bank_response_msg optional | Alphanumeric | Response message from the bank | `Success` | | reason optional | Alphanumeric | Failed Reason | `Fund` | | ap_SecureHash required | Alphanumeric | Secure hash generated by airpay ``` Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); ``` | `1490948220` | | custom_var optional | Alphanumeric
(`1-120`) | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in ***custom_var*** separated by the '|' symbol. | `1234567|test|ABC1234` | | subscription_id optional | Alphanumeric | Subscription ID, if subscription transaction | | subscription_next_rundate optional | Alphanumeric | subscription next run date, if subscription transaction | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['buyer_email'] = 'customer@example.com'; $data['buyer_phone'] = '99999999'; $data['buyer_firstname'] = 'John'; $data['buyer_lastname'] = 'Doe'; $data['buyer_address'] = 'Cecilia Chapman, 711-2880 Nulla St.'; $data['buyer_city'] = 'Mankato'; $data['buyer_state'] = 'Mississippi'; $data['buyer_country'] = 'USA'; $data['buyer_pincode'] = '96522'; $data['orderid'] = 'ORD123456'; $data['amount'] = '10.00'; $data['channel'] = 'pg'; $data['bank_code'] = 'XYZ'; $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/seamless/?token=', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; ?> ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code":"200", "status":"success", "response_code":"00", "message":"Success", "data": { "transaction_payment_status":"SUCCESS", "merchant_id":"123356", "orderid":"ORDER123456", "ap_transactionid":"11314", "txn_mode":"LIVE", "chmod":"pg", "amount":"100.00", "currency_code":"356", "transaction_status":200, "message":"Success", "bank_response_msg":"Success", "customer_name":"John Doe", "customer_phone":"987654321", "customer_email":"customer@example.com", "transaction_type":320, "risk":"0", "customvar":"0", "token":"", "uid":"U123", "transaction_time":"30-11-2023 12:32:59", "surcharge_amount":"51.41", "card_scheme": "visa" "card_number": "462294XXXXXX3713" "bank_name": "anz bank" "card_country": "australia" "card_type": "Credit" "token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk" "ap_SecureHash":"1490948220" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: Skipping a Cycle description: Skip the next recurring subscription cycle. --- # Skipping a Cycle This API will be used by merchant to skip only next recurring subscription. We must pass merchant id, subscription id and action: "S" for skipping next recurring in request. If the request has valid details, we will get a success response as "Subscription updated successfully". #### POST ``` https://kraken.airpay.co.in/airpay/api/updatesubscription.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number | Merchant Identification Number | `11111` | | subscription_id required | Number | airpay Subscription Id | `1000001` | | action required | String | Request Type
"S"- Skipping next recurring | `S` | | checksum required | Alphanumeric
(10-200) | Checksum
privatekey = hash('sha256', secret.'@'.username.':|:'.password)
Hash generated by: hash_hmac('sha256', subscription_id+private_key+merchant_id+action, )
Note: Use the same secret key, username and password provided on payment kit to generate private key | `49485184de39db56dad9b9e0aa6e6a29` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status value will pass as per the condition | `200,533` | | message required | String | Status message value will pass as per the condition | `Subscription updated successfully,Error in unsubscription` | ## Request Example (JSON) ```json { "merchant_id" : "11111", "subscription_id" :"1000001", "action" : "S", "sb_date" : "12-12-2023", "checksum" : "49485184de39db56dad9b9e0aa6e6a29" } ``` ## Request Example (XML) ```xml ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", } ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "status" : "400", "message" : "Charge not possible on this Date.", } ``` ### Success Response (XML) ```xml HTTP/1.1 200 OK 200 Subscription updated successfully. ``` ### Error Response (XML) ```xml HTTP/1.1 200 OK 400 Charge not possible on this Date. ``` ### Status List ``` 200 - Subscription updated successfully 533 - Error in unsubscription 603 - Subscription is in Unsubscribed state 604 - Amount should not be greater than 605 - Amount should be greater than or equal to 1 619 - Subscription id is invalid 620 - Subscription request was not accepted 621 - Subscription action is invalid 622 - Subscription is already set one skip recurring 623 - Error in update amount subscription 624 - Subscription is already in Subscribed state 625 - Subscription is already in Paused state 626 - No future recurring subscription 627 - Error in pausing subscription 628 - Error in resuming subscription ``` --- --- title: Add Bank To VA description: Assign a bank account to a specific virtual account. --- # Add Bank To VA Bank details of a merchant are assigned to an airpay virtual account so that we only accept payments transferred from this bank account else will not be accepted being an unverified source. This API will Add/Assign bank account shared by the merchant to a specific virtual account of airpay if we pass merchant id, virtual account no, UID, bank name, account number and ifsc code correctly. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - add_bank | `add_bank` | | private_key required | Alphanumeric
(10-200) | Private Key (required)
privatekey = hash('sha256', secret.'@'.username.':|:'.password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | bank_name required | Varchar | Bank name | `SC` | | account_number required | Numeric | Bank account number | `6546797546469` | | ifsc_code required | Alphanumeric | Bank IFSC code | `SC544646464` | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.bank_name.account_number.ifsc_code.UID.action.merchant_id.private_key) | `87605eeab56e404bfc410478a15ae3df319723c7` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code Success - 200
Failed - 400 | `200,400` | | MESSAGE required | String | Status Message
Success - 200
Transaction in Process - 211
Failed - 400
Dropped - 401
Cancel - 402
Incomplete - 403
Bounced - 405
No Records - 503
Virtual account is invalid - 526 | `success,fail` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=add_bank' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'virtual_account_number=2293640000000010242' \ --form 'bank_name=SC' \ --form 'account_number=6546797546469' \ --form 'ifsc_code=SC544646464' \ --form 'checksum=87605eeab56e404bfc410478a15ae3df319723c7' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success" } ``` ### Error Response ```json HTTP/1.1 200 OK { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Get Token API description: Retrieve the token associated with a wallet user for use in the merchant application. --- # Get Token API This API retrieves the token associated with a user for use in the merchant application. It requires merchant ID, private key, buyer's email, buyer phone, and optional UID. A successful request returns the transaction status, token, and user details. #### POST ``` https://kraken.airpay.co.in/airpay/wallet/api/walletGetToken.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number
(1-20) | Merchant ID | `18999` | | private_key required | String
(10-200) | Private Key, generated as hash('sha256', secret.'@'.username.':|:'.password) | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | buyer_email required | String
(6-50) | Email of wallet user | `aatest12@gmail.com` | | buyer_phone required | String
(10-15) | Mobile number of the wallet user (numeric, spaces, or hyphens allowed) | `9234337892` | | UID optional | String | Merchant-generated Unique User ID (optional) | `1234` | | outputFormat optional | String
(1-3) | Response format: json or xml (default: xml) | `xml` | | checksum required | String
(10-100) | MD5 hash: md5(merchant_id.buyer_email.buyer_phone.UID.date('Y-m-d').private_key) | `72ce8cfbb1347905c34e121336bb3d09` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | | MESSAGE required | String | Response message from the payment gateway (e.g., "Successful", "Invalid checksum") | | CHMOD required | String | Transaction channel mode (always "wallet") | `wallet` | | MERCHANTID required | String | Merchant ID | `18999` | | CUSTOMEREMAIL required | String | Email of the wallet user | | CUSTOMERPHONE required | String | Mobile number of the wallet user | | TOKEN required | String | Token associated with the wallet user | ## Request Example ``` curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletGetToken.php' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'merchant_id=18999' \ --data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'buyer_email=aatest12@gmail.com' \ --data-urlencode 'buyer_phone=9234337892' \ --data-urlencode 'UID=1234' \ --data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09' ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "CHMOD": "wallet", "MERCHANTID": "18999", "CUSTOMEREMAIL": "aatest12@gmail.com", "CUSTOMERPHONE": "9234337892", "TOKEN": "53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5" } } ``` ### Success Response (XML) ```xml 200 Successful wallet 18999 aatest12@gmail.com 9234337892 53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5 ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" } } ``` ### Error Response (XML) ```xml 400 Invalid checksum ``` --- --- title: Notify API description: Send advance notifications for upcoming subscription or mandate debits. --- # Notify API Send advance notifications for upcoming subscription or mandate debits. Ensures customers remain informed about recurring charges, enhancing transparency and reducing the risk of failed payments. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/notify.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | Numeric
(1–10) | Unique identifier assigned to the subscription or mandate. | | notification_id required | Alphanumeric | Unique order reference associated with the transaction. | | amount required | Numeric
(1–10) | Transaction amount to be executed under the mandate. | | execution_times required | Alphanumeric
(Date (dd/mm/yyyy)) | Scheduled execution date for the transaction or subscription debit. | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Numeric | Unique identifier assigned to the merchant. | | orderid required | Alphanumeric
(`10-200`) | Unique order reference number for the transaction. | | ap_transactionid required | Numeric | Transaction ID assigned by the payment gateway. | | amount required | Numeric | Transaction amount. | | status_code required | Numeric | Status code representing the transaction result. | `211 = InProcess, 400 = Failed` | | notification_status required | String | Status text representing the payment state. | `INPROCESS, SUCCESS, FAILED` | | message required | String | Status message describing transaction result or reason. | --- --- title: Embedded Transaction description: Allow customers to select payment options on the merchant's page directly. --- # Embedded Transaction In embedded (directindex) transactions, the user will be selecting the payment option on the merchant's page itself instead of being redirected to AirPay's payment page for completing the payment. #### POST ``` https://payments.airpay.co.in/pay/v4/embedded/?token= ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | orderid required | Alphanumeric
(1-30) | Merchant generated transaction id | `ORD1234` | | amount required | Numeric
(1-10 .2) | Amount with two decimals | `100.00` | | currency_code required | Numeric
(3) | Numeric currency code | `356` | | iso_currency required | String
(3) | ISO Currency code | `inr` | | buyer_email required | Email
(3-50) | Buyer Email | `customer@example.com` | | buyer_phone required | Numeric
(8-15) | Buyer Phone | `99999999` | | buyer_firstname required | Alphanumeric
(1-50) | Buyer First Name | `John` | | buyer_lastname required | Alphanumeric
(1-50) | Buyer Last Name | `Doe` | | buyer_address optional | Alphanumeric
(1-50) | Chapman, 711-2880 Nulla St.] Buyer Address | `Cecilia` | | buyer_city optional | Alphanumeric
(1-50) | Buyer City | `Mankato` | | buyer_state optional | Alphanumeric
(1-50) | Buyer State | `Mississippi` | | buyer_pincode optional | Alphanumeric
(4-8) | Buyer Pincode | `96522` | | buyer_country optional | Alphanumeric
(2-50) | Buyer Country | `USA` | | customvar optional | Alphanumeric|Space|Equal
(1-4096) | Any additional information that an affiliate can pass for tracking or custom processing. | `1234567|test|ABC1234` | | chmod optional | Chars | Payment Mode
ppc - prepaid card
pg - payment gateway
nb - Netbanking
pgcc - Credit card
pgdc - Debit card
cash - Cash
emi - EMI
rtgs - RTGS
upi - UPI
btqr - Bharat QR
payltr - Pay later
va - Virtual account
enach - eNACH
remit - Remittance
Allowed values: `pg`, `ppc`, `nb`, `pgcc`, `pgdc`, `cash`, `emi`, `rtgs`, `upi`, `btqr`, `payltr`, `va`, `enach`, `remit` | `pg` | | txnsubtype optional | Numeric | Transaction SubType, type of transaction.
Allowed values: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `36`, `74`, `75`, `76`, `77` | `2` | | wallet optional | Numeric | Transaction Wallet Default - 0 1 – Load consumer Wallet 2 – Debit consumer wallet
Allowed values: `0`, `1{1}` | `0` | | utility_biller_name optional | Alphanumeric
(2-50) | The Utility Biller Name parameter shall be mandatory for transactions with the following Merchant Category Codes (MCCs):
4900, 6012, 6051, 6300, 6513, 8011, 8050, 8062, 8099, 8111, 8211, 8220, 8241, 8244, 8249, 8299, 8351, 9311. | | channel required | Alphaumeric | Payment Type
pg - pg
nb - net banking
ppc - Wallet(ppc)
rtgs - RTGS
emi - EMI
upi - UPI
cash - cash
virtual-acc - Virtual Account
Allowed values: `pg`, `nb`, `ppc`, `rtgs`, `emi`, `upi`, `cash`, `virtual-acc{2-11}` | `pg` | | uid optional | Alphanumeric
(1-32) | Unique user identifier from merchant | | utr required | Alphanumeric
(16-22) | Unique Transaction Reference No
If channel is "rtgs" | `3213213124` | | customer_vpa required | Alphanumeric
(1-25) | Customer Virtual Payment Address (required in UPI) | `test@okhdfcbank` | | walletflg required | Chars
(1) | If the payment is wallet (Y, N) | `N` | | billed_amount optional | Numeric
(1-10 .2) | billed amount with two decimals | | surcharge_amount optional | Numeric
(1-10 .2) | Surcharge amount of this transaction (sending only if applicable) | | token optional | Alphanumeric
(2-30) | Token (if token is enabled) | | token_expiry optional | String
(2-30) | Token Expiry (if token is enabled) | | token_cryptogram optional | String | Cryptogram generated by token requestor. Only in case of channel is pg | | mer_dom optional | Alphanumeric | Base64 encoded merchant domain. | `aHR0cDovL2xvY2FsaG9zdA==` | | bank_code optional | Alphanumeric
(1-20) | Bank Code. If channel is "ppc" or "nb" or "EMI" | | emitenure optional | Numeric
(2) | EMI Tenure
If channel is "emi" | | card_number required | Numeric
(12-19) | Card Number/ or Token in case of tokenized transaction (required for pg and emi). | `6321***3123` | | card_cvv required | Numeric
(3-4) | Card CVV (required for pg and emi) | `123` | | card_scheme optional | String
(1-50) | Card scheme (rupay,visa,mastercard etc…) | | savecard optional | Chars
(1) | Y – For saving card in tokenized format. | | card_uniquecode optional | Alphaumeric
(3-64) | Card unique code: If the channel is "pg", either card_uniquecode or card details must not be empty | | expiry_mm required | Numeric
(2) | Card Card Expiry Month (required for pg and emi) | | expiry_yy required | Numeric
(2) | Card Expiry Year (required for pg and emi) | | sb_nextrundate optional | Date
(103) | Next subscription date (for enabling subscription)(for txnsubtype INR-SI) dd/mm/yyyy date must be current date+1 (t+1) | | sb_period optional | Chars
(1) | Subscription period (for enabling subscription) (for txnsubtype INR-SI)
D - Day, W - Week, M - Month, Y - Year, A - Adhoc| D | sb_frequency optional | Numeric
(1-3) | Subscription frequency (for enabling subscription) (for txnsubtype INR-SI) | | sb_amount optional | Numeric
(1-10 .2) | Subscription amount (for enabling subscription) (for txnsubtype INR-SI) | | sb_isrecurring optional | Numeric
(1) | Is subscription recurring (for enabling subscription) (for txnsubtype INR-SI) (`1` / `0`) | `1` | | sb_recurringcount optional | Numeric
(1-3) | Subscription Recurring Count (for enabling subscription and Is Subscription Recurring is Yes , if recurring count is 999 than subscription is set as never ending end date its apply only for enach transaction) (for txnsubtype INR-SI) | | sb_retryattempts optional | Numeric
(1) | Subscription retry attempts ( for enabling subscription) (for txnsubtype INR-SI) | | sb_maxamount optional | Numeric
(1-10 .2) | Maximum amount can char (for txnsubtype INR-SI) | | upi_tpv_account optional | Numeric
(12-18) | Bank Account number passed within this parameter will be used for restricting the Payments accepted to the UPI Account linked with mentioned bank account number. Any other Bank account used to complete the UPI transaction will be rejected. Please contact the airpay support team to enable this. | | upi_tpv_ifsc optional | Alphanumeric
(1-11) | The IFSC code of the UPI TPV account number is mandatory if the upi_tpv_account is being activated. | | customer_consent required | chars
(1) | Consent flag to be sent by Merchant.
Allowed values: `Y`, `N` | `Y` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | ap_transactionid required | Numeric | airpay transaction reference number | `11314` | | transaction_payment_status required | Alphanumeric | Transaction payment status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS | `SUCCESS` | | merchant_id required | Numeric | Merchant ID | `123356` | | orderid required | Alphanumeric | orderid you have send to airpay system | `ORDER123456` | | txn_mode optional | Alphanumeric | Transaction mode LIVE or Sandbox | `LIVE` | | chmod required | Alphanumeric | Channel of Payment done | `pg` | | amount required | Numeric | Transaction amount | `100.00` | | currency_code optional | Numeric | Payment Currency | `356` | | transaction_status required | Numeric | Transaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found | `200` | | message required | Alphanumeric | Response message received from payment gateway | `Success` | | customer_name optional | Alphanumeric | Customer Name | `John Doe` | | customer_phone optional | Alphanumeric | Customer Phone | `987654321` | | customer_email optional | Email | Customer Email | `customer@example.com` | | transaction_type optional | Numeric | Transaction Type | `320` | | risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | `0` | | billed_amount optional | Numeric | Includes total amount of bill amount with two decimals | `110.00` | | token optional | Alphanumeric | Token string | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` | | transaction_time optional | Date | Transaction Time | `30-11-2023 12:32:59` | | ap_SecureHash required | Alphanumeric | Secure hash generated by airpay | `1490948220` | | custom_var optional | Alphanumeric
(`1-120`) | Any information passed in the request, which can be received in the response exactly as it was sent. | `1234567|test|ABC1234` | | subscription_id optional | Alphanumeric | Subscription ID, if subscription transaction | | subscription_next_rundate optional | Alphanumeric | subscription next run date, if subscription transaction | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['buyer_email'] = 'customer@example.com'; $data['buyer_phone'] = '99999999'; $data['buyer_firstname'] = 'John'; $data['buyer_lastname'] = 'Doe'; $data['buyer_address'] = 'Cecilia Chapman, 711-2880 Nulla St.'; $data['buyer_city'] = 'Mankato'; $data['buyer_state'] = 'Mississippi'; $data['buyer_country'] = 'USA'; $data['buyer_pincode'] = '96522'; $data['orderid'] = 'ORD123456'; $data['amount'] = '10.00'; $data['channel'] = 'pg'; $data['bank_code'] = 'XYZ'; $data['currency_code'] = '356'; $data['iso_currency'] = 'inr'; $privatekey = hash('sha256', $secret . '@' . $username . ':|:' . $password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); ?> airpay
Do Not Refresh or Press Back
Redirecting to airpay
``` ### Success Response ```json HTTP/1.1 200 OK { "status_code":"200", "status":"success", "response_code":"00", "message":"Success", "data": { "transaction_payment_status":"SUCCESS", "merchant_id":"123356", "orderid":"ORDER123456", "ap_transactionid":"11314", "txn_mode":"LIVE", "chmod":"pg", "amount":"100.00", "currency_code":"356", "transaction_status":200, "message":"Success", "bank_response_msg":"Success", "customer_name":"John Doe", "customer_phone":"987654321", "customer_email":"customer@example.com", "transaction_type":320, "risk":"0", "customvar":"0", "token":"", "uid":"U123", "transaction_time":"30-11-2023 12:32:59", "surcharge_amount":"51.41", "card_scheme": "visa" "card_number": "462294XXXXXX3713" "card_uniquecode": "SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi" "bank_name": "anz bank" "card_country": "australia" "card_type": "Credit" "token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk" "ap_SecureHash":"1490948220" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: Create Invoice description: Create an invoice for a customer to accept payment, returning an invoice number and payment URL. --- # Create Invoice This API will create an invoice for the customer in order to accept the payment. We must pass data containing the complete details of invoice and customer in request. If the request has valid details, we will get an invoice number and payment url for the transaction. #### POST ``` https://kraken.airpay.co.in/airpay/ms/invoicepay/api/create ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | data required | Json|Xml | Data value can be passed in json or xml.The data should be in this format only.This contains the complete details of invoice and customer. (required) | | token required | String | Unique token need to be passed by every company (length 1-150) Calculated by md5(access-token . '~' . json_encode(data)); access-token : Provided by airpay data data : parameter passed in the request | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` | | format required | String | Mention the format of data param in the api (length 1-7)
Eg. Json or xml | `json` | | expiry_date required | Date | Set the expiry date of invoice
Eg. 2022-08-15 19:57:23 (Year-Month-Day Hour:Minute:Second) | `2022-08-15 19:57:23` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | success required | Alphanumeric | Success or not
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | `200` | | invoice_number required | Numeric | Invoice number | `1234745234245` | | payment_url required | String | Payment url | `https://abc.invpay.co.in/invoice/OSYzMjc1NQ==` | ## Request Example ``` { token: "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps", data: { "MERCHANT_ID":1088, "INVOICE_NUMBER":"1234745234245", "TOTAL_AMOUNT":14.0, "MODE":"pgdc", "customer": { "FIRST_NAME":"Vikasvijesh", "LAST_NAME":"", "EMAIL":"newcompany@xyz.com", "PHONE":"9XXXXXX433", "CITY":"Delhi ", "STATE":"Delhi ", "COUNTRY":"India", "PINCODE":"110001", "ADDRESS":null }, "invoice_item": { "ITEM_NAME":"Loan Repayment", "ITEM_DESCRIPTION":"", "ITEM_PRICE":14.0, "ITEM_QUANTITY":1, "ITEM_TAX":0.0, "ITEM_IMAGE":"" }, "CHARGE":, "SEND_REQUEST": { "EMAIL":false, "SMS":true }, "CUSTOM_DATA": { "my_custome_field":"abc1234" } }, format: "json", expiry_date: "2022-08-15 19:57:23" } ``` ### Success Response ``` HTTP/1.1 200 OK { "success": true, "invoice_number": "1234745234245", "payment_url": "https://abc.invpay.co.in/invoice/OSYzMjc1NQ==" } ``` ### Error Response ``` HTTP/1.1 502 Not Found { "status": 502, "message": [] } ``` --- --- title: Get Payout Batch description: Get details of a specific payout batch including transfer statuses. --- # Get Payout Batch This API is used by merchant to get the details of a payout batch with the status of each payout request in the batch. We will get response with the details of the amount, payee details, bank details and status of the transaction. get ``` http://kraken.airpay.co.in:8000/payout/partner/payout-batches/{batchCode} ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NT` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Alphanumeric | success / error | `success` | | message required | Alphanumeric | Response description | | errors required | Array | Error messages if response status is 'error' | | data required | Array | Response data | | code required | Alphanumeric | Payout batch code | `2022JAN` | | created_datetime required | DateTime | Batch created date time (Y-m-d H:i:s) | | transfers required | Array | Transfer data block | | transfer_number required | Alphanumeric | Unique id of the transfer in the batch | `10` | | UID required | Alphanumeric | Custom variable from partner | `USER1` | | amount required | Numeric | Transfer Amount | | payee_name required | Alphanumeric | Name of the payee | `John Brown` | | payee_mobile required | Numeric | Mobile number of the payee | `9846030201` | | currency required | Alphanumeric | Currency code | `INR` | | partner_bank_id required | Numeric | Partner bank account id | `111` | | bank_name required | Alphanumeric | Beneficiary bank name | `SBI` | | bank_account_type required | Alphanumeric | savings / current | `savings` | | bank_account_number required | Alphanumeric | Beneficiary bank account number | `560002379833` | | bank_ifsc required | Alphanumeric | Beneficiary bank IFSC code | `SBIN0016387` | | transfer_datetime required | DateTime | Transfer date and time (Y-m-d H:i:s) | `null` | | utr_number required | Alphanumeric | UTR / RRN number | `null` | | fees required | Numeric | Transfer charge (If transfer status is SUCCESS) | `0` | ## Request Example ``` HTTP get GET 'partner/payout-batches{batchCode}' ``` ### Success Response (Decrypted) ```json { "status": "success", "message": "Payout batch", "data": { "code": "2022JAN", "name": "Affiliate Payout Batch of January 2022", "created_datetime": "2022-02-12 20:03:33", "transfers": [ { "transfer_number": "10", "UID": "USER1", "amount": 500, "payee_name": "John Brown", "payee_mobile": "9846030201", "currency": "INR", "partner_bank_id": "111", "bank_name": "SBI", "bank_account_type": "savings", "bank_account_number": "560002379833", "bank_ifsc": "SBIN0016387", "status": "PENDING", "transfer_mode": "NEFT", "transfer_datetime": null, "utr_number": null, "fees": 0 } ] } } ``` --- --- title: Upload description: Upload a merchant logo for the merchant's assigned payment domain. --- # Upload This API will update merchant's logo in merchant's assigned domain. We must pass image, airpay merchant id, secret key and image type in request. If the request has valid details, we will get a success response. #### POST ``` https://kraken.airpay.co.in/airpay/ms/singlepager/api/upload ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | image required | File | File Input (length 2MB) | `image.png` | | checksum required | Alphanumeric
(1-100) | Checksum | `91f5evhk72f56432ec8233b7r37562g2hps` | | airpay_merchant_id required | Numeric
(1-11) | airpay Merchant Id | `1088` | | airpay_secret_key required | Alphanumeric
(1-100) | airpay Secret Key | `91f5evhk72f56912508233b7r37562g2hps` | | image_type required | Alphanumeric
(1-20) | Type of the image in png/jpeg/jpg format | `png` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Result required | Text | Message
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | `Success` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/singlepager/api/upload' \ --header 'content-type: application/json' \ --header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --form 'image=image.png' \ --form 'checksum=91f5evhk72f56432ec8233b7r37562g2hps' \ --form 'airpay_merchant_id=1088' \ --form 'airpay_secret_key=91f5evhk72f56912508233b7r37562g2hps' \ --form 'image_type=1-label' ``` ```json { array(1) { ["image"]=> array(5) { ["name"]=> string(32) "Policy Renewal Screen Shot 1.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(14) "/tmp/phpKtSD6g" ["error"]=> int(0) ["size"]=> int(123047) } } } ``` ### Success Response ```json HTTP/1.1 200 OK { "Result": "Success" } ``` ### Error Response ```json { "SinglePager": { "Errors": { "11": "Checksum Can Not Be Empty", "12": "Wrong Checksum", "16": "A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. Introduced in PHP 5.2.0.", "17": "No File Uploaded", "18": "The uploaded file exceeds the upload_max_filesize directive in php.ini.", "19": "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", "20": "The uploaded file was only partially uploaded.", "21": "No file was uploaded.", "22": "Missing a temporary folder. Introduced in PHP 5.0.3.", "23": "Failed to write file to disk. Introduced in PHP 5.1.0.", "24": "A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. Introduced in PHP 5.2.0.", "32": "File is not an image.", "34": "Invalid File Format.", "37": "There was an error uploading your file.", "40": "Image Type Can Not Be Empty", "41": "Invalid Image Type", "42": "Invalid Data Supplied", "00": "Header Aunthentication Failed, Invalid Content-Type", "01": "Header Aunthentication Failed, airpay-Key Can Not Be Empty", "02": "Header Aunthentication Failed, Invalid airpay-Key", "05": "airpay Merchant Id Can Not Be Empty", "08": "airpay Secret Key Can Not Be Empty", "04": "Subdomain Can Not Be Empty" } }, "Result": "Fail" } ``` --- --- title: Update the Amount description: Update the subscription amount for the next recurring charge. --- # Update the Amount This API will be used by merchant to update the subscription amount to next recurring charge. We must pass merchant id, subscription id, sb amount and action as "A"- Amount update in request. If the request has valid details, we will get a success response as "Subscription updated successfully.". #### POST ``` https://kraken.airpay.co.in/airpay/api/updatesubscription.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number | Merchant Identification Number | `11111` | | subscription_id required | Number | airpay Subscription Id | `1000001` | | sb_amount required | Number | Amount | `2000.1006214700` | | action required | String | Action
"A"- Amount update | `A` | | checksum required | Alphanumeric
(10-200) | Checksum
privatekey = hash('sha256', secret.'@'.username.':|:'.password)
Hash generated by: hash_hmac('sha256', subscription_id+private_key+merchant_id+action+sb_amount, )
Note: Use the same secret key, username and password provided on payment kit to generate private key | `2e6cf436576f49276315b02c9fb02e75` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status value will pass as per the condition | `200,533` | | message required | String | Status message value will pass as per the condition | `Subscription updated successfully,Error in unsubscription` | ## Request Example (JSON) ```json { "merchant_id" : "11111", "subscription_id" : "1000001", "sb_amount": "2000.00", "action" : "A", "checksum" : "2e6cf436576f49276315b02c9fb02e75" } ``` ## Request Example (XML) ```xml ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", } ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "status" : "400", "message" : "Charge not possible on this Date.", } ``` ### Success Response (XML) ```xml HTTP/1.1 200 OK 200 Subscription updated successfully. ``` ### Error Response (XML) ```xml HTTP/1.1 200 OK 400 Charge not possible on this Date. ``` ### Status List ``` 200 - Subscription updated successfully 533 - Error in unsubscription 603 - Subscription is in Unsubscribed state 604 - Amount should not be greater than 605 - Amount should be greater than or equal to 1 619 - Subscription id is invalid 620 - Subscription request was not accepted 621 - Subscription action is invalid 622 - Subscription is already set one skip recurring 623 - Error in update amount subscription 624 - Subscription is already in Subscribed state 625 - Subscription is already in Paused state 626 - No future recurring subscription 627 - Error in pausing subscription 628 - Error in resuming subscription ``` --- --- title: Edit Bank To VA description: Edit bank account details assigned to a specific virtual account. --- # Edit Bank To VA This API will Edit bank account details shared by the merchant assigned to a specific virtual account of airpay if we pass merchant id, virtual account no, UID, bank name, account number and ifsc code correctly. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - edit_bank | `edit_bank` | | private_key required | Alphanumeric | Private Key (length 10-200)
hash('sha256', @secretkey:username|:password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | bank_name required | Varchar | Bank name | `SC` | | account_number required | Numeric | Bank account number | `6546797546469` | | ifsc_code required | Alphanumeric | Bank IFSC code | `SC544646464` | | bank_id required | Number | Bank Id from airpay on the time of merchant onboarding | `8` | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.bank_name.account_number.ifsc_code.bank_id.UID.action.merchant_id.private_key) | `5f593008470bfdcbb0f9c518d79af129bb6fa712` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code Success - 200
Failed - 400 | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
Bank account already added - 527 | `success,fail` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=edit_bank' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'virtual_account_number=2293640000000010242' \ --form 'bank_name=SC' \ --form 'account_number=6546797546469' \ --form 'ifsc_code=SC544646464' \ --form 'bank_id=8' \ --form 'checksum=5f593008470bfdcbb0f9c518d79af129bb6fa712' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success" } ``` ### Error Response ```json HTTP/1.1 200 OK { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Wallet Transactions description: Perform manual wallet debit or credit transactions. --- # Wallet Transactions This API is used for manual wallet transactions (debit or credit). It requires transaction mode, merchant ID, token, private key, wallet user, order ID, amount, channel, payee identifier, merchant domain, output format, and checksum. A successful request returns the transaction status, merchant ID, username, and wallet balance. #### POST ``` https://kraken.airpay.co.in/airpay/wallet/api/walletTxn.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | txn_mode required | String
(1-10) | Transaction mode: "debit" or "credit" | `debit` | | merchant_id required | Number
(1-20) | Merchant ID | `18999` | | token required | String
(10-200) | Token generated during wallet creation | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | private_key required | String
(10-200) | Private Key, generated as hash('sha256', secret.'@'.username.':|:'.password) | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | wallet_user required | String
(6-50) | Email, mobile number, or UID of the wallet user | `aatest12@gmail.com` | | order_id required | Number
(1-20) | Merchant-generated order ID | `12312312` | | amount required | Number
(1-12) | Amount to be transacted | `100` | | channel required | String | Payment channel: "upi" or "mpesa" | `upi` | | payee_identifier required | String
(10-15) | Mobile number for mPesa or VPA for UPI | `98776x3123` | | mer_dom required | String
(10-64) | Base64-encoded, URL-encoded registered domain URL | `aHR0cDovL2xvY2FsaG9zdA==` | | outputFormat optional | String
(1-3) | Response format: json or xml (default: xml) | `xml` | | checksum required | String | MD5 hash: md5(merchant_id.token.wallet_user.txn_mode.order_id.amount.date('Y-m-d').private_key) | `72ce8cfbb1347905c34e121336bb3d09` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | | MESSAGE required | String | Response message from the payment gateway (e.g., "Successful", "Invalid checksum") | | CHMOD required | String | Transaction channel mode (always "wallet") | `wallet` | | MERCHANTID required | String | Merchant ID | `18999` | | USERNAME required | String | Email or username of the wallet user | | WALLETBALANCE required | Number | Wallet balance after transaction | `50.00` | ## Request Example ``` curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletTxn.php' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'txn_mode=debit' \ --data-urlencode 'merchant_id=18999' \ --data-urlencode 'token=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'wallet_user=aatest12@gmail.com' \ --data-urlencode 'order_id=12312312' \ --data-urlencode 'amount=100' \ --data-urlencode 'channel=upi' \ --data-urlencode 'payee_identifier=98776x3123' \ --data-urlencode 'mer_dom=aHR0cDovL2xvY2FsaG9zdA==' \ --data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09' ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "CHMOD": "wallet", "MERCHANTID": "18999", "USERNAME": "aatest12@gmail.com", "WALLETBALANCE": 50.00 } } ``` ### Success Response (XML) ```xml 200 Successful wallet 18999 aatest12@gmail.com 50.00 ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" } } ``` ### Error Response (XML) ```xml 400 Invalid checksum ``` --- --- title: Update API description: Modify the status or lifecycle of an active mandate. --- # Update API Modify the status or lifecycle of an active mandate. Merchants can pause, resume, revoke (unsubscribe), or otherwise manage user subscriptions via API actions. Streamlines mandate management and enables automation for subscription-based services. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/update.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | Numeric
(1–10) | Unique identifier assigned to the subscription or mandate. | | action required | Alphanumeric | `revoke/unsubscribe/pause/resume` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | String | Unique identifier assigned to the subscription or mandate. | | status required | String | Status code representing the transaction result. | `200 = Success, 211 = InProcess, 400 = Failed` | --- --- title: Get Bank List API description: Retrieve available banks and payment options for a merchant. --- # Get Bank List API The Bank List API retrieves available banks and payment options for a merchant, requiring a Base64-encoded merchant domain and an optional payment mode filter. It returns a JSON response with details like bank codes, names, transaction limits, and EMI plans for a successful request. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/banks/?token= ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mer_dom required | Alphanumeric
(10) | Base64 encoded merchant domain. | `aHR0cDovL2xvY2FsaG9zdA==` | | chmod optional | Chars | Payment Mode
ppc - prepaid card
pg - payment gateway
nb - Netbanking
cash - Cash
emi - EMI
upi - UPI
btqr - Bharat QR
payltr - Pay later
va - Virtual account
enach - eNACH
chmod variable contains Payment Modes available for user. for e.g. If you want to show only Credit Card/Debit Card, then value of the chmod variable will be "pg". If you want Netbanking and Prepaid card then value of the chmod variable will be "nb_ppc". If you want to show all payment options activated for you at airpay, then leave this variable blank.
Allowed values: pg, ppc, nb, cash, emi, upi, btqr, payltr, va and enach. | `pg` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | chmod required | Alphanumeric | Channel of Payment. | `emi` | | channel_name required | Alphanumeric | Channel of Payment. | `EMI` | | title required | Alphanumeric | Channel of Payment. | `EMI` | | description required | Alphanumeric | Description of Channel of Payment. | `Pay with EMI` | | banks optional | Chars | [ { "bank_code": "HDFCEMI", "bank_name": "HDFC", "min_amount": "", "max_amount": "", "plans": { "credit": [ { "tenure_id": 7, "tenure": 3, "interest_percentage": 3, "min_amount": 1, "max_amount": 1000 } ] } }, { "bank_code": "EPAYLTR", "bank_name": "EPAYLATER", "min_amount": "1.00", "max_amount": "1000.00" } ]
bank_code - BANK_CODE
bank_name - BANK_NAME
min_amount - Min allowed amount
max_amount - Max allowed amount
tenure_id – Tenure ID For emi
tenure – emi tenure
interest_percentage – emi interest percentage
min_amount – min allowed amount for a plan
max_amount - max allowed amount for a plan | `json array with values` | ## PHP ```php ; $username = ; $password = ; $secret = ; $client_id = ; $client_secret = ; $privatekey = hash('SHA256', $secret . '@' . $username . ":|:" . $password); $request = array(); $data = []; $data['mer_dom'] = base64_encode('http://localhost'); $data['chmod'] = 'ppc'; $tokenUrl = "https://kraken.airpay.co.in/airpay/pay/v4/api/oauth2"; $request['client_id'] = $client_id; $request['client_secret'] = $client_secret; $request['grant_type'] = 'client_credentials'; $request['merchant_id'] = $mercid; $secretKey = md5($username . "~:~" . $password); $encre = aes256encrypt(json_encode($request), 'aes-256-cbc', $username, $password); $req = [ 'merchant_id' => $mercid, "encdata" => $encre, "checksum" => checksumcal($request) ]; $access_token = sendPostData($tokenUrl, $req); $decryptData = decrypt(json_decode($access_token, true), $secretKey); $tokenResponse = json_decode($decryptData, true); if ((isset($tokenResponse['success']) && !$tokenResponse['success']) || empty($access_token) || empty(trim($access_token))) { echo $tokenResponse['msg']; exit; } $accessToken = $tokenResponse['data']['access_token']; $checksumReq = checksumcal($data); $dataJson = json_encode($data); $request_data = [ 'encdata' => aes256encrypt($dataJson, 'aes-256-cbc', $username, $password), 'merchant_id' => $mercid, 'privatekey' => $privatekey, 'checksum' => $checksumReq ]; $response = sendPostData('https://kraken.airpay.co.in/pay/v4/api/banks/?token=' . $accessToken, $request_data, 'POST'); $responseArr = json_decode($response, true); $encdata = $responseArr['response']; $iv = substr($encdata, 0, 16); $encdata = substr($encdata, 16); $decrypted_data = openssl_decrypt(base64_decode($encdata), 'aes-256-cbc', $secretKey, $options = OPENSSL_RAW_DATA, $iv); $result = json_decode($decrypted_data); echo json_encode($result); function aes256encrypt($data, $cipher = 'aes-256-cbc', $username, $password) { $key = md5($username . "~:~" . $password); $iv = bin2hex(openssl_random_pseudo_bytes(8)); $encrypted = openssl_encrypt($data, $cipher, $key, $options = OPENSSL_RAW_DATA, $iv); $encryptedData = base64_encode($encrypted); return $iv . $encryptedData; } function sendPostData($tokenUrl, $postData) { $ch = curl_init($tokenUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); $response = curl_exec($ch); curl_close($ch); return $response; } function checksumcal($postData) { ksort($postData); $data = ''; foreach ($postData as $key => $value) { $data .= $value; } $data = $data . date('Y-m-d'); $checksum = hash('SHA256', $data); return $checksum; } function decrypt($requestData, $secretKey) { $data = $requestData['response']; error_log("sk encdata" . $requestData['response'] . "secret" . $secretKey); $iv = substr($data, 0, 16); $encryptedData = substr($data, 16); $raw = openssl_decrypt(base64_decode($encryptedData), 'AES-256-CBC', $secretKey, OPENSSL_RAW_DATA, $iv); return $raw; } ``` ### Success Response ```json { "status_code": "200", "response_code": "00", "status": "success", "message": "success", "data": [ { "chmod": "ppc", "channel_name": "PPC", "title": "Wallet", "description": "Pay with your digital wallet for quick transactions.", "banks": [ { "bank_code": "AMAZON", "bank_name": "AMAZONPAY", "min_amount": "1.00", "max_amount": "100000.00" }, { "bank_code": "HDFCPP", "bank_name": "HDFC", "min_amount": "1.00", "max_amount": "100000.00" }, { "bank_code": "MOBIKWIK", "bank_name": "MOBIKWIK", "min_amount": "1.00", "max_amount": "200000.00" }, { "bank_code": "MPSA", "bank_name": "MPESA", "min_amount": "1.00", "max_amount": "10000.00" }, { "bank_code": "PHONEPE", "bank_name": "PHONEPE", "min_amount": "1.00", "max_amount": "500000.00" } ] } ] } ``` --- --- title: Account Transactions description: Retrieve all transactions in a partner's payout account by date range. --- # Account Transactions This API will return all the transactions done in partner's account by the merchant. We will pass date range to get the payout details and no of rows in response then we will get payment details like amount, balance, and description. get ``` http://kraken.airpay.co.in:8000/payout/partner/transactions ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NT` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | from_date required | Date | Transaction created from date. (Y-m-d) | | to_date required | Date | Transaction created to date.(Y-m-d) | | offset required | Numeric | Which row to start retrieve from) | | limit required | Numeric | Number of rows in response. (Maximum is 100) | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Alphanumeric | success / error | `success` | | message required | Alphanumeric | Response description | | errors required | Array | Error messages if response status is 'error' | | data required | Array | Response data | | created_datetime required | DateTime | Transaction date and time (Y-m-d H:i:s) | `2022-02-09 08:46:50` | | entry_side required | Alphanumeric | debit / credit | `debit` | | amount required | Numeric | Transaction amount | `5` | | balance required | Numeric | Balance in account | `4595` | | description required | Alphanumeric | fee/2022JAN/18" Transaction description | `Transfer` | | approved_transfers_count required | Numeric | Number of transfers approved by airpay | `1` | | processing_transfers_count required | Numeric | Number of transfers in process | `1` | | success_transfers_count required | Numeric | Number of successful transfers | `0` | | failure_transfers_count required | Numeric | Number of failed transfers | `1` | | rejected_transfers_count required | Numeric | Number transfers rejected by airpay | `1` | ## Request Example ``` GET 'partner/transactions?offset=0&limit=25&from_date=2022-01-01&to_date=2022-01-31' ``` ### Success Response (Decrypted) ```json { "status": "success", "message": "Transactions", "data": [ { "transfer_number": "18", "created_datetime": "2022-02-09 08:46:50", "entry_side": "debit", "type": "payout", "amount": 5, "currency": "INR", "balance": 4595, "description": "Transfer fee/2022JAN/18" }, { "transfer_number": "18", "created_datetime": "2022-02-09 08:46:21", "entry_side": "debit", "type": "payout", "amount": 400, "currency": "INR", "balance": 4600, "description": "Transfer/2022JAN/18" } ] } ``` --- --- title: Update Contact description: Update merchant contact details in the merchant's assigned payment domain. --- # Update Contact This API will update contact details of merchant in merchant's assigned domain. We must pass airpay merchant id, username, password, secret key, sub domain, legal name, address, city, state, pin code, contact no and in request. If the request has valid details, we will get a success response. #### POST ``` https://kraken.airpay.co.in/airpay/ms/singlepager/api/update ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | airpay_merchant_id required | Numeric
(1-12) | Merchant Id | `1088` | | airpay_username required | Alphanumeric
(1-50) | Merchant Username | `userabc` | | airpay_password required | Alphanumeric
(1-50) | Merchant Password | `passabc` | | airpay_secret_key required | Alphanumeric
(1-100) | Merchant Secret Key | `91f5evhk72f564430912508233b7r37562g2hps` | | subdomain optional | Alphanumeric
(1-100) | Domain name of the Merchant
eg. abc.nwpay.co.in | | legal_name required | Alphanumeric
(1-100) | Merchant Business legal name | `ABC` | | address optional | Alphanumeric
(1-100) | Merchant address | | city optional | Alphanumeric
(1-50) | Merchant City | | state optional | Alphanumeric
(1-50) | Merchant State | | pincode optional | Numeric
(1-10) | Merchant Pincode | | contact_no optional | Numeric
(1-10) | Merchant Contact Number | | checksum required | Alphanumeric
(1-100) | Checksum
hash_hmac('sha256', airpay_merchant_id + airpay_username +legal_name,'91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps') | `91f5evhk72f52t21k430912508233b7r37562g2hps` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Result required | Text | Result message
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found) | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/singlepager/api/update' \ --header 'content-type: application/json' \ --header 'processor-key:91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --form 'airpay_merchant_id=1088' \ --form 'airpay_username=userabc' \ --form 'airpay_password=passabc' \ --form 'airpay_secret_key=91f5evhk72f564430912508233b7r37562g2hps' \ --form 'subdomain=abc.nwpay.co.in' \ --form 'legal_name=' \ --form 'address=' \ --form 'city=' \ --form 'state=' \ --form 'pincode=' \ --form 'contact_no=' \ --form 'checksum=91f5evhk72f52t21k430912508233b7r37562g2hps' ``` ### Success Response ```json HTTP/1.1 200 OK { "Result": "Success" } ``` ### Error Response ```json { "SinglePager": { "Errors": { "10": "airpay Merchant Id Can Not Be Empty", "11": "airpay Merchant Id Can Not Exceed Maximun 11 Characters", "12": "airpay Username Can Not Be Empty", "13": "airpay Username Can Not Exceed Maximun 11 Characters", "14": "airpay Password Can Not Be Empty", "15": "airpay Password Can Not Exceed Maximun 11 Characters", "16": "airpay Secret Key Can Not Be Empty", "17": "airpay Secret Key Can Not Exceed Maximun 11 Characters", "00": "Header Aunthentication Failed, Invalid Content-Type", "01": "Header Aunthentication Failed, airpay-Key Can Not Be Empty", "02": "Header Aunthentication Failed, Invalid airpay-Key", "03": "Invalid Request", "04": "Checksum cannot be empty", "05": "Wrong Checksum", "06": "Invalid Subdomain", "07": "Subdomain Can Not Exceed Maximun 80 Characters", "08": "Business legal name cannot be empty", "09": "Business legal name is Invalid" } }, "Result": "Fail" } ``` --- --- title: Adhoc Charge description: Charge an adhoc amount on an Enach subscription. --- # Adhoc Charge Adhoc is generally additional amount charged by merchant or requested to be added by the customer. This API will be used by merchant to charge the Enach adhoc subscription. We must pass merchant id, subscription id, sb amount and action as "C"- adhoc in request. If the request has valid details, we will get a success response as "Recurring added successfully". #### POST ``` https://kraken.airpay.co.in/airpay/api/updatesubscription.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number | Merchant Identification Number | `29555` | | subscription_id required | Number | airpay Subscription Id | `10062147` | | sb_amount required | Number | Amount to be charged should not be greater than max amount | `2000.00` | | sb_date required | Date | Subscription date is date when the customer is to be charged, which need greater than by minimum 2 days from date of initiation (Ex : DD-MM-YYYY) | `27-08-2022` | | action required | String | Action
"C"- adhoc | `C` | | checksum required | Alphanumeric
(10-200) | Checksum
privatekey = hash('sha256', secret.'@'.username.':|:'.password)
Hash generated by: hash_hmac('sha256', subscription_id+private_key+merchant_id+action+sb_date+sb_amount, )
Note: Use the same secret key, username and password provided on payment kit to generate private key | `86a1867e4d8728308c86930e35d7948f2cb8c314e8e5ce67db77ab54c4e05e5c` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status value will pass as per the condition | `200,533` | | message required | String | Status message value will pass as per the condition | `Subscription updated successfully,Error in unsubscription` | ## Request Example (JSON) ```json { "merchant_id" : "29555", "subscription_id" : "", "sb_amount": "2000.00", "sb_date" : "27-08-2022", "action" : "C", "checksum" : "86a1867e4d8728308c86930e35d7948f2cb8c314e8e5ce67db77ab54c4e05e5c" } ``` ## Request Example (XML) ```xml ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", } ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "status" : "400", "message" : "Sb Date should not be less than current date + 2 days.", } ``` ### Success Response (XML) ```xml HTTP/1.1 200 OK 200 Subscription updated successfully. ``` ### Error Response (XML) ```xml HTTP/1.1 200 OK 400 Sb Date should not be less than current date + 2 days. ``` ### Status List ``` 200 - Subscription updated successfully 533 - Error in unsubscription 603 - Subscription is in Unsubscribed state 604 - Amount should not be greater than 605 - Amount should be greater than or equal to 1 619 - Subscription id is invalid 620 - Subscription request was not accepted 621 - Subscription action is invalid 622 - Subscription is already set one skip recurring 623 - Error in update amount subscription 624 - Subscription is already in Subscribed state 625 - Subscription is already in Paused state 626 - No future recurring subscription 627 - Error in pausing subscription 628 - Error in resuming subscription ``` --- --- title: Close VA description: Close a particular virtual account assigned to a merchant. --- # Close VA This API will close a particular virtual account assigned to a merchant if we pass merchant id, virtual account no and UID correctly. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - close | `close` | | private_key required | Alphanumeric | Private Key (length 10-200) (required)
hash('sha256', @secretkey:username|:password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.UID.action.merchant_id.private_key) | `8fe4273d9389f71d58152b92402a19e3b7ef51a8` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code Success - 200
Failed - 400 | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
Virtual account is invalid - 526 | `success,fail` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=close' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'virtual_account_number=2293640000000010242' \ --form 'checksum=8fe4273d9389f71d58152b92402a19e3b7ef51a8' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success" } ``` ### Error Response ```json HTTP/1.1 200 OK { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Wallet Balance API description: Retrieve the wallet balance for a user. --- # Wallet Balance API This API retrieves the user's wallet balance. It requires merchant ID, token, private key, wallet user, output format, and checksum. A successful request returns the transaction status, merchant ID, username, and wallet balance. #### POST ``` https://kraken.airpay.co.in/airpay/wallet/api/walletBalance.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number
(1-20) | Merchant ID | `18999` | | token required | String
(10-200) | Token generated during wallet creation | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | private_key required | String
(10-200) | Private Key, generated as hash('sha256', secret.'@'.username.':|:'.password) | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | wallet_user required | String
(6-50) | Email, mobile number, or UID of the wallet user | `aatest12@gmail.com` | | outputFormat optional | String
(1-3) | Response format: json or xml (default: xml) | `xml` | | checksum required | String | MD5 hash: md5(merchant_id.token.wallet_user.date('Y-m-d').private_key) | `72ce8cfbb1347905c34e121336bb3d09` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | | MESSAGE required | String | Response message from the payment gateway (e.g., "Successful", "Invalid checksum") | | CHMOD required | String | Transaction channel mode (always "wallet") | `wallet` | | MERCHANTID required | String | Merchant ID | `18999` | | USERNAME required | String | Email or username of the wallet user | | WALLETBALANCE required | Number | Wallet balance | `50.00` | ## Request Example ``` curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletBalance.php' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'merchant_id=18999' \ --data-urlencode 'token=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'wallet_user=aatest12@gmail.com' \ --data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09' ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "CHMOD": "wallet", "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "MERCHANTID": "18999", "USERNAME": "aatest12@gmail.com", "WALLETBALANCE": 50.00 } } ``` ### Success Response (XML) ```xml 200 Successful wallet 18999 aatest12@gmail.com 50.00 ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" } } ``` ### Error Response (XML) ```xml 400 Invalid checksum ``` --- --- title: List Mandate API description: Retrieve the complete list of mandates or subscription agreements for a merchant or customer. --- # List Mandate API Retrieve the complete list of mandates or subscription agreements for a given merchant or customer. Includes detailed information on start/end dates, amount, payment channel, and current subscription status (subscribed, unsubscribed). Useful for dashboards, reporting, or customer support. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/list_mandate.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | page_number required | Numeric
(1–10) | `0` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | total_records required | String | `377` | | subscriptions required | String | Array of subscription objects | | subscriptions.subscription_id required | String | `10003143` | | subscriptions.start_date required | String | `13\/10\/2025` | | subscriptions.end_date required | String | `20\/10\/2025` | | subscriptions.amount required | String | `2600.00` | | subscriptions.period required | String | `daily` | | subscriptions.transaction_type required | String | `upi` | | subscriptions.transaction_date required | String | `09-10-2025` | | subscriptions.subscription_status required | String | `subscribed` | --- --- title: Callback API description: This API is used to notify merchants whenever there is a change in the status of a payout transaction. --- # Callback API This API is used to notify merchants whenever there is a change in the status of a payout transaction. For example, if a transaction status changes from Pending to Success, the callback API will be triggered automatically to inform the merchant about the status update. Merchants can configure their callback URL from the Partner Details section. At the time of a payment status change, we call the merchant's callback URL, if configured, and send the following details: ## Success 200 | Parameter | Type Value | Description | Value Like | | --------------------------------- | ------------ | ----------------------------------------------------- | ----------------------- | | transaction_id required | Numeric | Unique payout transaction identifier | `247485` | | partner_id required | Numeric | Partner identifier for which the payout is processed | `247485` | | bank_account_number required | String | Bank account number used for the payout transfer | `560002379001` | | transfer_mode required | String | Transfer mode used for payout | `NEFT` | | currency required | String | Currency code for the payout | `INR` | | order_id required | Alphanumeric | Merchant order identifier associated with the payout | `ord0020250616v1` | | utr_number | String | UTR reference number; null if not available yet | `52251GD34` | | transaction_amount required | Numeric | Amount transferred for the payout | `12` | | transaction_status required | String | Current payout transaction status | `Pending` | | airpay_charge required | Numeric | Fee charged by Airpay for the transfer | `0.6` | | bank_charge required | Numeric | Bank service charge for the payout | `1` | | gst_amount required | Numeric | GST amount on applicable charges | `20` | | transaction_time required | DateTime | Timestamp when transaction status was updated | `2025-06-16 12:14:02` | ### Success Response (Decrypted) ```json { "transaction_id": 247485, "partner_id": 247485, "bank_account_number": "560002379001", "transfer_mode": "NEFT", "currency": "INR", "order_id": "ord0020250616v1", "utr_number": "52251GD34", "transaction_amount": 12, "transaction_status": "Pending", "airpay_charge": 0.6, "bank_charge": 1, "gst_amount": 20, "transaction_time": "2025-06-16 12:14:02" } ``` --- --- title: Get Bank Accounts description: Retrieve all bank accounts registered for payout transfers. --- # Get Bank Accounts This API will return all the bank accounts to where the payouts are done. You can use the 'Partner Bank ID' instead of bank account details in payout requests. get ``` http://kraken.airpay.co.in:8000/payout/partner/bank-accounts ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NT` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | offset required | Numeric | Numeric | | limit required | Numeric
(1-100) | Number of rows in response | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Alphanumeric | success / error | `success` | | message required | Alphanumeric | Response description | | errors required | Array | Error messages if response status is 'error' | | data required | Array | Response data | | id required | Numeric | Partner bank id | `845` | | bank_name required | Alphanumeric | Bank name | | bank_account_type required | Alphanumeric | savings / current | `savings` | | bank_account_number required | Numeric | Bank account number | `560002379836` | | bank_ifsc required | Alphanumeric | Balance IFSC code | `ICIC0094354` | ## Request Example ``` GET 'partner/bank-accounts?offset=0&limit=25' ``` ### Success Response (Decrypted) ```json { "status": "success", "message": "Bank Accounts", "data": [ { "id": "845", "bank_name": "ICICI", "bank_account_type": "savings", "bank_account_number": "560002379836", "bank_ifsc": "ICIC0094354" }, { "id": "846", "bank_name": "ICICI", "bank_account_type": "savings", "bank_account_number": "560002379835", "bank_ifsc": "ICIC0094354" } ] } ``` --- --- title: Status Check API description: This API is used to retrieve the current status of a payout transaction. --- # Status Check API This API is used to retrieve the current status of a payout transaction. get ``` https://symbiotes.airpay.co.in/api/transaction/status-check/ ``` transaction_id The payout transaction ID will be obtained from the MPS portal. ## Header | Parameter | Type Value | Description | Value Like | | ---------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Authorization required | String | The token is a JSON Web Token (JWT) in this example, commonly used for bearer authentication. | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.dummyTokenExample` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --------------------------------- | ------------ | ---------------------------------------------- | ----------------------- | | status required | Alphanumeric | success / failed | `success` | | message required | Alphanumeric | Response description | `Transactions` | | data required | Object | Response payload containing transaction details | | | data.transaction_id required | Numeric | Transaction identifier | `123456` | | data.partner_id required | Numeric | Partner identifier | `111` | | data.batch_code required | Alphanumeric | Payout batch code | `BATCH12345` | | data.bank_account_number required | String | Bank account number used for payout | `000000000000` | | data.bank_ifsc_code required | String | Bank IFSC code for payout account | `ABCD0123456` | | data.bank_name required | String | Bank name | `Example Bank` | | data.account_type required | String | Account type | `Saving` | | data.payee_name required | String | Payee name | `John Doe` | | data.payee_mobile required | String | Payee mobile number | `9999999999` | | data.amount required | Numeric | Transaction amount | `100` | | data.currency required | String | Currency code | `INR` | | data.payout_status required | String | Payout status | `Pending` | | data.utr_number required | String | UTR / transaction reference number | `UTR123456789012` | | data.airpay_charge required | Numeric | Airpay fee amount | `1.2` | | data.bank_charge required | Numeric | Bank fee amount | `3` | | data.gst_amount required | Numeric | GST amount | `18` | | data.total_amount required | Numeric | Total amount including charges | `122.2` | | data.order_id required | Alphanumeric | Merchant order identifier | `ORDER123456` | | data.remarks required | Alphanumeric | Transaction remarks | `Test payout` | | data.txn_time required | DateTime | Transaction timestamp (Y-m-d H:i:s) | `2025-01-01 12:34:56` | ### Success Response (Decrypted) ```json { "status": "success", "message": "Transactions", "data": { "transaction_id": 123456, "partner_id": 111, "batch_code": "BATCH12345", "bank_account_number": "000000000000", "bank_ifsc_code": "ABCD0123456", "bank_name": "Example Bank", "account_type": "Saving", "payee_name": "John Doe", "payee_mobile": "9999999999", "amount": 100, "currency": "INR", "payout_status": "Pending", "utr_number": "UTR123456789012", "airpay_charge": 1.2, "bank_charge": 3, "gst_amount": 18, "total_amount": 122.2, "order_id": "ORDER123456", "remarks": "Test payout", "txn_time": "2025-01-01 12:34:56" } } ``` --- --- title: Split Settlement description: Configure split settlement ratios for transactions via the API. --- # Split Settlement With split settlement functionality, the merchants will be able to communicate their desired settlement ratio for each transaction directly through the API, allowing for seamless execution of settlements based on their specifications. #### POST ``` https://kraken.airpay.co.in/airpay/neft/split_payout/transaction_level_split_config_api.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | | Api-Key required | String | Api-Key (airpay will provide) | `HWW412GG` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTION_ID required | Alphanumeric
(1-30) | airpay ID. | `241241242` | | RRN required | Numeric
(1-12) | RRN of that particular transaction. | `3123124412` | | SPLIT_REQUEST_ID required | Numeric
(1-15) | Unique Identifier used to identify the request. Only numeric values are allowed. | `536423` | | PRIACCT_IDENTIFIER required | Numeric
(8-12) | Bank identifier name of primary account. | `1097897676` | | PRIACCT_SPLIT_VALUE required | Numeric
(8-12) | Split breakup for primary account. | `50` | | OTHER_IDENTIFIERS optional | Alphanumeric | Other bank identifiers, apart from the primary account, to which the remaining splits need to be distributed, separated by '|'. | `1900029989|1900051524` | | SPLIT_VALUES required | Numeric
(8-12) | Split breakup for other identifiers separated by '|'. If split type for the merchant is 'Percentage', then sum of SPLIT_VALUES and PRIACCT_SPLIT_VALUE should be equal to 100. else if split type is 'Absolute', then the sum of SPLIT_VALUES and PRIACCT_SPLIT_VALUE should be equal to the txn amount. | `20|30` | | TOKEN required | Alphanumeric | Used for user authentication.
PRIVATE_KEY (As per PHP) = hash('SHA256', APIKEY.'@'.USERNAME.':|:'.PASSWORD);
USERNAME → Merchant API access user name.
PASSWORD → Merchant API access password.
Token generation logic (As per PHP)= hash_hmac('sha256',PRIVATE_KEY.TRANSACTION_ID,APIKEY);
APIKEY → Merchant API access Key. | `6b65e407a182cf2d84049ecae8f01e0874ee4440a93f3512cdd8c17e6a8476db` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | message required | String | Success or fail message. | `Success` | | errorCode required | Alphanumeric | Error code. | `000 :- Success. E01 :- Transaction not successful. Only success transactions are accepted. E02 :- Cutoff time exceeded./Transaction already settled/The transaction has already been added to the settlement queue. E03 :- Transaction cannot be split below Re1. E04 :- Please check the values, total should be equal to 100%. E05 :- Please check the values, total should be equal to settlement value. E06 :- Invalid API Request. E07 :- Duplicate Request - Successful record already exists. E08 :- Duplicate Split ID Requests. E09 :- Kindly include Primary Account in the split. E10 :- Unauthorised Access. E11 :- Transaction ID is empty. E12 :- Please verify the transaction. E13 :- Split Request ID is empty. E14 :- Primary Account split value is empty. E15 :- Please verify the transaction Id and RRN. E16 :- Transaction level split settlement is not enabled for this merchant. E17 :- The bank identifier shared for primary account does not correspond to any active account. E18 :- Other bank identifiers field contains either invalid or inactive accounts. E19 :- Other bank identifiers cannot be more than 3. E20 :- Identifiers cannot be the same for the primary account identifier and other account identifiers. E21 :- Duplicate identifiers are not accepted in Other Identifiers. E22 :- Primary account shared is wrong. E26 :- Split value of primary account contains non-numeric value. E27 :- Split value of other accounts contains non-numeric value. E28 :- Sum of all split values cannot be greater than 100. E29 :- Total number of other identifiers and split values are not same. E30 :- Rate are not calculated for this transaction. Please try again after few minutes. E31 :- Split type is not defined. E32 :- Invalid Token. E33 :- Split Request ID contains non-numeric value. E34 :- Split value of primary account cannot be zero. E35 :- Split value of other accounts cannot be zero. E36 :- Refund for the full amount has been initiated for this transaction. E37 :- Chargeback for the full amount has been initiated for this transaction. ` | --- --- title: Status Check description: Check subscription status and view full recurring billing history. --- # Status Check When integrate with this API, gain access to a comprehensive set of data related to a customer's recurring billing. This includes detailed subscription information such as plan type, billing frequency, status, start and end dates and a full transaction history, encompassing each payment attempt, success or failure status, timestamps. By combining these two datasets, the API provides a holistic view of the customer's payment lifecycle, enabling you to track, analyze, and manage recurring payments with greater accuracy and transparency. #### POST ``` https://kraken.airpay.co.in/airpay/order/verify_subscription.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `application/json` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number | Merchant Identification Number. | `11111` | | subscription_id optional | Number | Either the airpay Subscription ID (subscription_id) or the Order ID (orderId) is required to use this API. | `10234982` | | orderId optional | Number | Either the airpay Subscription ID (subscription_id) or the Order ID (orderId) is required to use this API. | `1012` | | pgno optional | Number | pageno for getting recurring data, default is zero. | `0` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status_code required | Numeric | 200 – Request is valid with correct details. 400 – Request is invalid; merchants must recheck request data and reinitiate. | `200` | | error_code required | Numeric | success, fail and refunded | `00` | | status required | Text | fail,success | `success` | | message required | Text | success, fail | `Success` | | data required | array | Json response | `[]` | | SUBSCRIPTION_STATUS required | Text | After initiate the subscription status check request and receive a response, you need to check the 'SUBSCRIPTION_STATUS' parameter for the latest mandate status. The possible values are: SUBSCRIBED, UNSUBSCRIBED, COMPLETED, or PAUSED. | `SUBSCRIBED` | ## Payload Creation Request Example ```php $merchant_id = ; $username = ; $password = ; $encryptionkey = md5($username . "~:~" . $password); $data = array(); $data['subscriptionId'] = $subscriptionId; $data['orderId'] = $orderId; $data['pgno'] = $pgno; $encdata = encrypt(json_encode($data), $encryptionkey); $checksum = checksum($data); $payload = ['merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum ]; ``` ### Subscribed Response ``` HTTP/1.1 200 OK [ [status_code] => 200 [error_code] => 00 [status] => success [message] => Success [data] => Array ( [SUBSCRIPTION_ID] => 10229184 [SUBSCRIPTION_CYCLE] => 10 [SUBSCRIPTION_DATE] => 20-04-2025 [END_DATE] => 12-04-2035 [NEXT_TRAN_DATE] => 12-04-2026 [LAST_TRAN_DATE] => NA [SUBSCRIPTION_AMOUNT] => 16716 [SUBSCRIPTION_MAXAMOUNT] => 25100.00 [SUBSCRIPTION_FREQUENCY] => 1 [SUBSCRIPTION_PERIOD] => annually [CUSTOM_VAR] => NA [TRANSACTIONTYPE] => enach [AMOUNT] => 1.00 [SUBSCRIPTION_STATUS] => SUBSCRIBED [DOWNPAYMENNT_HISTORY] => Array ( [AIRPAY_ID] => 889601295 [TRANSACTION_TYPE] => enach [TRANSACTION_DATE] => 21-04-2025 [TRANSACTION_AMOUNT] => 1.00 [TRANSACTION_STATUS] => SUCCESS [TRANSACTION_RESPONSE] => SUCCESS ) ) ] ``` ### Unsubscribed Response ``` HTTP/1.1 200 OK [ [status_code] => 200 [error_code] => 00 [status] => success [message] => Success [data] => Array ( [SUBSCRIPTION_ID] => 10226708 [SUBSCRIPTION_CYCLE] => 10 [SUBSCRIPTION_DATE] => 06-04-2025 [END_DATE] => 19-04-2034 [NEXT_TRAN_DATE] => NA [LAST_TRAN_DATE] => 19-04-2025 [SUBSCRIPTION_AMOUNT] => 14517 [SUBSCRIPTION_MAXAMOUNT] => 14517.00 [SUBSCRIPTION_FREQUENCY] => 1 [SUBSCRIPTION_PERIOD] => annually [CUSTOM_VAR] => NA [TRANSACTIONTYPE] => enach [AMOUNT] => 1.00 [SUBSCRIPTION_STATUS] => UNSUBSCRIBED [UNSUBSCRIBED_DATE] => 28-04-2025 [DOWNPAYMENNT_HISTORY] => Array ( [AIRPAY_ID] => 860705450 [TRANSACTION_TYPE] => enach [TRANSACTION_DATE] => 07-04-2025 [TRANSACTION_AMOUNT] => 1.00 [TRANSACTION_STATUS] => SUCCESS [TRANSACTION_RESPONSE] => SUCCESS ) ) ] ``` ### Completed Response ``` HTTP/1.1 200 OK [ [status_code] => 200 [error_code] => 00 [status] => success [message] => Success [data] => Array ( [SUBSCRIPTION_ID] => 10025112 [SUBSCRIPTION_CYCLE] => 2 [SUBSCRIPTION_DATE] => 21-12-2021 [END_DATE] => 21-06-2022 [NEXT_TRAN_DATE] => NA [LAST_TRAN_DATE] => 13-06-2022 [SUBSCRIPTION_AMOUNT] => 2954 [SUBSCRIPTION_MAXAMOUNT] => 2954.00 [SUBSCRIPTION_FREQUENCY] => 3 [SUBSCRIPTION_PERIOD] => monthly [CUSTOM_VAR] => NA [TRANSACTIONTYPE] => enach [AMOUNT] => 1.00 [SUBSCRIPTION_STATUS] => COMPLETED [UNSUBSCRIBED_DATE] => 21-06-2022 [DOWNPAYMENNT_HISTORY] => Array ( ) [TRANSACTION_COUNT] => 2 [TRANSACTION_HISTORY] => Array ( [0] => Array ( [AIRPAY_ID] => 74199891 [TRANSACTION_TYPE] => enach [TRANSACTION_DATE] => 13-06-2022 [TRANSACTION_AMOUNT] => 2954.00 [TRANSACTION_STATUS] => SUCCESS [TRANSACTION_RESPONSE] => 0 ) [1] => Array ( [AIRPAY_ID] => 69136610 [TRANSACTION_TYPE] => enach [TRANSACTION_DATE] => 13-03-2022 [TRANSACTION_AMOUNT] => 2954.00 [TRANSACTION_STATUS] => SUCCESS [TRANSACTION_RESPONSE] => 0 ) ) ] ``` ### Paused Response ``` HTTP/1.1 200 OK [ [status_code] => 200 [error_code] => 00 [status] => success [message] => Success [data] => Array ( [SUBSCRIPTION_ID] => 10107807 [SUBSCRIPTION_CYCLE] => 99 [SUBSCRIPTION_DATE] => 10-05-2023 [END_DATE] => 10-06-2122 [NEXT_TRAN_DATE] => 10-06-2024 [LAST_TRAN_DATE] => NA [SUBSCRIPTION_AMOUNT] => 21240 [SUBSCRIPTION_MAXAMOUNT] => 21240.00 [SUBSCRIPTION_FREQUENCY] => 1 [SUBSCRIPTION_PERIOD] => annually [CUSTOM_VAR] => NA [TRANSACTIONTYPE] => enach [AMOUNT] => 1.00 [SUBSCRIPTION_STATUS] => PAUSED [PAUSE_DATE] => 26-09-2024 [PAUSE_DATE] => 26-09-2024 [DOWNPAYMENNT_HISTORY] => Array ( [AIRPAY_ID] => 198377474 [TRANSACTION_TYPE] => enach [TRANSACTION_DATE] => 11-05-2023 [TRANSACTION_AMOUNT] => 1.00 [TRANSACTION_STATUS] => FAILED [TRANSACTION_RESPONSE] => Invalid UMRN or Inactive Mandate ) ) ] ``` ### Error Response ``` [ [status_code] => 400 [error_code] => 878 [status] => fail [message] => subscriptionid not valid ] ``` --- --- title: Delete Bank VA description: Delete a bank account assigned to a virtual account. --- # Delete Bank VA This API will delete a particular bank account details of the merchant assigned to virtual account if we pass merchant id, bank id, virtual account no and UID correctly. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - delete_bank | `delete_bank` | | private_key required | Alphanumeric | Private Key (length 10-200)
hash('sha256', @secretkey:username|:password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | bank_id required | Numeric | Bank Id from airpay | `9` | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.bank_id.UID.action.merchant_id.private_key) | `5bb886a73f85ac43d41c5b13219697ea086854c9` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code Success - 200
Failed - 400 | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
Virtual account is invalid - 526 | `success,Fail` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=delete_bank' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'bank_id=9' \ --form 'virtual_account_number=2293640000000010242' \ --form 'checksum=5bb886a73f85ac43d41c5b13219697ea086854c9' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success" } ``` ### Error Response ```json HTTP/1.1 200 OK { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Wallet Redeem API description: Redeem wallet amounts to a consumer's account using UPI or mPesa. --- # Wallet Redeem API This API is used to redeem wallet amounts to a consumer's account using UPI or mPesa. It requires merchant ID, token, private key, wallet user, order ID, amount, channel, payee identifier, merchant domain, output format, and checksum. A successful request returns the transaction status, merchant ID, wallet user, and wallet balance. #### POST ``` https://kraken.airpay.co.in/airpay/wallet/api/redeemApi.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Number
(1-20) | Merchant ID | `18999` | | token required | String
(10-200) | Token generated during wallet creation | `JWT_SECRET_TOKEN_12345` | | private_key required | String
(10-200) | Private Key, generated as hash('sha256', secret.'@'.username.'@@||'.password) | `53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5` | | wallet_user required | String
(6-50) | Email, mobile number, or UID of the wallet user | `test@xyz.com` | | order_id required | Number
(1-20) | Merchant-generated unique order ID | `333213` | | amount required | Number
(1-12,2) | Amount to be redeemed | `50.00` | | channel required | String | Payment channel: "upi" or "mpesa" | `upi` | | payee_identifier required | String
(10-50) | Mobile number for mPesa or VPA for UPI | `523532523223` | | mer_dom required | String
(10-64) | Base64-encoded, URL-encoded registered domain URL | `aHR0cDovL2xvY2FsaG9zdA==` | | outputFormat optional | String
(1-3) | Response format: json or xml (default: xml) | `xml` | | checksum required | String | MD5 hash: md5(merchant_id.token.wallet_user.payee_identifier.order_id.amount.channel.date('Y-m-d').private_key) | `72ce8cfbb1347905c34e121336bb3d09` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | | MESSAGE required | String | Response message from the payment gateway (e.g., "Successful", "Invalid checksum") | | CHMOD required | String | Transaction channel mode (always "wallet") | `wallet` | | MERCHANTID required | String | Merchant ID | `18999` | | USERNAME required | String | Email or username of the wallet user | | WALLETBALANCE required | Number | Wallet balance after transaction | `50.00` | ## Request Example ``` curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/redeemApi.php' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'merchant_id=18999' \ --data-urlencode 'token=asjhdlkashdkas5658as' \ --data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \ --data-urlencode 'wallet_user=aatest12@gmail.com' \ --data-urlencode 'order_id=333213' \ --data-urlencode 'amount=50.00' \ --data-urlencode 'channel=upi' \ --data-urlencode 'payee_identifier=523532523223' \ --data-urlencode 'mer_dom=aHR0cDovL2xvY2FsaG9zdA==' \ --data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09' ``` ### Success Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "CHMOD": "wallet", "MERCHANTID": "18999", "USERNAME": "aatest12@gmail.com", "WALLETBALANCE": 50.00 } } ``` ### Success Response (XML) ```xml 200 Successful wallet 18999 aatest12@gmail.com 50.00 ``` ### Error Response (JSON) ```json HTTP/1.1 200 OK { "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" } } ``` ### Error Response (XML) ```xml 400 Invalid checksum ``` --- --- title: Dash Checkout description: Redirect customers to AirPay checkout with order and product details in a single request. --- # Dash Checkout In Dash Checkout, the customer is redirected to AirPay’s payment page to complete the transaction. After payment, the customer returns to the success URL configured in your AirPay merchant settings. #### POST ``` https://payments.airpay.co.in/v4/checkout/index.php?token= ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | `merchant_id` required | Alphanumeric | AirPay merchant ID | `18999` | | `buyer_email` required | Email | Customer email address | `customer@example.com` | | `buyer_phone` required | Numeric | Customer phone number | `99999999` | | `buyer_firstname` required | Alphanumeric | Customer first name | `John` | | `buyer_lastname` required | Alphanumeric | Customer last name | `Doe` | | `amount` required | Numeric | Total transaction amount with two decimals | `10.00` | | `orderid` required | Alphanumeric | Merchant order ID | `ORD123456` | | `currency_code` required | Numeric | Numeric currency code | `356` | | `iso_currency` required | String | ISO currency code | `INR` | | `product_data` required | Base64 encoded JSON | Encoded order and product details | JSON below | | `token` optional | Alphanumeric | Token if tokenization is enabled | `4efaf21c79864ec154babfc494f45fd1f65a570805084965` | | `checksum` required | Alphanumeric | Request checksum | `...` | | `privatekey` required | Alphanumeric | Hash of secret credentials | `...` | | `encdata` required | Alphanumeric | Encrypted payload | `...` | ### Product Data JSON `product_data` contains order and shipment details and must be base64 encoded before sending. | Field | Type | Description | Example | | --- | --- | --- | --- | | `ship_date` | Date | Tentative shipment date | `10-05-2024` | | `insurance` | String | Insurance flag (`Y` or `N`) | `Y` | | `package_name` | String | Package name | `ATS` | | `no_of_packages` | Number | Number of packages | `2` | | `package_weight` | Number | Package weight in grams | `400` | | `package_length` | Number | Package length in cms | `10` | | `package_width` | Number | Package width in cms | `10` | | `package_height` | Number | Package height in cms | `10` | | `pickup_name` | String | Merchant warehouse name | `ATS` | | `pickup_address` | String | Merchant warehouse address | `Thrissur` | | `pickup_landmark` | String | Warehouse landmark | `Thrissur` | | `pickup_city` | String | Warehouse city | `Thrissur` | | `pickup_state` | String | Warehouse state | `Kerala` | | `pickup_country` | String | Warehouse country | `India` | | `pickup_pincode` | Number | Warehouse pincode | `401301` | | `pickup_phone` | Number | Warehouse phone number | `7907600618` | | `product_details` | Array | Array of product detail objects | See below | #### Product detail object | Field | Type | Description | Example | | --- | --- | --- | --- | | `name` | String | Product name | `product 1` | | `img` | URL | Product image path | `testimg.jpg` | | `discount` | Float | Discount amount | `0.00` | | `amount` | Float | Product amount | `300.00` | | `tax` | Float | Product tax | `50.00` | | `qty` | Float | Product quantity | `2` | | `sku` | String | Product SKU | `testsku` | | `hsn` | String | Product HSN | `testhsn` | | `product_weight` | Float | Product weight in grams | `200` | | `product_length` | Float | Product length in cms | `10` | | `product_width` | Float | Product width in cms | `10` | | `product_height` | Float | Product height in cms | `10` | | `description` | String | Product description | `TEST` | | `brand` | String | Product brand | `` | | `colour` | String | Product colour | `` | | `category` | String | Product category | `` | | `manufacture_country` | String | Manufactured country | `` | | `seller_details` | String | Seller details | `` | ## Success 200 | Parameter | Type | Description | Example | | --- | --- | --- | --- | | `transaction_payment_status` | String | Payment result status | `SUCCESS` | | `merchant_id` | Numeric | AirPay merchant ID | `123356` | | `orderid` | Alphanumeric | Merchant order ID | `ORDER123456` | | `ap_transactionid` | Numeric | AirPay transaction reference | `11314` | | `txn_mode` | Alphanumeric | Transaction mode | `LIVE` | | `chmod` | Alphanumeric | Payment channel | `pg` | | `amount` | Numeric | Transaction amount | `100.00` | | `currency_code` | Numeric | Numeric currency code | `356` | | `transaction_status` | Numeric | Transaction status code | `200` | | `message` | String | Response message | `Success` | | `bank_response_msg` | String | Bank response message | `Success` | | `customer_name` | String | Customer name | `John Doe` | | `customer_phone` | String | Customer phone | `987654321` | | `customer_email` | String | Customer email | `customer@example.com` | | `transaction_type` | Numeric | Transaction type code | `320` | | `risk` | Numeric | Risk indicator | `0` | | `customvar` | String | Custom variable data | `0` | | `token` | String | Token returned by AirPay | `` | | `uid` | String | Customer UID | `U123` | | `transaction_time` | Date | Transaction timestamp | `30-11-2023 12:32:59` | | `surcharge_amount` | Numeric | Surcharge amount | `51.41` | | `cod_charges` | Numeric | COD charge amount | `05.90` | | `delivery_charges` | Numeric | Delivery charge amount | `42.00` | | `partner_name` | String | Logistics partner name | `Shipyari` | | `tracking_number` | String | Shipment tracking number | `ABCD1234` | | `card_scheme` | String | Card scheme | `visa` | | `card_number` | String | Masked card number | `462294XXXXXX3713` | | `carduniquecode` | String | Card unique code | `SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi` | | `bank_name` | String | Bank name | `anz bank` | | `card_country` | String | Card country | `australia` | | `card_type` | String | Card type | `Credit` | | `ap_SecureHash` | String | Secure hash value | `1490948220` | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $client_secret = ""; $client_id = ""; $secretKey = ''; $product_data = '{ "ship_date": "10-05-2024", "insurance": "Y", "package_name": "ATS", "no_of_packages": "2", "package_weight": "400", "package_length": "10", "package_width": "10", "package_height": "10", "pickup_name":"ATS", "pickup_address":"Thrissur", "pickup_landmark":"Thrissur", "pickup_city":"Thrissur", "pickup_state":"Kerala", "pickup_country":"India", "pickup_pincode":"401301", "pickup_phone":"7907600618", "product_details": [ { "name": "product 1", "img":"testimg.jpg", "discount": "0.00", "amount": "300.00", "tax": "50.00", "qty": "2", "sku": "testsku", "hsn": "testhsn", "product_weight": "200", "product_length": "10", "product_width": "10", "product_height": "10", "description":"TEST", "brand": "", "colour": "", "category": "", "manufacture_country": "", "seller_details": "" } ] }'; $data = array(); $data['merchant_id'] = '18999'; $data['buyer_email'] = 'customer@example.com'; $data['buyer_phone'] = '99999999'; $data['buyer_firstname'] = 'John'; $data['buyer_lastname'] = 'Doe'; $data['amount'] = '10.00'; $data['orderid'] = 'ORD123456'; $data['currency_code'] = '356'; $data['iso_currency'] = 'inr'; $data['product_data'] = base64_encode($product_data); $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); ?> Airpay
Do Not Refresh or Press Back
Redirecting to Airpay
``` ## Success Response ```json HTTP/1.1 200 OK { "status_code":"200", "status":"success", "response_code":"00", "message":"Success", "data": { "transaction_payment_status":"SUCCESS", "merchant_id":"123356", "orderid":"ORDER123456", "ap_transactionid":"11314", "txn_mode":"LIVE", "chmod":"pg", "amount":"100.00", "currency_code":"356", "transaction_status":200, "message":"Success", "bank_response_msg":"Success", "customer_name":"John Doe", "customer_phone":"987654321", "customer_email":"customer@example.com", "transaction_type":320, "risk":"0", "customvar":"0", "token":"", "uid":"U123", "transaction_time":"30-11-2023 12:32:59", "surcharge_amount":"51.41", "cod_charges":"05.90", "delivery_charges":"42.00", "partner_name":"Shipyari", "tracking_number":"ABCD1234", "card_scheme":"visa", "card_number":"462294XXXXXX3713", "carduniquecode":"SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi", "bank_name":"anz bank", "card_country":"australia", "card_type":"Credit", "ap_SecureHash":"1490948220" } } ``` --- --- title: Status Check API description: Get real-time status and transaction history for a specific mandate or subscription. --- # Status Check API Get real-time status and transaction history for a specific mandate or subscription, including payment frequency, amounts, scheduled cycles, and past transaction results. Ideal for tracking active agreements, verifying next due date, and monitoring failed or successful debits. #### POST ``` https://payments.airpay.co.in/pay/v4/api/mandates/list_mandate.php ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | page_number required | Numeric
(1–10) | `0` | | subscription_id/orderid required | Numeric
(1–10) | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | String | subscription_id Unique identifier assigned to the subscription or mandate. | | end_date required | String | end_date Mandate end date. | | amount required | String | Transaction amount. | | period required | String | Frequency or duration period of mandate. | | transaction_type required | String | Type or category of transaction. | | transaction_date required | String | | subscription_status required | String | | next_tran_date required | String | | last_tran_date required | String | | subscription_amount required | String | | subscription_maxamount required | String | | frequency required | String | Frequency or duration period of mandate. | | subscription_cycle required | String | | total_recurring_transaction required | String | | transaction_history required | String | Array of subscription objects | | transaction_history.ap_transactionid required | String | Transaction ID assigned by the payment gateway. | | transaction_history.transaction_type required | String | Defines the type of transaction. | `sale, refund, mandate, etc.` | | transaction_history.transaction_date required | String | | transaction_history.transaction_amount required | String | | transaction_history.transaction_status required | String | Status code representing the transaction result. | `211 = InProcess, 400 = Failed` | --- --- title: Subscription Callback description: Confirm whether to charge a recurring amount from a customer before the scheduled date. --- # Subscription Callback The Recurring Payment Confirmation API is used to call the merchant's URL to confirm whether to charge a recurring amount from a customer, with the call initiated one or two days before the scheduled recurring payment date. The request must include the subscription ID, subscription amount, subscription date, and order ID. Upon receiving valid request details, the API returns a success response indicating whether the charge should proceed or not. If no response is received on the first callback attempt, the system will retry the following day before the recurring date. If no callback API is available, the recurring transaction is automatically considered approved for charging. #### POST ``` https://examplemerchantwebsite.eg/subscriptionChargebackApproval ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | `For JSON: application/json,For XML: application/xml` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | subscription_id required | Number | airpay Subscription Id | `1000001` | | sb_amount required | Number | Subscription charge amount | `2000.00` | | sb_date required | Date | Subscription charge date
(Ex : DD-MM-YYYY) | `12-12-2020` | | order_id required | Alphanumeric
(1-25) | Order ID | `32434235435365` | | checksum required | Alphanumeric
(10-200) | Checksum
privatekey = hash('sha256', secret.'@'.username.':|:'.password)
Hash generated by: hash_hmac('sha256', subscription_id+private_key+ merchant_id+sb_amount, )
Note: Use the same secret key, username and password provided on payment kit to generate private key | `2e6cf436576f49276315b02c9fb02e75` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code
200 : Approve, 400 : Reject | `200,400` | | message required | String | Status Message
200 : Approve, 400 : Reject | `Approve,Reject` | ## Request Example ```json { "subscription_id" : "1000001", "order_id": "32434235435365", "sb_amount" : "2000.00", "sb_date" : "12-12-2020", "checksum" : "2e6cf436576f49276315b02c9fb02e75" } ``` ### Success Response (Approve) ```json HTTP/1.1 200 OK { "status" : "200", "message" : "Approve", } ``` ### Success Response (Reject) ```json HTTP/1.1 200 OK { "status" : "400", "message" : "Reject", } ``` --- --- title: Generate QR description: Generate dynamic QR codes for UPI payment transactions. --- # Generate QR This API is for generating Dynamic QR: QR that is generated each time for a new transaction for UPI payments. Thus, the merchant will be adding amount needed to be paid by customer before generating the QR for each transaction. Once the payment is successful, the QR will be expired. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/generateorder/?token= ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | orderid required | Alphanumeric
(1-30) | Merchant generated transaction id | `ORD1234` | | amount required | Numeric
(1-10 .2) | Amount with two decimals | `100.00` | | tid optional | String
(15) | Terminal id of pos devices | | buyer_email required | Email
(3-50) | Buyer Email | `customer@example.com` | | buyer_phone required | Numeric
(8-15) | Buyer Phone | `99999999` | | mer_dom optional | Alphanumeric | Base64 encoded merchant domain. | `aHR0cDovL2xvY2FsaG9zdA==` | | customvar optional | Alphanumeric|Space|Equal
(1-4096) | Any customized info affiliate can pass | | call_type required | String
(1-20) | Use upiqr to generate QR | `upiqr` | | customer_consent required | chars
(1) | Consent flag to be sent by Merchant.
Allowed values: `Y`, `N` | `Y` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | qrcode_string required | String | QR Code String | `upi://pay?pa=example@icici&pn=Adam%20Innovations%20Test&cu=INR&tn=Pay to Adam Int&am=1.00&mc=5045&mode=04&tr=APS17722152&td=APS17722152` | | ap_transactionid required | String | Transaction Identifier | `17722152` | | status required | String | Status Code | `200` | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['orderid'] = "ORD123456"; $data['amount'] = "1000.00"; $data['buyer_email'] = "customer@example.com"; $data['buyer_phone'] = "99999999"; $data['call_type'] = "upiqr"; $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/generateorder/?token=', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code": "200", "response_code": "00", "status": "Success", "message": "success", "data": { "qrcode_string": "upi://pay?pa=example@icici&pn=Adam%20Innovations%20Test&cu=INR&tn=Pay to Adam%20Innovations%20Test&am=1.00&mc=5045&mode=04&tr=APS17722152&td=APS17722152", "ap_transactionid":"17722152", "status":"200" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: List Bank VA description: List all active banks assigned to a particular virtual account. --- # List Bank VA One or more Banks can be assigned to a virtual account for accepting payments. This API will list all active banks assigned to a particular virtual account. We must pass merchant id, virtual account no and UID in request, then bank details like bank id, bank name, account no, ifsc code will be displayed of all the banks. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - banks | `banks` | | private_key required | Alphanumeric | Private Key (length 10-200)
hash('sha256', @secretkey:username|:password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.UID.action.merchant_id.private_key) | `fb162c92c0d247669890641d26aed72e2bd28a77` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
No records to display - 167 There is no records found | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
No records to display - 167 There is no records found | `success,Failed` | | records required | Json | Data records, which contains
BANK_ID - Bank id
BANK_NAME - Bank name
ACCOUNT_NUMBER - Account number
IFSC_CODE - ifsc code
STATUS - status
Y - Yes
N - No
VERIFIED - Verified or not
Y - Yes
N - No
CREATED_ON - Created date
UPDATED_ON - Updated date | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=banks' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'virtual_account_number=2293640000000010242' \ --form 'checksum=fb162c92c0d247669890641d26aed72e2bd28a77' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success", "RECORDS": [{ "BANK_ID": "8", "BANK_NAME": "SC", "ACCOUNT_NUMBER": "6546797546469", "IFSC_CODE": "SC544646464", "STATUS": "Y", "VERIFIED": "N", "CREATED_ON": "14-01-2019 12:03:56", "UPDATED_ON": "14-01-2019 12:03:56" }] } ``` ### Error Response ```json HTTP/1.1 200 OK { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Validate VPA description: Validate a customer's UPI Virtual Payment Address before processing payment. --- # Validate VPA This API is for validating VPA – Virtual Private Address i.e UPI id of a customer for UPI payments online. If UPI id is not valid, then no payment can be done. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/vpavalidate/?token= ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | customer_vpa required | Alphanumeric | Customer Virtual Payment Address | `test@okhdfcbank` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | String | Status Code | `200` | | vpa_name required | String | VPA Name | `JACOB TARUN KOSHY` | | message required | String | Status Message | `Success` | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['customer_vpa'] = "customer@abcbank"; $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/vpavalidate/?token=', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code": "200", "response_code": "00", "status": "Success", "message": "success", "data": { "status" : "200", "vpa_name" : "JACOB TARUN KOSHY", "message" : "Success", } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: VA History description: List all transactions against a virtual account based on search criteria. --- # VA History This API will list all transactions against virtual account based on search criteria. We must pass merchant id, page numbers to retrieve, limit: no of records to retrieve, transaction id, virtual account no or UID in request, in response you get the details like date time, amount, payment mode, status and customer details based on transaction id. #### POST ``` https://kraken.airpay.co.in/airpay/va/api/ ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | application/x-www-form-urlencoded | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | action required | String | Action to perform - history | `history` | | private_key required | Alphanumeric
(10-200) | Private Key
hash('sha256', @secretkey:username|:password) | `71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe` | | merchant_id required | Numeric | Merchant Id | `1` | | page required | Numeric | Page number to retrieve the history | `1` | | limit required | Numeric | No of records to retrieve from teh history | `10` | | transaction_id required | Numeric | Transaction ID | | virtual_account_number required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | `2293640000000010242` | | UID required | Numeric | Virtual account number or UID Unique user identifier from the merchant is required | | checksum required | Alphanumeric | Hash generated by : sha1(virtual_account_number.transaction_id.page.limit.UID.action.merchant_id.private_key) | `b14bf8fc556f42cf83f9233b7caec1f14bd21795` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | STATUS required | Number | Status Code
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
No records to display - 167 There is no records found | `200,400` | | MESSAGE required | String | Status Message
Success - 200 Transaction is success
Transaction in Process - 211 Transaction in processing
Failed - 400 Transaction in failed
Dropped - 401 The transaction will not register properly
Cancel - 402 payment that has not yet been processed
Incomplete - 403 Not recieved any call back from bank
Bounced - 405 The transaction has bounced
No Records - 503 There is no records found
No records to display - 167 There is no records found | `success,Failed` | | records required | Json | Data records, which contains
transaction_id - Transaction id
profile_id - Merchant ID
transaction_date_time - Transaction date and time
virtual_account - Virtual account number
amount - Amount
payment_mode - Payment mode
status - Status
customer_name - Customer name
customer_email - Customer email
customer_mobile - Customer mobile | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/va/api/' \ --form 'action=history' \ --form 'private_key=71a4efaf21c79864ec154babfc494f45fd1f65a570805084965d5b29486f1dfe' \ --form 'merchant_id=1' \ --form 'page=1' \ --form 'limit=10' \ --form 'virtual_account_number=2293640000000010242' \ --form 'checksum=b14bf8fc556f42cf83f9233b7caec1f14bd21795' ``` ### Success Response ```json HTTP/1.1 200 OK { "STATUS": "200", "MESSAGE": "Success", "RECORDS": [{ "TRANSACTION_ID": "123456", "PROFILE_ID": "1", "TRANSACTION_DATE_TIME": "1610524558", "VIRTUAL_ACCOUNT": "6546797546469", "AMOUNT": "1.00", "PAYMENT_MODE": "va", "STATUS": "SUCCESS", "CUSTOMER_NAME": "Prathamesh", "CUSTOMER_EMAI": "consultant.prathamesh@airpay.co.in", "CUSTOMER_MOBILE": "7208246368 }] } ``` ### Error Response ```json { "STATUS": "400", "MESSAGE": "Failed" } ``` --- --- title: Order Confirmation description: Pull transaction status updates from the airpay system after order confirmation. --- # Order Confirmation This API can PULL transaction updates like transaction status to the merchant host after the order is confirmed. This API will work only on live MID, for the sandbox MID this API will not work. #### POST ``` https://kraken.airpay.co.in/airpay/pay/v4/api/verify/?token= ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | orderid optional | Alphanumeric
(1-30) | Merchant generated transaction id. (Either orderid or ap_transactionid or rrn is required) | `ORD12345` | | ap_transactionid optional | Alphanumeric | airpay transaction id. (Either orderid or ap_transactionid or rrn is required) | `123456` | | rrn optional | Numeric | Retrieval Reference Number. (Either orderid or ap_transactionid or rrn is required) | `556677` | | terminal_id optional | Numeric
(8) | POS terminal id | | txn_type optional | Alphanumeric | Type of transaction. e.g. pos | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | ap_transactionid required | Numeric | airpay transaction reference number | `11314` | | merchant_id required | Numeric | Merchant ID | `123356` | | orderid required | Alphanumeric | orderid you have send to airpay system | `ORDER123456` | | amount required | Numeric | Transaction amount | `100.00` | | transaction_status required | Numeric | Transaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found | `200` | | merchant_name optional | Alphanumeric | Response message received from payment gateway | | wallet_balance optional | Alphanumeric | Remaining balance in wallet (only in case of wallet transactions) | | surcharge_amount optional | Alphanumeric | Additional charges for particular transaction (sending only if applicable) | | settlement_date optional | Date | Settlement Date | | billed_amount optional | Numeric | Billed amount | | terminal_id optional | Numeric | Terminal Id (only in case of POS transactions) | | pos_entry_mode optional | Numeric | POS entry mode (only in case of POS transactions) | | cc_expiry optional | Numeric | Card Expiry (only in case of POS transactions) | | rrn optional | Alphanumeric | RRN
In case of sale completion it is required. | | message required | Alphanumeric | Response message received from payment gateway | `Success` | | chmod required | Alphanumeric | Chanel of Payment done | `pg` | | bank_name optional | Alphanumeric | Name of the bank, this field is available in pg | | token optional | Alphanumeric | Token | | card_uniquecode optional | Alphanumeric | Card unique code (applicable only for pg,emi ) | | bank_response_msg optional | Alphanumeric | Response message from the bank | | reason optional | Alphanumeric | Failed Reason | | transaction_reason optional | Alphanumeric | Transaction reason | | customer_bank_balance optional | Alphanumeric | Customer bank balance | | customer_name optional | Alphanumeric | Customer Name | | customer_phone optional | Alphanumeric | Customer Phone | | customer_email optional | Email | Customer Email | | customer_vpa optional | Alphanumeric | VPA will return if channel is upi | | risk optional | Boolean | If the transaction is at risk 1, otherwise 0. | | currency_code optional | Numeric | Payment Currency
Indian Rupee - 356 | `356` | | transaction_type optional | Numeric | Transaction Type (length 3)
Mandate approved, Auth - 310
Sale - 320
Capture - 330
Refund - 340
Chargeback - 350
Reversal - 360
SaleComplete - 370
SaleAdjust - 380
TipAdjust - 390
Sale+Cash - 400
Cashback - 410
Void - 420
Release - 430
Cashwithdrawal - 440
Awaiting Confirmation - 450 | | transaction_time optional | Date | Transaction Time | | subscription_id optional | Numeric | subscription id if enabled subscription | | subscription_next_rundate optional | Date | Next subscription date if subscription transaction | | campaign_id optional | Numeric | Campaign ID | | campaign_title optional | Alphanumeric | Campaign Title | | campaign_discount optional | Numeric | Campaign Discount | | charged_amount optional | Numeric | Amount Charged | | auth_id optional | Numeric | Authentication ID | | ipn_id optional | Numeric | IPN request ID | | transaction_payment_status required | Alphanumeric | Transaction payment status
Transaction Payment Status are: SUCCESS,INCOMPLETE,FAIL,INPROCESS,Mandate Approved,AUTHORIZE,AUTHORIZATION,CAPTURE,VOIDED,RISK | `SUCCESS` | | card_number optional | Char | Masked card number (length 12-19)\ | | card_country optional | Alphanumeric | Card issued country, this field is available in pg | | card_type optional | Alphanumeric | Type of Card Credit/Debit/Unknown | | card_scheme optional | Alphanumeric | Card issuer name, this field is available in pg | | emi_tenure optional | Numeric | EMI Tenure (length 2)
3 Months - 3
6 Months - 6
9 Months - 9
12 Months - 12
18 Months - 18
24 Months - 24 | | conversion_rate optional | Numeric | Conversion rate | | ap_SecureHash required | Alphanumeric | Secure hash generated by airpay | `1490948220` | | customvar optional | Alphanumeric | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in 'CustomVar' separated by the '|' symbol. Eg: 1234567|test|ABC1234 (length 120 max) | | original_currency optional | Numeric | Original currency | | original_fxrate optional | Numeric | Foreign currency exchange rate | | utr_no optional | Alphanumeric | Unique Transaction Reference No (length 16-22) | ## PHP ```php "; $username = ""; $password = ""; $secret = ""; $secretKey = ''; $data = array(); $data['orderid'] = "ORD123456"; $data['ap_transactionid'] = "12345678"; $data['rrn'] = "556677"; $privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password); $encdata = encrypt(json_encode($data), $secretKey); $checksum = checksum($data); $payload = [ 'merchant_id'=>$merchant_id, 'encdata' => $encdata, 'checksum' => $checksum, 'privatekey' => $privatekey ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://kraken.airpay.co.in/pay/v4/api/verify/?token=', CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $payload )); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result)->response; ?> ``` ### Success Response ```json HTTP/1.1 200 OK { "status_code":"200", "status":"success", "response_code":"00", "message":"Success", "data": { "transaction_payment_status":"SUCCESS", "merchant_id":"123356", "orderid":"ORDER123456", "ap_transactionid":"11314", "txn_mode":"LIVE", "chmod":"pg", "amount":"100.00", "currency_code":"356", "transaction_status":200, "message":"Success", "bank_response_msg":"Success", "customer_name":"John Doe", "customer_phone":"987654321", "customer_email":"customer@example.com", "transaction_type":320, "risk":"0", "customvar":"0", "token":"", "uid":"U123", "transaction_time":"30-11-2023 12:32:59", "surcharge_amount":"51.41", "card_scheme": "visa" "card_number": "462294XXXXXX3713" "card_uniquecode": "SLzvR9xdUuLvG0EgnqYxOqUA2g6gi7Fi" "bank_name": "anz bank" "card_country": "australia" "card_type": "Credit" "token":"446FVcGpJbhmlNH4KyFl2He8nblrfeUk" "ap_SecureHash":"1490948220" } } ``` ### Error Response ```json HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] } } ``` --- --- title: IPN Callback description: Receive instant payment notifications with transaction status updates. --- # IPN Callback Instant Payment Notifications (IPN), or callbacks, are the way we notify you of the transaction status updates. This API will call the merchant url and return mercid, aptransaction id, amount, transaction status, merchant name, billed amount, ap_securehash, transaction id, card issuer, currency code etc if successful. #### POST ``` https://examplemerchantwebsite.eg/callback ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/json` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | merchant_id required | Numeric | Merchant id of the Merchant in the airpay system | `45` | | ap_transactionid required | Numeric | airpay transaction reference number | `4324324` | | amount required | Numeric | Amount with two decimals | `1999.00` | | transaction_status required | Numeric | Transaction Payment Status
200 - Transaction is success
211 - Transaction is processing
400 - Transaction is failed
401 - Transaction will not register properly
402 - Payment that has not yet been processed
403 - Not received any call back from bank
405 - Transaction has bounced
503 - No records found | `200` | | merchant_name optional | Varchar | Merchant name | `Akkara Industries` | | wallet_balance optional | Numeric | Remaining balance in wallet (only in case of wallet transactions) | `2000.00` | | surcharge_amount optional | Numeric | Additional charges for particular transaction (sending only if applicable) | `5.00` | | billed_amount optional | Numeric | Billed amount | `1200.00` | | terminal_id optional | Numeric | Terminal Id (only in case of POS transactions) | | pos_entry_mode optional | Numeric | POS entry mode (only in case of POS transactions) | | cc_expiry optional | Numeric | Card Expiry (only in case of POS transactions) | | auth_id optional | Numeric
(`6`) | Authentication Code
In case of sale completion it is required. | | token optional | Alphanumeric | Token | | card_uniquecode optional | Alphanumeric | Card unique code (applicable only for pg,emi ) | | reason optional | Alphanumeric | Reason | | transaction_reason optional | Alphanumeric | Transaction reason | | card_country optional | Alphanumeric | Card country | | conversion_rate optional | Numeric | Conversion rate | | message required | Alphanumeric | Response message received from the payment gateway | `Transaction success` | | customer_vpa optional | Alphanumeric | VPA will return if channel is upi | | ap_SecureHash required | AlphaNumeric | Secure hash generated by airpay
If Channel is upi,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME. : . CUSTOMERVPA); Otherwise,
Hash generated by : crc32(TRANSACTIONID. : .APTRANSACTIONID. : .AMOUNT. : .TRANSACTIONSTATUS. : .MESSAGE. : .MID. : .USERNAME); | `1490948220` | | orderid required | Numeric | Merchant order ID (length 1-20) | | customvar optional | Alphanumeric | Customvar value received from you | | chmod required | Alphanumeric | Payment channel used to make payment
ppc - Prepaid card
pg - Payment gateway
nb - Netbanking
pgcc - Credit card
pgdc - Debit card
cash - Cash
emi - EMI
rtgs - RTGS
upi - UPI
btqr - Bharat QR
payltr - Pay later
va - Virtual account
enach - eNACH
remit - Remittance
wallet - Wallet
pos - POS
payltr - paylater
aloan - Aloan
aeps - AEPS | `pg` | | bank_name optional | Alphanumeric | Bank name used to do the transaction | | card_scheme optional | Alphanumeric | Card Issuer (length 1-50) | | customer_name optional | Alphanumeric | Customer Name | | customer_email optional | Email | Customer Email customer@example.com (length 6-50) | | customer_phone optional | Numeric | Customer Phone (length 8-15) | | currency_code optional | Numeric | Currency Code (length 3) | `356` | | risk optional | Numeric | Risk Transaction (0 or 1) | | transaction_type optional | Numeric | transaction_type
Mandate approved, Auth - 310
Sale - 320
Capture - 330
Refund - 340
Chargeback - 350
Reversal - 360
SaleComplete - 370
SaleAdjust - 380
TipAdjust - 390
Sale+Cash - 400
Cashback - 410
Void - 420
Release - 430
Cashwithdrawal - 440
Awaiting Confirmation - 450 | | transaction_payment_status required | Alphanumeric | Transaction Payment Status
SUCCESS
TRANSACTION IN PROCESS
FAILED
DROPPED
CANCEL
INCOMPLETE
BOUNCED
NO RECORDS | `SUCCESS` | | card_number optional | Chars | Masked card number (length 12-19) | | card_type optional | Alphanumeric | Card type (length 5) | | emi_tenure optional | Numeric | EMI Tenure (length 2)
3 Months - 3
6 Months - 6
9 Months - 9
12 Months - 12
18 Months - 18
24 Months - 24 | | transaction_time optional | Alphanumeric | Transaction datetime d-m-Y H:i:s (length 11) | | refund_id optional | Numeric | Refund transaction ID| 235235235 ### Success Response ```json IPN Callback Response { "merchant_id": 45, "ap_transactionid": 4324324, "amount": 1999.00, "transaction_status": 200, "message": "Success", "ap_SecureHash": , "orderid": "ORDER123", "customvar": , "chmod": "pg", "bank_name": "AXIS BANK", "customer_name": "John", "customer_email": "customer@example.com", "customer_phone": 9898989989898, "currency_code": 356, "risk": "0", "transaction_type": 310, "transaction_payment_status": "Authorize", "card_number": 989 ***** 999, "card_type": "cc", "transaction_time": "12-12-2023 10:10:12", "merchant_name": "Akkara Industries", "wallet_balance": 2000.00, "surcharge_amount": 5.00, "billed_amount": 1200.00, "rrn": 016153570198200, "token": "4efaf21c79864ec154babfc494f45fd1f65a570805084965", "card_unique_code": "c237b1ba20f5f6cbe32f47e6db1d1d53", "reason": "Fund", "card_country": "IND", "conversion_rate": 3.68, "refund_id" : 235235235 } ``` --- --- title: Initiate Payment description: Initiate payment requests on POS machines via the API. --- # Initiate Payment POS : Point of Sale is a device that is used to process transactions by merchant. This API will initiate Payment Request on the POS Machine through merchant's laptop or desktop if we pass the order id and amount of the payment. #### POST ``` https://kraken.airpay.co.in/airpay/ms/pos/api/create ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mercid required | String
(1-12) | Merchant Id | `767807` | | orderid required | String
(4-12) | Order Id | `100553` | | amount required | Number
(2-12) | Amount
Not required in the case​​ of save card. | `1.00` | | currency required | Number
(3) | Numeric currency code | `356` | | isocurrency required | String
(3) | ISO Currency code | `INR` | | customvar required | String
(1-250) | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in 'CustomVar' separated by the '|' symbol. | `1234567|test|ABC1234` | | uniqueid required | String
(4-10) | Unique ID is a unique identifier and have unique value | `011686` | | mobile required | Number
(10-15) | Mobile Number | `9XXXXXX157` | | buyerEmail required | String | Buyer email id | `xyz@yopmail.com` | | buyerPhone required | Number
(10-15) | Mobile number (length 10-15) | `9XXXXXX157` | | buyerFirstName required | String | Buyer first name | `RAJESH` | | buyerLastName required | String | Buyer last name | `BABU` | | privatekey required | String | Privatekey | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` | | checksum required | String | Checksum calculated | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code | `200` | | message required | Array | Status Message
200 - Success
502 - Failed
100 - Merchant Id not valid
112 - Invalid Order id
113 - Amount not valid | `Success` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/pos/api/create' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'buyerEmail=xyz@yopmail.com' \ --data-urlencode 'buyerPhone=9XXXXXX157' \ --data-urlencode 'buyerFirstName=RAJESH' \ --data-urlencode 'buyerLastName=BABU' \ --data-urlencode 'amount=1.00' \ --data-urlencode 'mobile=9XXXXXX157' \ --data-urlencode 'orderid=100553' \ --data-urlencode 'customvar=' \ --data-urlencode 'privatekey=91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --data-urlencode 'checksum=91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --data-urlencode 'mercid=767807' \ --data-urlencode 'currency=356' \ --data-urlencode 'isocurrency=INR' \ --data-urlencode 'uniqueid=011686' ``` ### Success Response ```json HTTP/1.1 200 OK { "status": ​200​, "order_id": "100553", "message": "order created successfully" } ``` ### Error Response ```json { "status": 500, "message": [] } ``` --- --- title: Transaction Response description: Retrieve payment status of a POS transaction via the API. --- # Transaction Response This API will return the Payment Status of a transaction from POS Machine to merchant's laptop/ desktop. We must pass merchant id, order id and unique id in request. If the request has valid details, we will get to know the status in terms of status code along with details related to the payment. #### POST ``` https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-response ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mercid required | String
(1-12) | Merchant Id | `71234` | | orderid required | String
(1-20) | Order ID | `102` | | uniqueid required | String
(4-10) | Unique ID is a unique identifier and have unique value | `91f5evhk72` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code
200 - Success
502 - Failed
100 - Merchant Id not valid
112 - Invalid Order id
113 - Amount not valid | `200` | | message required | Array | Status Message
TRANSACTIONID - Transaction id
APTRANSACTIONID - airpay transaction id
INVOICE_NO - Invoice number
MERCHANTID - Merchant id
TERMINALID - Terminal id
​CARDISSUER -​ Card issuer
​CHMOD -​ Payment channel used to make payment
​AMOUNT​ - Amount
​SURCHARGE -​ Surcharge (Additional charges for particular transaction)
​CURRENCYCODE -​ Code of currency
​TRANSACTIONSTATUS -​ Transaction status 200 - Success400 - Failed510 - Account not valid112 - Invalid Order id113 - Amount not valid
​MESSAGE -​ message
​RRN​ - 12 digit unique number to verify the transaction whether it is success or failure.
​AUTHCODE​ - Authentication Code (Bank code. 6 digits code)
​CUSTOMER - Customer name
​CUSTOMERPHONE​ - Customer phone number
​CARD_NUMBER​ - Card number
​CARDUNIQUECODE -​ Unique code of card
​CUSTOMEREMAIL -​ Customer email id
​TOKEN​ - Token
​TRANSACTIONTYPE​ - Transaction type 310 - Authorization320 - Sale330 - Capture340 - Refund350 - Chargeback420 - Void
​ISRISK - Risk transaction
​IPNID​ - IPN id (It is a number generated by payment gateway)
​ap_SecureHash -​ Secure hash generated by airpay | `message[]` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-response' \ --form 'mercid=71234' \ --form 'orderid=102' \ --form 'uniqueid=91f5evhk72' ``` ### Success Response ```json HTTP/1.1 200 OK { "status": 200, "message": { "TRANSACTIONID":"145290311", "APTRANSACTIONID": "007941", "INVOICE_NO": "000068", "MERCHANTID": "71234", "TERMINALID": "00702664", "​CARDISSUER​": "​mastercard​", "​CHMOD​": "​pos​", "​AMOUNT​": "​100.00​", "​SURCHARGE​": "​1.00​", "​CURRENCYCODE​": "​356​", "​TRANSACTIONSTATUS​": "​200​", "​MESSAGE​": "​Successful​", "​RRN​": "​000881088251​", "​AUTHCODE​": "​000687​", "​CUSTOMER​": "​Mathew George", "​CUSTOMERPHONE​": "​9XXXXXX064​", "​CARD_NUMBER​": "​524254xxxxxx381", "​CARDUNIQUECODE​"​: ​"", "​CUSTOMEREMAIL​": "xyz@example.com", "​TOKEN​"​: ​"", "​TRANSACTIONTYPE​": "​420​", "​ISRISK​": "​N​", "​IPNID​": "​005122​", "​ap_SecureHash​": "​0098130100​" } } ``` ### Error Response: Invalid ```json HTTP/1.1 112 Invalid { "status": 112, "message": {"ORDER_ID": ["Invalid Order id."] } } ``` ### Error Response: Not Found ```json HTTP/1.1 502 Not Found { "status": 502, "message": {"ORDER_ID": ["Order does not exist."] } } ``` --- --- title: Sale/Void cancel description: Cancel or void a POS transaction to reverse the deducted amount. --- # Sale/Void cancel A void transaction is a transaction that is cancelled by a merchant or vendor before it settles through a consumer's debit or credit card account. This API is used to make a transaction void -- it reverses the deducted amount based on original RRN. If the request has valid details, the sale will be cancelled. #### POST ``` https://kraken.airpay.co.in/airpay/ms/pos/api/cancel-txn ``` ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mercid required | String
(1-12) | Merchant Id | `18999` | | orderid required | String
(4-12) | Order Id | `180554` | | amount required | Number
(12,2) | Amount | `1.00` | | uniqueid required | String
(4-10) | Unique ID is a unique identifier and have unique value | `012686` | | postxntype required | Number
(2) | Post Transaction Type
01 - Sale/Purchase (Transaction Type is either sale or purchase)
08 - Void (Cancel the transaction)
07 - Pre auth (Holds the amount for some period of time)
10 - Sale completion (Use the preauth amount.This amount will be deducted from the account)
11 - Auth Release (Cancel the auth) | `01` | | originalrrn required | String
(12-20) | Unique number to verify the transaction whether it is success or failure
In case of void it is required.
In case of sale it is not required. | `12441412412` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code | `200` | | message required | String | Status Message | `message[]` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/pos/api/cancel-txn' \ --header 'content-type: application/x-www-form-urlencoded' \ --data-urlencode 'amount=1.00' \ --data-urlencode 'orderid=180554' \ --data-urlencode 'mercid=18999' \ --data-urlencode 'uniqueid=012686' \ --data-urlencode 'postxntype=01' \ --data-urlencode 'originalrrn=003511588415' ``` ### Success Response ```json HTTP/1.1 200 OK { "status": 200​, "message": [] } ``` ### Error Response ```json { "status": 502, "message": [] } ``` --- --- title: Bulk Transaction Detail description: Retrieve all transaction details done by the merchant through POS. --- # Bulk Transaction Detail This API to get all the transaction details done by the merchant through POS . We must pass merchant id, terminal id and unique id in request then we will get the data in terms of transaction id, amount, mobile no, transaction type, etc in the response. #### POST ``` https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-detail-bulk ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mercid required | String
(1-12) | Merchant Id | `71234` | | terminalid required | String
(8) | It is device specific.One device have only one Terminal ID | `00008582` | | uniqueid required | String
(4-10) | Unique ID is a unique identifier and have unique value | `000648` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code
200 - Success
502 - Failed | `200` | | MERCHANTID required | Number | Merchant id | `71234` | | UNIQUEID required | Number | Unique id | `000648` | | DATA required | Array | Transaction data | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-detail-bulk' \ --header 'content-type: application/x-www-form-urlencoded' \ --data-urlencode 'terminalid=00008582' \ --data-urlencode 'mercid=71234' \ --data-urlencode 'uniqueid=000648' ``` ### Success Response ```json HTTP/1.1 200 OK { "status": 200​, "MERCHANTID": 71234, "UNIQUEID": 000648, "DATA":[ "TRANSACTIONID": 001553, "TABLENO": , "AMOUNT": 1.00, "MOBILENO":9XXXXXX157, "TXNTYPE": 01, "EDITAMOUNT": 1 ] } ``` ### Error Response ```json { "status": 502, "message": [] } ``` --- --- title: Transaction Detail description: Get details of a specific POS transaction by reference ID. --- # Transaction Detail This API to get transaction details of a specific transaction. We must pass merchant id, terminal id, unique id, and reference id : used to identify the specific transaction in request. If the request has valid details, we will get all the details like status code, amount, order id, mobile, invoice no etc in response. #### POST ``` https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-detail ``` ## Header | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | `application/x-www-form-urlencodeds` | ## Request Body | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | mercid required | String
(1-12) | Merchant Id | `71234` | | terminalid required | String
(8) | It is device specific.One device have only one Terminal ID | `00008582` | | uniqueid required | String
(4-12) | Unique ID is a unique identifier and have unique value | `4000411027` | | referenceid required | String | Reference ID is orderid | `4000411027` | ## Success 200 | Parameter | Type Value | Description | Value Like | | --- | --- | --- | --- | | status required | Number | Status Code | `200` | | uniqueid required | Number | Unique id of the transaction | `012686` | | mercid required | Number | Merchant id | `71234` | | amount required | Number | Transaction amount | `1.01` | | orderid required | Number | Transaction order id | `000648` | | mobile required | Number | Mobile number used for the transaction | `9046207157` | | customvar required | String | Any information passed in the request, which can be received in the response exactly as it was sent. We can pass multiple data in 'CustomVar' separated by the '|' symbol. | `1234567|test|ABC1234` | | posmode required | Number | One of the transaction modes in POS like Authorization,Sale Completion etc. | `01` | | invoiceno required | Number | Invoice number | `01` | | editamount required | Number | Edit amount can have values 0,1. 1- User can change the amount, 0-User would not be able to change the amount. | `1` | ## Request Example ``` curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/pos/api/transaction-detail' \ --header 'content-type: application/x-www-form-urlencoded' \ --data-urlencode 'terminalid=00008582' \ --data-urlencode 'mercid=71234' \ --data-urlencode 'uniqueid=000648'\ --data-urlencode 'referenceid=4000411027' ``` ### Success Response ``` HTTP/1.1 200 OK "200||012686|71234|1.01|000648|9046207157||01|||||1" ``` ### Error Response ```json { "status": 500, "message": [] } ``` --- --- title: Delete Card description: Delete a saved tokenized card for a buyer. --- # Delete Card ## Delete Saved Card Remove a saved card from the token vault using the buyer's phone number and the card's tokenized identifier. #### POST ```http https://kraken.airpay.co.in/airpay/pay/v4/api/deletecard ``` ## Request Body | Parameter | Required | Type / Size | Description | Example | | --- | --- | --- | --- | --- | | `buyer_phone` | Yes | Numeric (8-15) | Buyer phone number associated with the saved card. | `99999999` | | `card_uniquecode` | Yes | Alphanumeric (3-64) | Unique tokenized identifier of the card to delete. | `abc123def456ghi789` | ## Success 200 ```json { "status_code": "200", "response_code": "00", "status": "success", "message": "Card deleted successfully", "data": [] } ``` ## Response Fields | Field | Type | Description | | --- | --- | --- | | `status_code` | String | Status code returned by the API. | | `response_code` | String | Internal response code indicating success or error. | | `status` | String | Response status, usually `success` or `failure`. | | `message` | String | Message describing the result. | | `data` | Array | Empty array for successful deletion. | --- --- title: Get Cards description: Fetch saved tokenized cards for a buyer. --- # Get Cards ## Get Saved Cards Retrieve tokenized cards saved for a buyer by phone number. This endpoint returns the buyer's stored card list with masked card data. #### POST ```http https://kraken.airpay.co.in/airpay/pay/v4/api/getcards ``` ## Request Body | Parameter | Required | Type / Size | Description | Example | | --- | --- | --- | --- | --- | | `buyer_phone` | Yes | Numeric (8-15) | Buyer phone number used to look up saved cards. | `99999999` | | `card_uniquecode` | No | Alphanumeric (3-64) | Unique tokenized card identifier. Use to select a specific stored card for payment. | `abc123def456ghi789` | ## Success 200 ```json { "status_code": "200", "response_code": "00", "status": "success", "message": "success", "data": [ { "card_uniquecode": "abc123def456ghi789", "card_number": "************1234", "card_owner": "John Doe", "card_type": "Credit", "card_company": "visa", "card_last4": "1234" } ] } ``` ## Response Fields | Field | Type | Description | | --- | --- | --- | | `status_code` | String | HTTP status code returned by the API. | | `response_code` | String | Internal response code indicating success or error. | | `status` | String | Status text, usually `success` or `failure`. | | `message` | String | Additional status message. | | `data` | Array | List of saved card objects. | | `card_uniquecode` | String | Tokenized identifier for the saved card. | | `card_number` | String | Masked card number. | | `card_owner` | String | Cardholder name. | | `card_type` | String | Card type, such as `Credit` or `Debit`. | | `card_company` | String | Card network, such as `visa` or `mastercard`. | | `card_last4` | String | Last 4 digits of the card number. | ---