# Create merchant profile

The merchant onboarding process through the API begins with creating a merchant profile. This involves two key steps:

{% stepper %}
{% step %}
**Request a merchant identifier (MID)**

Submit a request to the [Create Merchant Application](https://docs.xplorpay.com/api-reference/api/merchant-onboarding/merchant-boarding-via-api/boarding-management/application#post-api-boardingmanagement-v1.0-applications-create) endpoint using your assigned portfolio MID. This MID is a 16-digit identifier provided to you during integration setup and represents your merchant portfolio.

In the request:

* Set the `MerchantId` HTTP header to your **portfolio’s MID**.
* Include the `HierarchyNodeKey` in the request body to define where the new merchant belongs.

The API returns a **new 16-digit MID** that uniquely identifies the newly created merchant. Use this MID in all future API requests related to that merchant.
{% endstep %}

{% step %}
**Create a merchant application**

Once a MID is assigned, use the [Create Merchant Application](https://docs.xplorpay.com/api-reference/api/merchant-onboarding/merchant-boarding-via-api/boarding-management/application#post-api-boardingmanagement-v1.0-applications-create) endpoint to start configuring the merchant’s profile. This step collects key details such as business name and hierarchy placement, which are required before submitting a full application for underwriting and setup.

Use `POST` method `/api/BoardingManagement/v1.0/Applications/Create` to create a merchant application. Refer to the below sample payload for reference:

{% code lineNumbers="true" %}

```javascript
{
  "hierarchyNodeKey": "1234567800000001",
  "dbaName": "Jane's Sandwiches"
}
```

{% endcode %}
{% endstep %}
{% endstepper %}

For a detailed breakdown of the request and response fields and their descriptions, refer to the [Boarding Management API Reference](https://docs.xplorpay.com/api-reference/api/merchant-onboarding/merchant-boarding-via-api/boarding-management).
