> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Create vendor

POST https://api-sandbox.payabli.com/api/Vendor/single/{entry}
Content-Type: application/json

Creates a vendor in an entrypoint.

Reference: https://docs.payabli.com/developers/api-reference/vendor/create-vendor

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

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

## Request

### Path parameters

- `entry` (string, required) — Entrypoint identifier.

### Body (application/json)

- `vendorNumber` (string, optional) — Custom number identifying the vendor. Must be unique in paypoint. Can't be blank.
- `AdditionalData` (map from string to 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. If you are using [custom identifiers](/developers/developer-guides/entities-customers), pass those in this object. Max length for a value is 100 characters. ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `address1` (string, optional) — Vendor's street address. If any address field is provided, this field is required along with `city`, `state`, and `zip`. Allowed characters are letters, numbers, spaces, and `. , For a PO Box address, include only the PO Box in this field, for example `PO Box 29652`. Put the rest of the address, such as a department number, in `address2`.
- `address2` (string, optional) — Additional line for vendor's address, such as a suite or unit number. Always optional. For a PO Box address, this field holds the part of the address that follows the PO Box, for example `Dept# 880662`.
- `billingData` (object, optional) — Object containing vendor's bank information.
  - `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`
- `city` (string, optional) — Vendor's city. Required if any address field is provided.
- `contacts` (list of object, optional) — Array of objects describing the vendor's contacts.
  - `contactEmail` (string, optional) — Contact email address.
  - `contactName` (string, optional) — Contact name.
  - `contactPhone` (string, optional) — Contact phone number.
  - `contactTitle` (string, optional) — Contact title.
  - `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" } } ```
- `country` (string, optional) — Vendor's country. Must be `US` or `CA`. Defaults to `US` if not provided.
- `customField1` (string, optional) — Custom field 1 for vendor
- `customField2` (string, optional) — Custom field 2 for vendor
- `customerVendorAccount` (string, optional) — Account number of paypoint in the vendor side.
- `ein` (string, optional) — EIN/Tax ID for vendor. Must be nine digits formatted as `XX-XXXXXXX` (for example, `12-3456789`).
- `email` (string, optional) — Vendor's email address. Required for vCard.
- `internalReferenceId` (long, optional) — Internal identifier for global vendor account.
- `locationCode` (string, optional) — A location code used to identify the vendor's location.
- `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. If provided, allowed characters are the same as the `name1` field.
- `payeeName1` (string, optional) — Alternative name used to receive paper check.
- `payeeName2` (string, optional) — Alternative name used to receive paper check.
- `paymentMethod` (string, optional) — The vendor's preferred payment method. Can be one of: - `managed` — Managed payment method - `vcard` — Virtual card payment method - `check` — Check payment method - `ach` — ACH payment method
- `phone` (string, optional) — Vendor's phone number. Phone number can't contain non-digit characters like hyphens or parentheses.
- `remitAddress1` (string, optional) — Remittance street address. Used for mailing paper checks. Required if any remittance address field is provided. For a PO Box address, include only the PO Box in this field, for example `PO Box 29652`. Put the rest of the address, such as a department number, in `remitAddress2`.
- `remitAddress2` (string, optional) — Remittance address additional line, such as a suite or unit number. Used for mailing paper checks. Always optional. For a PO Box address, this field holds the part of the address that follows the PO Box, for example `Dept# 880662`.
- `remitCity` (string, optional) — Remittance address city. Used for mailing paper checks. Required if any remittance address field is provided.
- `remitCountry` (string, optional) — Remittance address country. Used for mailing paper checks. Must be `US` or `CA`. Defaults to `US` if not provided.
- `remitEmail` (string, optional) — Remittance email address. Used for sending virtual cards and other information about payouts.
- `remitState` (string, optional) — Remittance address state or province. Used for mailing paper checks. Required if any remittance address field is provided. Must be a valid US state or Canadian province abbreviation.
- `remitZip` (string, optional) — Remittance address ZIP or postal code. Used for mailing paper checks. Required if any remittance address field is provided. For US addresses, use five digits or ZIP+4 format.
- `state` (string, optional) — Vendor's state or province. Required if any address field is provided. Must be a valid US state abbreviation (such as `CA`, `NY`) or Canadian province abbreviation (such as `ON`, `BC`), depending on the `country` value.
- `vendorStatus` (integer, optional) — Vendor's status. Allowed values: - `0` Inactive - `1` Active - `-99` Deleted
- `zip` (string, optional) — Vendor's ZIP or postal code. Required if any address field is provided. For US addresses, use five digits (`12345`) or ZIP+4 format (`12345-6789`).
- `defaultMethodId` (string, optional) — Identifier for the vendor's default stored payment method.
- `attachment` (object, optional) — PDF invoice attachment for AI-powered vendor enrichment. When this feature is enabled and you include an attachment, the invoice is scanned and extracted vendor information is merged into the request. Fields in the request body take precedence over extracted data. If the scan fails, vendor creation proceeds with the original request data. See the [vendor enrichment guide](/guides/pay-out-vendor-enrichment-overview) for details. Contact Payabli to enable this feature.
  - `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.

## Response

### 200

Success

- `responseText` (string, required) — Response text for operation: 'Success' or 'Declined'.
- `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.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (integer, optional) — If the request was successful, this field contains the identifier for the vendor.

## Examples

**Request**

```json
{
  "vendorNumber": "VEN-123",
  "address1": "123 Ocean Drive",
  "address2": "Suite 400",
  "billingData": {
    "accountNumber": "123123123",
    "bankAccountFunction": 0,
    "bankAccountHolderName": "Gruzya Adventure Outfitters LLC",
    "bankAccountHolderType": "Business",
    "bankName": "Country Bank",
    "id": 123,
    "routingAccount": "123123123",
    "typeAccount": "Checking"
  },
  "city": "Miami",
  "contacts": [
    {
      "contactEmail": "example@email.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    }
  ],
  "country": "US",
  "customerVendorAccount": "A-37622",
  "ein": "12-3456789",
  "email": "example@email.com",
  "internalReferenceId": 123,
  "locationCode": "MIA123",
  "mcc": "7777",
  "name1": "Herman's Coatings and Masonry",
  "name2": "<string>",
  "payeeName1": "<string>",
  "payeeName2": "<string>",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "zip": "33139"
}
```

**Response**

```json
{
  "responseText": "Success",
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 3890
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.vendor.addVendor("8cfec329267", {
        vendorNumber: "VEN-123",
        address1: "123 Ocean Drive",
        address2: "Suite 400",
        billingData: {
            accountNumber: "123123123",
            bankAccountFunction: 0,
            bankAccountHolderName: "Gruzya Adventure Outfitters LLC",
            bankAccountHolderType: "Business",
            bankName: "Country Bank",
            id: 123,
            routingAccount: "123123123",
            typeAccount: "Checking",
        },
        city: "Miami",
        contacts: [
            {
                contactEmail: "example@email.com",
                contactName: "Herman Martinez",
                contactPhone: "3055550000",
                contactTitle: "Owner",
            },
        ],
        country: "US",
        customerVendorAccount: "A-37622",
        ein: "12-3456789",
        email: "example@email.com",
        internalReferenceId: 123,
        locationCode: "MIA123",
        mcc: "7777",
        name1: "Herman's Coatings and Masonry",
        name2: "<string>",
        payeeName1: "<string>",
        payeeName2: "<string>",
        paymentMethod: "managed",
        phone: "5555555555",
        remitAddress1: "123 Walnut Street",
        remitAddress2: "Suite 900",
        remitCity: "Miami",
        remitCountry: "US",
        remitState: "FL",
        remitZip: "31113",
        state: "FL",
        vendorStatus: 1,
        zip: "33139",
    });
}
main();

```

```python
from payabli import payabli, BillingData, Contacts

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.vendor.add_vendor(
    entry="8cfec329267",
    vendor_number="VEN-123",
    address_1="123 Ocean Drive",
    address_2="Suite 400",
    billing_data=BillingData(
        account_number="123123123",
        bank_account_function=0,
        bank_account_holder_name="Gruzya Adventure Outfitters LLC",
        bank_account_holder_type="Business",
        bank_name="Country Bank",
        id=123,
        routing_account="123123123",
        type_account="Checking",
    ),
    city="Miami",
    contacts=[
        Contacts(
            contact_email="example@email.com",
            contact_name="Herman Martinez",
            contact_phone="3055550000",
            contact_title="Owner",
        )
    ],
    country="US",
    customer_vendor_account="A-37622",
    ein="12-3456789",
    email="example@email.com",
    internal_reference_id=123,
    location_code="MIA123",
    mcc="7777",
    name_1="Herman\'s Coatings and Masonry",
    name_2="<string>",
    payee_name_1="<string>",
    payee_name_2="<string>",
    payment_method="managed",
    phone="5555555555",
    remit_address_1="123 Walnut Street",
    remit_address_2="Suite 900",
    remit_city="Miami",
    remit_country="US",
    remit_state="FL",
    remit_zip="31113",
    state="FL",
    vendor_status=1,
    zip="33139",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.types.BankAccountHolderType;
import io.github.payabli.api.types.BillingData;
import io.github.payabli.api.types.Contacts;
import io.github.payabli.api.types.TypeAccount;
import io.github.payabli.api.types.VendorData;
import java.util.Arrays;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.vendor().addVendor(
            "8cfec329267",
            VendorData
                .builder()
                .vendorNumber("VEN-123")
                .address1("123 Ocean Drive")
                .address2("Suite 400")
                .billingData(
                    BillingData
                        .builder()
                        .accountNumber("123123123")
                        .bankAccountFunction(0)
                        .bankAccountHolderName("Gruzya Adventure Outfitters LLC")
                        .bankAccountHolderType(BankAccountHolderType.BUSINESS)
                        .bankName("Country Bank")
                        .id(123)
                        .routingAccount("123123123")
                        .typeAccount(TypeAccount.CHECKING)
                        .build()
                )
                .city("Miami")
                .contacts(
                    Arrays.asList(
                        Contacts
                            .builder()
                            .contactEmail("example@email.com")
                            .contactName("Herman Martinez")
                            .contactPhone("3055550000")
                            .contactTitle("Owner")
                            .build()
                    )
                )
                .country("US")
                .customerVendorAccount("A-37622")
                .ein("12-3456789")
                .email("example@email.com")
                .internalReferenceId(123L)
                .locationCode("MIA123")
                .mcc("7777")
                .name1("Herman's Coatings and Masonry")
                .name2("<string>")
                .payeeName1("<string>")
                .payeeName2("<string>")
                .paymentMethod("managed")
                .phone("5555555555")
                .remitAddress1("123 Walnut Street")
                .remitAddress2("Suite 900")
                .remitCity("Miami")
                .remitCountry("US")
                .remitState("FL")
                .remitZip("31113")
                .state("FL")
                .vendorStatus(1)
                .zip("33139")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.vendor.add_vendor(
  entry: "8cfec329267",
  vendor_number: "VEN-123",
  address_1: "123 Ocean Drive",
  address_2: "Suite 400",
  billing_data: {
    account_number: "123123123",
    bank_account_function: 0,
    bank_account_holder_name: "Gruzya Adventure Outfitters LLC",
    bank_account_holder_type: "Business",
    bank_name: "Country Bank",
    id: 123,
    routing_account: "123123123",
    type_account: "Checking"
  },
  city: "Miami",
  contacts: [{
    contact_email: "example@email.com",
    contact_name: "Herman Martinez",
    contact_phone: "3055550000",
    contact_title: "Owner"
  }],
  country: "US",
  customer_vendor_account: "A-37622",
  ein: "12-3456789",
  email: "example@email.com",
  internal_reference_id: 123,
  location_code: "MIA123",
  mcc: "7777",
  name_1: "Herman's Coatings and Masonry",
  name_2: "<string>",
  payee_name_1: "<string>",
  payee_name_2: "<string>",
  payment_method: "managed",
  phone: "5555555555",
  remit_address_1: "123 Walnut Street",
  remit_address_2: "Suite 900",
  remit_city: "Miami",
  remit_country: "US",
  remit_state: "FL",
  remit_zip: "31113",
  state: "FL",
  vendor_status: 1,
  zip: "33139"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Vendor.AddVendorAsync(
            entry: "8cfec329267",
            request: new VendorData {
                VendorNumber = "VEN-123",
                Address1 = "123 Ocean Drive",
                Address2 = "Suite 400",
                BillingData = new BillingData {
                    AccountNumber = "123123123",
                    BankAccountFunction = 0,
                    BankAccountHolderName = "Gruzya Adventure Outfitters LLC",
                    BankAccountHolderType = BankAccountHolderType.Business,
                    BankName = "Country Bank",
                    Id = 123,
                    RoutingAccount = "123123123",
                    TypeAccount = TypeAccount.Checking
                },
                City = "Miami",
                Contacts = new List<Contacts>(){
                    new Contacts {
                        ContactEmail = "example@email.com",
                        ContactName = "Herman Martinez",
                        ContactPhone = "3055550000",
                        ContactTitle = "Owner"
                    },
                }
                ,
                Country = "US",
                CustomerVendorAccount = "A-37622",
                Ein = "12-3456789",
                Email = "example@email.com",
                InternalReferenceId = 123L,
                LocationCode = "MIA123",
                Mcc = "7777",
                Name1 = "Herman's Coatings and Masonry",
                Name2 = "<string>",
                PayeeName1 = "<string>",
                PayeeName2 = "<string>",
                PaymentMethod = "managed",
                Phone = "5555555555",
                RemitAddress1 = "123 Walnut Street",
                RemitAddress2 = "Suite 900",
                RemitCity = "Miami",
                RemitCountry = "US",
                RemitState = "FL",
                RemitZip = "31113",
                State = "FL",
                VendorStatus = 1,
                Zip = "33139"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.VendorData{
        VendorNumber: payabli.String(
            "VEN-123",
        ),
        Address1: payabli.String(
            "123 Ocean Drive",
        ),
        Address2: payabli.String(
            "Suite 400",
        ),
        BillingData: &payabli.BillingData{
            AccountNumber: payabli.String(
                "123123123",
            ),
            BankAccountFunction: payabli.Int(
                0,
            ),
            BankAccountHolderName: payabli.String(
                "Gruzya Adventure Outfitters LLC",
            ),
            BankAccountHolderType: payabli.BankAccountHolderTypeBusiness.Ptr(),
            BankName: payabli.String(
                "Country Bank",
            ),
            Id: payabli.Int(
                123,
            ),
            RoutingAccount: payabli.String(
                "123123123",
            ),
            TypeAccount: payabli.TypeAccountChecking.Ptr(),
        },
        City: payabli.String(
            "Miami",
        ),
        Contacts: &payabli.ContactsField{
            &payabli.Contacts{
                ContactEmail: payabli.String(
                    "example@email.com",
                ),
                ContactName: payabli.String(
                    "Herman Martinez",
                ),
                ContactPhone: payabli.String(
                    "3055550000",
                ),
                ContactTitle: payabli.String(
                    "Owner",
                ),
            },
        },
        Country: payabli.String(
            "US",
        ),
        CustomerVendorAccount: payabli.String(
            "A-37622",
        ),
        Ein: payabli.String(
            "12-3456789",
        ),
        Email: payabli.String(
            "example@email.com",
        ),
        InternalReferenceId: payabli.Int64(
            int64(123),
        ),
        LocationCode: payabli.String(
            "MIA123",
        ),
        Mcc: payabli.String(
            "7777",
        ),
        Name1: payabli.String(
            "Herman's Coatings and Masonry",
        ),
        Name2: payabli.String(
            "<string>",
        ),
        PayeeName1: payabli.String(
            "<string>",
        ),
        PayeeName2: payabli.String(
            "<string>",
        ),
        PaymentMethod: payabli.String(
            "managed",
        ),
        Phone: payabli.String(
            "5555555555",
        ),
        RemitAddress1: payabli.String(
            "123 Walnut Street",
        ),
        RemitAddress2: payabli.String(
            "Suite 900",
        ),
        RemitCity: payabli.String(
            "Miami",
        ),
        RemitCountry: payabli.String(
            "US",
        ),
        RemitState: payabli.String(
            "FL",
        ),
        RemitZip: payabli.String(
            "31113",
        ),
        State: payabli.String(
            "FL",
        ),
        VendorStatus: payabli.Int(
            1,
        ),
        Zip: payabli.String(
            "33139",
        ),
    }
    client.Vendor.AddVendor(
        context.TODO(),
        "8cfec329267",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Types\VendorData;
use Payabli\Types\BillingData;
use Payabli\Types\BankAccountHolderType;
use Payabli\Types\TypeAccount;
use Payabli\Types\Contacts;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->vendor->addVendor(
    '8cfec329267',
    new VendorData([
        'vendorNumber' => 'VEN-123',
        'address1' => '123 Ocean Drive',
        'address2' => 'Suite 400',
        'billingData' => new BillingData([
            'accountNumber' => '123123123',
            'bankAccountFunction' => 0,
            'bankAccountHolderName' => 'Gruzya Adventure Outfitters LLC',
            'bankAccountHolderType' => BankAccountHolderType::Business->value,
            'bankName' => 'Country Bank',
            'id' => 123,
            'routingAccount' => '123123123',
            'typeAccount' => TypeAccount::Checking->value,
        ]),
        'city' => 'Miami',
        'contacts' => [
            new Contacts([
                'contactEmail' => 'example@email.com',
                'contactName' => 'Herman Martinez',
                'contactPhone' => '3055550000',
                'contactTitle' => 'Owner',
            ]),
        ],
        'country' => 'US',
        'customerVendorAccount' => 'A-37622',
        'ein' => '12-3456789',
        'email' => 'example@email.com',
        'internalReferenceId' => 123,
        'locationCode' => 'MIA123',
        'mcc' => '7777',
        'name1' => "Herman's Coatings and Masonry",
        'name2' => '<string>',
        'payeeName1' => '<string>',
        'payeeName2' => '<string>',
        'paymentMethod' => 'managed',
        'phone' => '5555555555',
        'remitAddress1' => '123 Walnut Street',
        'remitAddress2' => 'Suite 900',
        'remitCity' => 'Miami',
        'remitCountry' => 'US',
        'remitState' => 'FL',
        'remitZip' => '31113',
        'state' => 'FL',
        'vendorStatus' => 1,
        'zip' => '33139',
    ]),
);

```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "vendorNumber": "VEN-123",
  "address1": "123 Ocean Drive",
  "address2": "Suite 400",
  "billingData": [
    "accountNumber": "123123123",
    "bankAccountFunction": 0,
    "bankAccountHolderName": "Gruzya Adventure Outfitters LLC",
    "bankAccountHolderType": "Business",
    "bankName": "Country Bank",
    "id": 123,
    "routingAccount": "123123123",
    "typeAccount": "Checking"
  ],
  "city": "Miami",
  "contacts": [
    [
      "contactEmail": "example@email.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    ]
  ],
  "country": "US",
  "customerVendorAccount": "A-37622",
  "ein": "12-3456789",
  "email": "example@email.com",
  "internalReferenceId": 123,
  "locationCode": "MIA123",
  "mcc": "7777",
  "name1": "Herman's Coatings and Masonry",
  "name2": "<string>",
  "payeeName1": "<string>",
  "payeeName2": "<string>",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "zip": "33139"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Vendor/single/8cfec329267")! 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()
```