---
agentTools:
  projectIndex: https://unpedash.readme.io/llms.txt
---

# Aadhar Pay

This page will help you get started with Aeps Api.

### Header

| Name         | Type   | Value                                      |
| :----------- | :----- | :----------------------------------------- |
| api-key      | string | (get it from api credentials in api panel) |
| content-type | string | application/json                           |
| accept       | string | application/json                           |

```php php
$header = [  
    'accept: application/json',  
    'api-key: XdWCmd0NF1ZVklnVPegOdL59WkFM7o4h91UYPAt1',  
    'content-type: application/json',  
];
```

### Request Body Parameters

| Name              | Type               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| :---------------- | :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| partner\_id       | integer            | (Get in from api panel you api parner id)                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| transactionType   | String             | CW                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| merchantLoginId   | AplhaNumeric       | Unique merchant code                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| adhaarNumber      | Number (12 Digits) | customer aadhar number to check linked bank account balance                                                                                                                                                                                                                                                                                                                                                                                                                  |
| mobileNumber      | Number (10 Digit)  | received in get otp api response                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| transactionAmount | Double             | Withdrawal amount                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| biodata           | String             | pass finger scan data as it is received via biometric scan device                                                                                                                                                                                                                                                                                                                                                                                                            |
| bankid            | Number             | Get from bank list api                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| apitxnid          | AlphaNumeric       | Unique reference id from client side                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| latitude          | String             | Geo Location Latitude of your merchant                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| longitude         | String             | Geo Location Longitude of your merchant                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| consent           | String             | Yes (I hereby confirm that Direct Benefits Transfer (DBT)/subsidies granted by the Government is received by me into the bank account. I carry out transactions through Business Correspondents of banks for withdrawal of money from my account/s and also for enquiry of balance under my account. I am submitting my Aadhaar details voluntarily to you for authentication purpose using my Aadhaar number/biometrics with UIDAI for the aforesaid purposes through AEPS) |

```php
$parameter = [
    "partner_id"      => "2",
    "transactionType" => "MS",
    "merchantLoginId" => "GGGG1234",
    "adhaarNumber" => "123456789012",
    "mobileNumber" => "123456789012",
    "bankid"    => "1",
  	"transactionAmount" => 100,
    "apitxnid"  => "QWWE0046G",
    "biodata"   => "ewrwersas",
    "latitude"  => "28.3033",
    "longitude" => "75.9098",
  	"consent"   => "Yes"
]

$body_json_string = json_encode($parameter);
```

### Request Body to be sent in Json

| Name | type   | Value                                               |
| :--- | :----- | :-------------------------------------------------- |
| body | String | Aes Encypted of Json Encoded Body Parameters String |

```php
$request_body = [
    "body" => "93A5D34BEED49E72621EAF6327DE9760F08B20ED38FAB9DE4060FF80F2393F45EC91BF63A8A71407DD2B3DE2F385D718090C7DF5D32455C80D6798719A7B562B6FCAEE44FF105982D8DDD2EAEA70E72FE26F7E792778B96F697407E5C6B0CB177A90CE38C35A1634383E6A764FB2F039301CD80088AF45218F905815A3FFCD958C13C87218C931C63D47ABCE4C2CC91BF0072B62F2C654EA89E8BF704A4243CA552EF40802953FD21BE7EFCDE560B889EAE33FD8EF00FBF88D8AB5490BFE4C0F3B54032A63487415742DA0EE77A1D12E773B356B3D08692079C136107E6810889F34B4C716937DFEA6726FB14FDC6361E99D752C67F6E4A1E12C71EA1E48D7A608306EEDEBCACCC726BB181E45955D78A7CF81CB07E7899D4C34979DFF2C2FA3424BF66C6DA7F795739EE1088D97141BD4AD6C642B3022F880AEDFA60FBDD1A5BC35C9D5A4122587BB1F3A7B886D9C47698C404BF861BAFBEF4BDF409DF0E8C37736BF8B7496E120A081470EF6AD158C4BC4D4FD73AF008FEAC122BD4AD4473D9A853F629D041A6D7313406E2EA9A1EE014E853BF7739353041F3FCDAA94D6930FDD184564FD40B9A6D21ECBF75D6CFA6E3FCF13B548969AC3DFA07910F36968"
];

$final_body = json_encode($request_body);
```

