> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# Authorize payout

POST https://api-sandbox.payabli.com/api/MoneyOut/authorize
Content-Type: application/json

Authorizes transaction for payout. Authorized transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to capture the transaction.

Reference: https://beta-docs.payabli.com/api-reference/moneyout/authorize-a-transaction-for-payout

## Authentication

- `requestToken` header (required) — API Key authentication via header

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Query parameters

- `allowDuplicatedBills` (boolean, optional, default: false) — When `true`, the authorization bypasses the requirement for unique bills, identified by vendor invoice number. This allows you to make more than one payout authorization for a bill, like a split payment.
- `doNotCreateBills` (boolean, optional, default: false) — When `true`, Payabli will not automatically create a bill for this payout transaction.
- `forceVendorCreation` (boolean, optional, default: false) — When `true`, the request creates a new vendor record, regardless of whether the vendor already exists.

### Headers

- `idempotencyKey` (string, optional) — _Optional but recommended_ A unique ID that you can include to prevent duplicating objects or transactions in the case that a request is sent more than once. This key is not generated in Payabli, you must generate it yourself.

### Body (application/json)

This endpoint expects an AuthorizePayoutBody.

- `entryPoint` (string, required) — The entrypoint identifier.
- `paymentDetails` (RequestOutAuthorizePaymentDetails, required) — Object containing payment details.
- `vendorData` (RequestOutAuthorizeVendorData, required) — Object containing vendor data.
- `accountId` (string, optional) — Custom identifier for payment connector.
- `invoiceData` (list of BillPayOutData, optional) — Array of bills associated to the transaction
- `orderDescription` (string, optional) — Text description of the transaction.
- `orderId` (string, optional) — Custom identifier for the transaction.
- `paymentMethod` (VendorPaymentMethod, optional) — Object containing details about the payment method to use for the payout.
- `source` (string, optional) — Custom identifier to indicate the transaction or request source.
- `subdomain` (string, optional) — Refers to the payment page identifier. If provided, then the transaction is linked to the payment page.
- `subscriptionId` (long, optional) — Payabli identifier of the subscription associated with the transaction.

## Response

### 200

Success

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `responseData` (PayabliApiResponse11ResponseData, optional)
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Errors

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 500 Internal Server Error

Internal API Error

- `any`

### 503 Service Unavailable Error

Database connection error

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `responseData` (map from string to any, optional) — The object containing the response data.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Types

### RequestOutAuthorizePaymentDetails

Object containing payment details.

- `checkNumber` (string, optional) — A check number, between 1 and 9999, passed as a string. This value can be used for fraud prevention with the positive pay service.
- `currency` (string, optional) — Currency code ISO-4217. If not code is provided the currency in the paypoint setting is taken. Default is **USD**.
- `serviceFee` (double, optional) — Service fee to be deducted from the total amount. This amount must be a number, percentages aren't accepted. If you are using a percentage-based fee schedule, you must calculate the value manually.
- `totalAmount` (double, optional) — Total amount to be charged. If a service fee is provided, then this amount should include the service fee.

### RequestOutAuthorizeVendorData

Object containing vendor data.

