## Integration Methods
### Iframe Kits
The Airpay checkout page loads inside an iframe embedded in your site. The backend generates a signed request, passes it to the iframe, and handles the callback on return.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/iframe-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_iframe_v4.rar) |
| Java | [View guide](/v4/integration-kits/iframe-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_iframe_v4.zip) |
### Inline Kits
The Airpay payment form renders inline within your own page. The kit handles tokenisation and communicates with the Airpay API on the client side, while the backend signs the request and verifies the response.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_inline_v4.rar) |
| Java | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_inline_v4.zip) |
| VB.NET | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_vb_net_inline_v4_inr.zip) |
| C# (.NET) | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_csharp_net_v4.zip) |
### Server-Side SDK
Full backend integration. The server constructs and signs the payment request, calls the Airpay API directly, and processes the response. No iframe or client-side JS required.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_inline_v4.rar) |
| JavaScript | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_js_v4.rar) |
| Node.js | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_nodejs_v4.rar) |
| Ruby on Rails | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ruby_v4.rar) |
| React.js | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_reactjs_v4.rar) |
| React Native | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_react_native_serverSDK_v4.zip) |
| Angular | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_angular_v4.rar) |
| VB.NET | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_vb_net_v4.zip) |
| Python | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_python_v4.rar) |
| Java | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_v4.zip) |
| C# (.NET) | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_csharp_net_v4.zip) |
## Prerequisites
- Active Airpay merchant account
- Merchant ID, Username, Password, and Secret Key from the Airpay dashboard
- For live payments: switch to Live Mode API Keys in the dashboard
- All kits support INR transactions and standard Airpay payment methods: Card, UPI, Net Banking, Wallets
---
---
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!
### Iframe Kits
The Airpay checkout page loads inside an iframe embedded in your site. The backend generates a signed request, passes it to the iframe, and handles the callback on return.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/iframe-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_iframe_v4.rar) |
| Java | [View guide](/v4/integration-kits/iframe-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_iframe_v4.zip) |
---
---
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!
### Inline Kits
The Airpay payment form renders inline within your own page. The kit handles tokenisation and communicates with the Airpay API on the client side, while the backend signs the request and verifies the response.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_inline_v4.rar) |
| Java | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_inline_v4.zip) |
| VB.NET | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_vb_net_inline_v4_inr.zip) |
| C# (.NET) | [View guide](/v4/integration-kits/inline-kits/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_csharp_net_v4.zip) |
---
---
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!
### Server-Side SDK
Full backend integration. The server constructs and signs the payment request, calls the Airpay API directly, and processes the response. No iframe or client-side JS required.
| Language | Guide | Download |
|---|---|---|
| PHP | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_php_v4.rar) |
| JavaScript | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_js_v4.rar) |
| Node.js | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_nodejs_v4.rar) |
| Ruby on Rails | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ruby_v4.rar) |
| React.js | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_reactjs_v4.rar) |
| React Native | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_react_native_serverSDK_v4.zip) |
| Angular | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_angular_v4.rar) |
| VB.NET | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_vb_net_v4.zip) |
| Python | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_python_v4.rar) |
| Java | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_java_v4.zip) |
| C# (.NET) | [View guide](/v4/integration-kits/server-side-sdk/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_csharp_net_v4.zip) |
---
---
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**
## SDK Details
Each Airpay mobile SDK follows the same integration flow:
1. Add the SDK dependency to your project.
2. Initialize the SDK with your Merchant ID, API key, and secret.
3. Call the payment method with order details (amount, currency, customer info).
4. Handle the success, failure, and cancellation callbacks.
All SDKs support INR transactions and the following payment methods: Credit/Debit Card, UPI, Net Banking, Wallets.
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| Android | Kotlin, Java | Android 5.0 (API 21) | [View guide](/v4/mobile-kits/android/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_android_inr_v4.zip) |
| iOS | Swift, Objective-C | iOS 12.0 | [View guide](/v4/mobile-kits/ios/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ios_inr_v4.zip) |
| Flutter | Dart | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/flutter/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_flutter_inr_v4.zip) |
| React Native | JavaScript, TypeScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/react-native/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_react_native_mobileSDK_v4.zip) |
| Cordova | JavaScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/cordova/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_cordova_inr_v4.zip) |
| Ionic Capacitor | TypeScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/ionic-capacitor/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ionic_capacitor_inr_v4.zip) |
## Prerequisites
- Active Airpay merchant account
- Merchant ID, Username, Password, and Secret Key from the Airpay dashboard
- For live payments: switch to Live Mode API Keys in the dashboard
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| Android | Kotlin, Java | Android 5.0 (API 21) | [View guide](/v4/mobile-kits/android/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_android_inr_v4.zip) |
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| Flutter | Dart | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/flutter/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_flutter_inr_v4.zip) |
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| iOS | Swift, Objective-C | iOS 12.0 | [View guide](/v4/mobile-kits/ios/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ios_inr_v4.zip) |
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| Ionic Capacitor | TypeScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/ionic-capacitor/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_ionic_capacitor_inr_v4.zip) |
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| Cordova | JavaScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/cordova/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_cordova_inr_v4.zip) |
---
---
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!
| Platform | Language | Min OS Version | Guide | Download |
|---|---|---|---|---|
| React Native | JavaScript, TypeScript | Android 5.0 / iOS 12.0 | [View guide](/v4/mobile-kits/react-native/) | [Download](https://docs.airpay.co.in/kits/v4/airpay_react_native_mobileSDK_v4.zip) |
---
---
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.

#### 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.

#### 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. |
---