> 📘 Pidoption for initiate scan device
>
> `<?xml version="1.0"?><PidOptions ver="1.0"><Opts fCount="1" fType="2" iCount="0" pCount="0" format="0" pidVer="2.0" timeout="10000" posh="UNKNOWN" env="P" /><CustOpts></CustOpts></PidOptions>`

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Aeps Api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://unpay.in/tech/api/aeps"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key",
        "x-default": "XdWCmd0NF1ZVklnVPegOdL59WkFM7o4h91UYPAt1"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/aadhaarPay/request": {
      "post": {
        "summary": "Aadhar Pay",
        "description": "This page will help you get started with Aeps Api.",
        "operationId": "aadhar-pay",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "default": "93A5D34BEED49E72621EAF6327DE9760F08B20ED38FAB9DE4060FF80F2393F45EC91BF63A8A71407DD2B3DE2F385D7181D1DD92459BF64DCE9B0B1A7E2BA9057F741636A9981EFAFF5B4D7CBF0F91CA5143096142A0FB98B91F86BA50D5DB7176923FB5CC446D32144EC0EF59231521EA5EA05DD866C3CE7FA4ABA0656840DD3E9956EFB61620FB953EE67C174F0D9AD0D50ACFED79F4D358CA64DDF68242C657417370F0A80985E897492A2CCC6484C6446FF936B7ED9D3BFEBAE0D85FFDBC654A857DE5B55FE342C176CFED90566A168B2335A1E5A325D98C1F7304B80A6BD2428D92580A1072F2F49D37718B607A71232D754A4FF55049F586FBAB70D3B6AFB0918718052CB4CBFD2B6814FDE86B894E4E9BA65219A9CBC60C138BCE509CEE887343A35BFBF8B5CF407623A50F88540F455797ECB3E26E438C330DCC3E149"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Transaction Successfull": {
                    "value": "{\n    \"statuscode\" : \"TXN\",\n    \"message\" : \"Transaction Successfull\",\n    \"payid\"   : \"TEST\",\n    \"AccBalance\" : 0,\n    \"bankutr\" : \"1234567890\",\n    \"date\"    : \"2023-01-31 12:22:22\",\n    \"adhaarNumber\"  : \"XXXXXXXX1234\",\n    \"title\"   : \"Aadhaar Pay\",\n    \"status\"  : \"success\",\n    \"amount\"  : 100,\n    \"transactionType\" : \"AP\",\n    \"bank\"    : \"Icici Bank\",\n    \"statement\" : []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statuscode": {
                      "type": "string",
                      "example": "TXN"
                    },
                    "message": {
                      "type": "string",
                      "example": "Transaction Successfull"
                    },
                    "payid": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "AccBalance": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "bankutr": {
                      "type": "string",
                      "example": "1234567890"
                    },
                    "date": {
                      "type": "string",
                      "example": "2023-01-31 12:22:22"
                    },
                    "adhaarNumber": {
                      "type": "string",
                      "example": "XXXXXXXX1234"
                    },
                    "title": {
                      "type": "string",
                      "example": "Aadhaar Pay"
                    },
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "amount": {
                      "type": "integer",
                      "example": 100,
                      "default": 0
                    },
                    "transactionType": {
                      "type": "string",
                      "example": "AP"
                    },
                    "bank": {
                      "type": "string",
                      "example": "Icici Bank"
                    },
                    "statement": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Transaction Failed": {
                    "value": "{\n    \"statuscode\" : \"TXF\",\n    \"message\" : \"Transaction Failed\",\n    \"payid\"   : \"TEST\",\n    \"AccBalance\" : 0,\n    \"bankutr\" : \"1234567890\",\n    \"date\"    : \"2023-01-31 12:22:22\",\n    \"adhaarNumber\"  : \"XXXXXXXX1234\",\n    \"title\"   : \"Aadhaar Pay\",\n    \"status\"  : \"failed\",\n    \"amount\"  : 100,\n    \"transactionType\" : \"AP\",\n    \"bank\"    : \"Icici Bank\",\n    \"statement\" : []\n}"
                  },
                  "Result": {
                    "value": "{\n    \"statuscode\" : \"ERR\",\n    \"message\" : \"error reason\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Transaction Failed",
                      "type": "object",
                      "properties": {
                        "statuscode": {
                          "type": "string",
                          "example": "TXF"
                        },
                        "message": {
                          "type": "string",
                          "example": "Transaction Failed"
                        },
                        "payid": {
                          "type": "string",
                          "example": "TEST"
                        },
                        "AccBalance": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "bankutr": {
                          "type": "string",
                          "example": "1234567890"
                        },
                        "date": {
                          "type": "string",
                          "example": "2023-01-31 12:22:22"
                        },
                        "adhaarNumber": {
                          "type": "string",
                          "example": "XXXXXXXX1234"
                        },
                        "title": {
                          "type": "string",
                          "example": "Aadhaar Pay"
                        },
                        "status": {
                          "type": "string",
                          "example": "failed"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "transactionType": {
                          "type": "string",
                          "example": "AP"
                        },
                        "bank": {
                          "type": "string",
                          "example": "Icici Bank"
                        },
                        "statement": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statuscode": {
                          "type": "string",
                          "example": "ERR"
                        },
                        "message": {
                          "type": "string",
                          "example": "error reason"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "652a3f9c7d4e97005a9ec0cc:652a3f9c7d4e97005a9ec0f4"
}
```