- `additionalData` (map from string to map from string to any, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. If you are using [custom identifiers](/developer-guides/entities-custom-identifiers), pass those in this object. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `address1` (string, optional) — Vendor's address
- `address2` (string, optional) — Additional line for vendor's address.
- `billingData` (BillingData, optional) — Object containing vendor's bank information.
- `city` (string, optional) — Vendor's city.
- `contacts` (list of Contacts, optional) — Array of objects describing the vendor's contacts.
- `country` (string, optional) — Vendor's country.
- `customerVendorAccount` (string, optional) — Account number of paypoint in the vendor side.
- `customField1` (string, optional)
- `customField2` (string, optional)
- `ein` (string, optional) — EIN/Tax ID for vendor.
- `email` (string, optional) — Vendor's email address. Required for vCard.
- `internalReferenceId` (long, optional) — Internal identifier for global vendor account.
- `locationCode` (string, optional) — Additional location code used to identify the vendor.
- `mcc` (string, optional) — Business Merchant Category Code (MCC). [This resource](https://github.com/greggles/mcc-codes/blob/main/mcc_codes.csv) lists MCC codes.
- `name1` (string, optional) — Primary name for vendor. Required for new vendor.
- `name2` (string, optional) — Secondary name for vendor.
- `payeeName1` (string, optional) — Alternative name used to receive paper check.
- `payeeName2` (string, optional) — Alternative name used to receive paper check.
- `paymentMethod` (VendorPaymentMethod, optional) — Object containing details about the payment method to use for the payout.
- `phone` (string, optional) — Vendor's phone number. Phone number can't contain non-digit characters like hyphens or parentheses.
- `remitAddress1` (string, optional) — Remittance address. Used for mailing paper checks.
- `remitAddress2` (string, optional) — Remittance address additional line. Used for mailing paper checks.
- `remitCity` (string, optional) — Remittance address city. Used for mailing paper checks.
- `remitCountry` (string, optional) — Remittance address country. Used for mailing paper checks.
- `remitState` (string, optional) — Remittance address state. Used for mailing paper checks.
- `remitZip` (string, optional) — Remittance address ZIP code. Used for mailing paper checks.
- `state` (string, optional) — Vendor's state. Must be a 2 character state code.
- `vendorId` (integer, optional) — Payabli identifier for vendor record. Required when `vendorNumber` isn't included.
- `vendorNumber` (string, optional) — Custom number identifying the vendor. Must be unique in paypoint.
- `vendorStatus` (integer, optional) — Vendor's status. Allowed status: - 0 Inactive - 1 Active
- `zip` (string, optional) — Vendor's zip code.

### BillPayOutData

- `AccountingField1` (string, optional) — Optional custom field.
- `AccountingField2` (string, optional) — Optional custom field.
- `AdditionalData` (string, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `attachments` (list of FileContent, optional) — Bill image attachment. Send the bill image as Base64-encoded string, or as a publicly-accessible link. For full details on using this field with a payout authorization, see [the documentation](/developer-guides/pay-out-manage-payouts).
- `billId` (long, optional) — Bill ID in Payabli.
- `comments` (string, optional) — Any comments about bill. **For managed payouts, this field has a limit of 100 characters**.
- `dueDate` (date, optional) — Bill due date in format YYYY-MM-DD or MM/DD/YYYY.
- `invoiceDate` (date, optional) — Bill date in format YYYY-MM-DD or MM/DD/YYYY.
- `invoiceNumber` (string, optional) — Custom number identifying the bill. Must be unique in paypoint. **Required** for new bill and when `billId` is not provided.
- `netAmount` (string, optional) — Net Amount owed in bill. Required when adding a bill.
- `Terms` (string, optional) — Description of payment terms.

### VendorPaymentMethod

Object containing details about the payment method to use for the payout.

- `method` (enum, optional) — Payment method to use for payout. Leave empty for managed payables.
  - Allowed values: `managed`, `vcard`, `ach`, `check`

### PayabliApiResponse11ResponseData

- `CustomerId` (long, optional) — Payabli-generated unique ID of vendor owner of transaction. It will return `0`` if the transaction was not assigned to an existing vendor or no vendor was created.
- `ReferenceId` (string, optional) — The transaction identifier in Payabli.
- `ResultCode` (integer, optional) — Result code for the operation. Value 1 indicates a successful operation, values 2 and 3 indicate errors. A value of 10 indicates that an operation has been initiated and is pending.
- `ResultText` (string, optional) — Text describing the result. If **ResultCode** = 1, will return 'Authorized'. If **ResultCode** = 2 or 3, will contain the reason for the decline.

### BillingData

- `accountNumber` (string, optional) — Account number for bank account.
- `bankAccountFunction` (integer, optional) — Describes whether the bank account is used for deposits or withdrawals in Payabli: - `0`: Deposit - `1`: Withdrawal - `2`: Deposit and withdrawal
- `bankAccountHolderName` (string, optional) — The accountholder's name.
- `bankAccountHolderType` (enum, optional) — Describes whether the bank is a personal or business account.
  - Allowed values: `Personal`, `Business`
- `bankName` (string, optional) — Name of bank for account.
- `id` (integer, optional) — The bank's ID in Payabli.
- `routingAccount` (string, optional) — Routing number of bank account.
- `typeAccount` (enum, optional) — Type of bank account: Checking or Savings.
  - Allowed values: `Checking`, `Savings`

### Contacts

- `contactEmail` (string, optional) — Contact email address.
- `contactName` (string, optional) — Contact name.
- `contactPhone` (string, optional) — Contact phone number.
- `contactTitle` (string, optional) — Contact title.

### FileContent

Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB.

- `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB.
- `filename` (string, optional) — The name of the attached file.
- `ftype` (enum, optional) — The MIME type of the file (if content is provided)
  - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt`
- `furl` (string, optional) — Optional url provided to show or download the file remotely

## Examples

### AuthorizePayout

**Request**

```json
{
  "entryPoint": "48acde49",
  "paymentDetails": {
    "totalAmount": 47
  },
  "vendorData": {
    "vendorNumber": "7895433"
  },
  "invoiceData": [
    {
      "billId": 123
    }
  ],
  "orderDescription": "Window Painting",
  "paymentMethod": {
    "method": "managed"
  }
}
```

**Response**

```json
{
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseData": {
    "ReferenceId": "10-99",
    "ResultCode": 1,
    "ResultText": "Authorized"
  },
  "responseText": "Success"
}
```

**SDK Code**

```python AuthorizePayout
import requests

url = "https://api-sandbox.payabli.com/api/MoneyOut/authorize"

payload = {
    "entryPoint": "48acde49",
    "paymentDetails": { "totalAmount": 47 },
    "vendorData": { "vendorNumber": "7895433" },
    "invoiceData": [{ "billId": 123 }],
    "orderDescription": "Window Painting",
    "paymentMethod": { "method": "managed" }
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript AuthorizePayout
const url = 'https://api-sandbox.payabli.com/api/MoneyOut/authorize';
const options = {
  method: 'POST',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entryPoint":"48acde49","paymentDetails":{"totalAmount":47},"vendorData":{"vendorNumber":"7895433"},"invoiceData":[{"billId":123}],"orderDescription":"Window Painting","paymentMethod":{"method":"managed"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go AuthorizePayout
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/MoneyOut/authorize"

	payload := strings.NewReader("{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby AuthorizePayout
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyOut/authorize")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java AuthorizePayout
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyOut/authorize")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}")
  .asString();
```

```php AuthorizePayout
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/MoneyOut/authorize', [
  'body' => '{
  "entryPoint": "48acde49",
  "paymentDetails": {
    "totalAmount": 47
  },
  "vendorData": {
    "vendorNumber": "7895433"
  },
  "invoiceData": [
    {
      "billId": 123
    }
  ],
  "orderDescription": "Window Painting",
  "paymentMethod": {
    "method": "managed"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp AuthorizePayout
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/MoneyOut/authorize");
var request = new RestRequest(Method.POST);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift AuthorizePayout
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "entryPoint": "48acde49",
  "paymentDetails": ["totalAmount": 47],
  "vendorData": ["vendorNumber": "7895433"],
  "invoiceData": [["billId": 123]],
  "orderDescription": "Window Painting",
  "paymentMethod": ["method": "managed"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyOut/authorize")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### AuthorizePayoutwImage

**Request**

```json
{
  "entryPoint": "48acde49",
  "paymentDetails": {
    "totalAmount": 47
  },
  "vendorData": {
    "vendorNumber": "7895433"
  },
  "invoiceData": [
    {
      "attachments": [
        {
          "filename": "bill.pdf",
          "ftype": "pdf",
          "furl": "https://example.com/bill.pdf"
        }
      ],
      "billId": 123
    }
  ],
  "orderDescription": "Window Painting",
  "paymentMethod": {
    "method": "managed"
  }
}
```

**Response**

```json
{
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseData": {
    "ReferenceId": "129-219",
    "ResultCode": 1,
    "ResultText": "Authorized"
  },
  "responseText": "Success"
}
```

**SDK Code**

```python AuthorizePayoutwImage
import requests

url = "https://api-sandbox.payabli.com/api/MoneyOut/authorize"

payload = {
    "entryPoint": "48acde49",
    "paymentDetails": { "totalAmount": 47 },
    "vendorData": { "vendorNumber": "7895433" },
    "invoiceData": [
        {
            "attachments": [
                {
                    "filename": "bill.pdf",
                    "ftype": "pdf",
                    "furl": "https://example.com/bill.pdf"
                }
            ],
            "billId": 123
        }
    ],
    "orderDescription": "Window Painting",
    "paymentMethod": { "method": "managed" }
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript AuthorizePayoutwImage
const url = 'https://api-sandbox.payabli.com/api/MoneyOut/authorize';
const options = {
  method: 'POST',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entryPoint":"48acde49","paymentDetails":{"totalAmount":47},"vendorData":{"vendorNumber":"7895433"},"invoiceData":[{"attachments":[{"filename":"bill.pdf","ftype":"pdf","furl":"https://example.com/bill.pdf"}],"billId":123}],"orderDescription":"Window Painting","paymentMethod":{"method":"managed"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go AuthorizePayoutwImage
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/MoneyOut/authorize"

	payload := strings.NewReader("{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"attachments\": [\n        {\n          \"filename\": \"bill.pdf\",\n          \"ftype\": \"pdf\",\n          \"furl\": \"https://example.com/bill.pdf\"\n        }\n      ],\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby AuthorizePayoutwImage
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyOut/authorize")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"attachments\": [\n        {\n          \"filename\": \"bill.pdf\",\n          \"ftype\": \"pdf\",\n          \"furl\": \"https://example.com/bill.pdf\"\n        }\n      ],\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java AuthorizePayoutwImage
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyOut/authorize")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"attachments\": [\n        {\n          \"filename\": \"bill.pdf\",\n          \"ftype\": \"pdf\",\n          \"furl\": \"https://example.com/bill.pdf\"\n        }\n      ],\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}")
  .asString();
```

```php AuthorizePayoutwImage
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/MoneyOut/authorize', [
  'body' => '{
  "entryPoint": "48acde49",
  "paymentDetails": {
    "totalAmount": 47
  },
  "vendorData": {
    "vendorNumber": "7895433"
  },
  "invoiceData": [
    {
      "attachments": [
        {
          "filename": "bill.pdf",
          "ftype": "pdf",
          "furl": "https://example.com/bill.pdf"
        }
      ],
      "billId": 123
    }
  ],
  "orderDescription": "Window Painting",
  "paymentMethod": {
    "method": "managed"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp AuthorizePayoutwImage
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/MoneyOut/authorize");
var request = new RestRequest(Method.POST);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entryPoint\": \"48acde49\",\n  \"paymentDetails\": {\n    \"totalAmount\": 47\n  },\n  \"vendorData\": {\n    \"vendorNumber\": \"7895433\"\n  },\n  \"invoiceData\": [\n    {\n      \"attachments\": [\n        {\n          \"filename\": \"bill.pdf\",\n          \"ftype\": \"pdf\",\n          \"furl\": \"https://example.com/bill.pdf\"\n        }\n      ],\n      \"billId\": 123\n    }\n  ],\n  \"orderDescription\": \"Window Painting\",\n  \"paymentMethod\": {\n    \"method\": \"managed\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift AuthorizePayoutwImage
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "entryPoint": "48acde49",
  "paymentDetails": ["totalAmount": 47],
  "vendorData": ["vendorNumber": "7895433"],
  "invoiceData": [
    [
      "attachments": [
        [
          "filename": "bill.pdf",
          "ftype": "pdf",
          "furl": "https://example.com/bill.pdf"
        ]
      ],
      "billId": 123
    ]
  ],
  "orderDescription": "Window Painting",
  "paymentMethod": ["method": "managed"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyOut/authorize")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```