> ## Documentation Index
> Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create White-label Integration Provider

> The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integratio

The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integration provider with the specified details. Ensure that the required information is provided in the request payload. This endpoint can be only invoked using marketplace-app token

```http theme={null}
POST https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Body

<ParamField body="altId" type="string" required default="6578278e879ad2646715ba9c">
  account Id / company Id based on altType
</ParamField>

<ParamField body="altType" type="string" required default="account">
  Alt Type Posibles valores: 'account'
</ParamField>

<ParamField body="uniqueName" type="string" required default="easy-direct">
  A unique name given to the integration provider, uniqueName must start and end with a character. Only lowercase characters and hyphens (-) are supported
</ParamField>

<ParamField body="title" type="string" required default="Title">
  The title or name of the integration provider.
</ParamField>

<ParamField body="provider" type="string" required>
  The type of payment provider associated with the integration provider. Posibles valores: 'authorize-net', 'nmi'
</ParamField>

<ParamField body="description" type="string" required default="Description">
  A brief description providing additional information about the integration provider.
</ParamField>

<ParamField body="imageUrl" type="string" required default="https://example.com/image.jpg">
  The URL to an image representing the integration provider. The imageUrl should start with "https\://" and ensure that this URL is publicly accessible.
</ParamField>

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="_id" type="string" required default="65cb47dda50f4f13ced4b870">
    The unique identifier of the integration provider.
  </ResponseField>

  <ResponseField name="altId" type="string" required default="Z4Bxl8J4SaPEPLq9IQ8g">
    The altId / locationId of the integration provider.
  </ResponseField>

  <ResponseField name="altType" type="string" required default="account">
    The altType of the integration provider.
  </ResponseField>

  <ResponseField name="title" type="string" required default="Example">
    The title or name of the integration provider.
  </ResponseField>

  <ResponseField name="route" type="string" required default="epd">
    The route name associated with the integration provider.
  </ResponseField>

  <ResponseField name="provider" type="string" required default="nmi">
    The payment provider associated with the integration provider.
  </ResponseField>

  <ResponseField name="description" type="string" required default="Lorem">
    A brief description providing additional information about the integration provider.
  </ResponseField>

  <ResponseField name="imageUrl" type="string" required default="https://example.com/assets/pmd/img/payments/nmi-logo.webp">
    The URL to an image representing the integration provider.
  </ResponseField>

  <ResponseField name="createdAt" type="string" required default="2024-02-13T10:43:41.026Z">
    The timestamp when the integration provider was created.
  </ResponseField>

  <ResponseField name="updatedAt" type="string" required default="2024-02-13T10:43:41.026Z">
    The timestamp when the integration provider was last updated.
  </ResponseField>

  ```json theme={null}
  {
    "_id": "65cb47dda50f4f13ced4b870",
    "altId": "Z4Bxl8J4SaPEPLq9IQ8g",
    "altType": "account",
    "title": "Example",
    "route": "epd",
    "provider": "nmi",
    "description": "Lorem",
    "imageUrl": "https://example.com/assets/pmd/img/payments/nmi-logo.webp",
    "createdAt": "2024-02-13T10:43:41.026Z",
    "updatedAt": "2024-02-13T10:43:41.026Z"
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28' \
    -H 'Content-Type: application/json' \
    -d '{
    "altId": "6578278e879ad2646715ba9c",
    "altType": "account",
    "uniqueName": "easy-direct",
    "title": "Title",
    "provider": {
      "AUTHORIZE_NET": "authorize-net",
      "NMI": "nmi"
    },
    "description": "Description",
    "imageUrl": "https://example.com/image.jpg"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "uniqueName": "easy-direct", "title": "Title", "provider": {"AUTHORIZE_NET": "authorize-net", "NMI": "nmi"}, "description": "Description", "imageUrl": "https://example.com/image.jpg"}),
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'POST',
      'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
          'Content-Type': 'application/json',
      },
      json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "uniqueName": "easy-direct", "title": "Title", "provider": {"AUTHORIZE_NET": "authorize-net", "NMI": "nmi"}, "description": "Description", "imageUrl": "https://example.com/image.jpg"},
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
          'Content-Type: application/json',
      ],
      CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'uniqueName': 'easy-direct', 'title': 'Title', 'provider': {'AUTHORIZE_NET': 'authorize-net', 'NMI': 'nmi'}, 'description': 'Description', 'imageUrl': 'https://example.com/image.jpg'}),
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
