> For the complete documentation index, see [llms.txt](https://docs.payengine.co/payengine-api-v2.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payengine.co/payengine-api-v2.5/onboarding/invite-new-merchant.md).

# Invite New Merchant

## Invite new merchant

<mark style="color:green;">`POST`</mark>`https://<Platform-host>/merchant/invite`

Retrieve the details of a merchant.

#### Request Body

| Name                                    | Type   | Description                                             |
| --------------------------------------- | ------ | ------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>  | string | Merchant name                                           |
| email<mark style="color:red;">\*</mark> | string | Merchant's email address to which invite has to be sent |
| external\_id                            | string | Merchant ID from your system (optional)                 |

{% tabs %}
{% tab title="200 Response" %}

| Name                 | Type   | Description                                                                                                      |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| message              | string | Success or failure message of the invite                                                                         |
| data.id              | string | Merchant ID                                                                                                      |
| data.created\_at     | string | Creation date of the email invite                                                                                |
| data.updated\_at     | string | Updated date for this invite                                                                                     |
| data.account\_id     | string | Partner Account ID                                                                                               |
| data.email           | string | Mechant's email address to which email was sent                                                                  |
| data.status          | string | Merchant's application status                                                                                    |
| data.data            | object | Contains merchant's application details if the partner fills some merchant's information. Or else, it will empty |
| data.external\_id    | string | External ID provided in the request                                                                              |
| data.invite\_url     | string | URL for the merchant onboarding application. This is the same link that is provided in the email                 |
| data.name            | string | Merchant's name                                                                                                  |
| data.country         | string | Merchant's country                                                                                               |
| data.feeschedule\_id | string | Fee Schedule ID assigned to this merchant application                                                            |
| {% endtab %}         |        |                                                                                                                  |
| {% endtabs %}        |        |                                                                                                                  |

### Sample Request

{% tabs %}
{% tab title="Sample Request" %}

```javascript
{
  "name": "Tesst Merchant",
  "email": "test@test.com",
  "external_id":"ABC123" 
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "message": "Invitation to test@test.com successfully sent",
    "data": {
        "id": "d44f7f86-204d-419f-80ba-a50a15607600",
        "created_at": "2024-04-19T17:22:20.621Z",
        "updated_at": "2024-04-19T17:22:20.621Z",
        "account_id": "3cab79a6-31bd-43e6-9a0c-e5870b18fa38",
        "email": "test@test.com",
        "status": "editing",
        "external_id": ABC123,
        "invite_url": "https://abc/signup/user?id=YNP8nfChdjOBm1up&email=test@test.com",
        "name": "Test Merchant",
        "data": {},
        "country": "US",
        "feeschedule_id": "cec063cc-2363-48e0-9124-e8e3760d00ab"
    }
}
```

{% endtab %}
{% endtabs %}
