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

# Upi Payout

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

> All Parameters values are mandatory

| Name        | Type    | Value                                     |
| :---------- | :------ | :---------------------------------------- |
| partner\_id | integer | (Get in from api panel you api parner id) |
| mode        | String  | UPI                                       |
| name        | String  | Account Holder Name                       |
| vpa         | String  | Upi address                               |
| mobile      | Number  | Customer Mobile number                    |
| amount      | Double  | Transfer amount                           |
| webhook     | String  | webhook url for get status of transaction |
| latitude    | String  | Location Latitude                         |
| longitude   | String  | Location Longitude                        |
| apitxnid    | String  | Unique merchant transaction id            |

```php
$parameter = [
    'partner_id' => '2'
    'mode'     => 'UPI',
    'name'     => 'Test',
    'vpa'       => 'adc@upi',
    'mobile'   => '9999999999',
    'amount'   => '100',
    'webhook'  => 'https://domain.com',
    'latitude' => '11.2222',
    'longitude'=> '11.2222',
    'apitxnid' => 'TXN12345'
];

$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" => "4CE81403397C441C3DEB0EEFE28E79910EF0B4FA3BF6574DC94196DF436C10CF"
];

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

### Response Body Parameters

| Name       | type   | Condition         | Possible Value               |
| :--------- | :----- | :---------------- | :--------------------------- |
| statuscode | String | All Time          | TXN / TUP / TXF / ERR        |
| message    | String | All Time          | Transaction Response Message |
| txnid      | String | In Case TXN / TXF | Payout reference id          |
| refno      | String | In Case TXN       | Payout Bank Reference        |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Upi Payout",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://unpay.in/tech/api/upipayout/order"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/create": {
      "post": {
        "summary": "Upi Payout",
        "description": "",
        "operationId": "order-create-upi",
        "parameters": [
          {
            "name": "api-key",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "bucykpifxahgnnhdhrbxfqbqqzuibaezasdasdadasdas"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "default": "4CE81403397C441C3DEB0EEFE28E79910EF0B4FA3BF6574DC94196DF436C10CF",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"statuscode\": \"ERR\",\n  \"message\": \"Unauthorize Api Key or Partner Id\"\n}"
                  },
                  "Transaction Failed": {
                    "value": "{\n  \"statuscode\": \"TXF\",\n  \"message\": \"Failed Reason\",\n  \"txnid\": \"TXn12233\"\n  \"refno\" : \"300\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statuscode": {
                      "type": "string",
                      "example": "ERR"
                    },
                    "message": {
                      "type": "string",
                      "example": "Unauthorize Api Key or Partner Id"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "67442394761b8d00788531a6:67442236b64acf002fb7b508"
}
```