> 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/update-a-merchant.md).

# Update Merchant Details

## Update merchant details

<mark style="color:purple;">`PATCH`</mark> `https://<Platform-host>/merchant/:id`

Update a merchant by setting the values of the parameters passed. Any parameters not provided are left unchanged.\
\
**IMPORTANT:** Always check the valid criteria for each section below with the Onboarding Criteria API first.

#### Path Parameters

<table><thead><tr><th width="218.4482421875">Name</th><th width="136.3681640625">Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>string</td><td>Merchant ID</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="220.69140625">Name</th><th width="132.80859375">Type</th><th>Description</th></tr></thead><tbody><tr><td>external_id</td><td>string</td><td>An optional identifier from your system to associate with this merchant</td></tr><tr><td>business_details<mark style="color:red;">*</mark></td><td>object</td><td>The business information section is always required. This contains general information about the merchant business. Information collected in this section would be items, such as legal and DBA (doing business as) names of the merchant, business entity types, MCC/SIC codes, address, contact information, description of products or services sold, etc.</td></tr><tr><td>owner_officers<mark style="color:red;">*</mark></td><td>object</td><td>The Owner/Officer section is always required. This is used to collect information on all beneficial owners of the business/merchant being onboarded.</td></tr><tr><td>credit_card_processing</td><td>object</td><td>Required if merchant is set to accept credit cards.</td></tr><tr><td>bank_details</td><td>object</td><td>If new bank information for this merchant needs to be added.</td></tr><tr><td>business_type<mark style="color:red;">*</mark></td><td>object</td><td>Business Type</td></tr><tr><td>ach_processing</td><td>object</td><td>Required if merchant is set to accept ACH transactions</td></tr><tr><td>fee_schedule_id</td><td>string</td><td>If a different fee schedule is required for this merchant other than what's setup as default.</td></tr><tr><td>validate</td><td>boolean</td><td>Indicates whether the validation of the onboarding application is required or not. Validation results are returned in the update response. It's <code>false</code> by default.</td></tr></tbody></table>

{% tabs %}
{% tab title="200 A merchant successfully updated" %}

```javascript
{
    "message": "merchant updated",
    "data": {
        "id": "d6399869-747c-4537-9c04-f81ce2a6c5eb",
        "created_at": "2022-03-07T16:40:24.213Z",
        "updated_at": "2022-03-07T16:40:24.213Z",
        "account_id": "3cab79a6-31bd-43e6-9a0c-e5870b18fa38",
        "email": "email@example.com",
        "status": "editing",
        "external_id": "ID123",
        "name": "New Merchant 1646671371",
        "data": {
            "name": "New Merchant 1646671371",
            "email": "email@example.com",
            "business_type": {
                "type": "COS",
                "mcc_sic": "5734"
            },
            "business_details": {
                "legal": {
                    "name": "New Merchant 1646671371",
                    "address_street": "123 Main Street",
                    "suite_type": "suite",
                    "address_unit": "222",
                    "address_city": "Los Angeles",
                    "address_state": "CA",
                    "address_zip": 92808
                },
                "dba_same_as_legal": true,
                "business_phone_no": "7526463989",
                "email": "email@example.com",
                "business_age_years": 1,
                "business_age_months": 2,
                "business_description": "Description of products or services sold",
                "how_products_delivered": "Directly to consumer's home",
                "when_product_received": "2-3 business days",
                "return_policy": "Return before 30 days",
                "tax_exempt": false,
                "type_of_tax_id": "SSN",
                "tax_identification_number": "222334456",
                "accepted_transaction_types": [
                    "ACH"
                ],
                "number_of_locations": "4",
                "company_annual_revenue": "1000000",
                "how_many_days": "3",
                "place_of_issuance": "CA",
                "aoi_month": 4,
                "aoi_year": "2020",
                "aoi_day": 22,
                "b2b_percentage": "20",
                "dba": {
                    "name": "New Merchant 1646671371",
                    "address_street": "123 Main Street",
                    "suite_type": "suite",
                    "address_city": "Los Angeles",
                    "address_state": "CA",
                    "address_zip": 92808
                }
            },
            "owner_officers": {
                "officers": [
                    {
                        "first_name": "John",
                        "middle_name": "",
                        "last_name": "Doe",
                        "ownership": 75,
                        "address_same_as_legal": false,
                        "address_street": "Main Street",
                        "address_unit": "",
                        "address_city": "Los Angeles",
                        "address_state": "CA",
                        "address_zip": "90245",
                        "email": "email@example.com",
                        "phone_no": "3494262452",
                        "birth_month": 2,
                        "birth_day": 28,
                        "birth_year": 1990,
                        "ssn": "333445567",
                        "title": "CEO",
                        "signing_app": true,
                        "personal_guarantor": true,
                        "country_of_citizenship": "USA"
                    }
                ]
            },
            "credit_card_processing": {
                "card_swiped": 25,
                "manually_keyed_cp": 25,
                "manually_keyed_cnp": 25,
                "ecommerce": 25,
                "accept_cc_before": false,
                "previous_processor_name": "Global Processor",
                "avg_transaction_amount": 25,
                "total_monthly_sales": 10000,
                "highest_transaction_amount": 25,
                "frequency_ticket_per_year": "25",
                "qualified_processing_method": "EDCRetail"
            },
            "ach_processing": {
                "max_check_amount": "1000",
                "avg_check_amount": "30",
                "max_monthly_transaction_amount": 25,
                "min_monthly_transaction_amount": 25,
                "max_daily_transactions_count": 25,
                "max_monthly_transactions_count": 25,
                "total_annual_amount": 25,
                "web": 25,
                "tel": 25,
                "ppd": 25,
                "ccd": 25
            }
        },
        "feeschedule_id": "e88c756f-5667-4a3c-a9f9-346446da71b1"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Raw Body" %}

```javascript
{    
    "name": "Platform",
    "email": "email@example.com",    
    "business_type": {
        "type": "PR",
        "mcc_sic": "5734"
    },
    "business_details": {
        "legal": {
            "name": "Platform",
            "address_street": "Address",
            "address_unit": "suite",
            "address_city": "HCM",
            "address_state": "AZ",
            "address_zip": 15454
        },
        "dba": {
            "name": "Platform",
            "address_street": "Address",
            "address_unit": "suite",
            "address_city": "HCM",
            "address_state": "AZ",
            "address_zip": 15454
        },
        "dba_same_as_legal": true,
        "business_phone_no": "7526463989",
        "email": "email@example.com",
        "business_age_years": 1,
        "business_age_months": 2,
        "business_description": "Description of products or services sold",
        "how_products_delivered": "Directly to consumer's home",
        "return_policy": "Return before 30 days",
        "tax_exempt": false,
        "type_of_tax_id": "SSN",
        "tax_identification_number": "353535355",
        "accepted_transaction_types": [
            "CC_DC",
            "ACH"
        ],
        "number_of_locations": "1",
        "company_annual_revenue": 1000000,
        "place_of_issuance": "CA",
        "aoi_day": 20,
        "aoi_month": 2,
        "aoi_year": 2020,
        "how_many_days": "2-3 business days",
        "b2b_percentage": 70
    },
    "credit_card_processing": {
        "card_swiped": 25,
        "manually_keyed_cp": 25,
        "manually_keyed_cnp": 25,
        "ecommerce": 25,
        "accept_cc_before": true,
        "previous_processor_name": "CC Processor",        
        "avg_transaction_amount": 25,
        "total_monthly_sales": 10000,
        "highest_transaction_amount": 25,
        "frequency_ticket_per_year": "25",
        "qualified_processing_method": "EDCRetail"
    },
    "ach_processing": {
        "max_check_amount": "1000",
        "avg_check_amount": "30",
        "max_monthly_transaction_amount": 25,
        "min_monthly_transaction_amount": 25,
        "max_daily_transactions_count": 25,
        "max_monthly_transactions_count": 25,
        "total_annual_amount": 25,
        "avg_number_checks_monthly": "3000",
        "est_monthly_check_volume": "30000",
        "web": 25,
        "tel": 25,
        "ppd": 25,
        "ccd": 25        
    },
    "owner_officers": {
        "current_index": -1,
        "officers": [
            {
                "first_name": "John",
                "middle_name": "",
                "last_name": "Doe",
                "ownership": 75,
                "address_same_as_legal": false,
                "address_street": "Main Street",
                "address_unit": "",
                "address_city": "Los Angeles",
                "address_state": "CA",
                "address_zip": "90245",
                "email": "email@example.com",
                "phone_no": "3494262452",
                "birth_month": 2,
                "birth_day": 28,
                "birth_year": 1990,
                "ssn": "353535355",
                "title": "CEO",
                "signing_app": true,
                "personal_guarantor": true,
                "country_of_citizenship": "USA"
            }
        ]
    },
    "bank_details": {
        "accounts": [
            {
                "account_name": "My Bank Account",
                "account_type": "N",
                "routing_number": "083908420",
                "account_number": "12345678"
            }
        ]
    },
    "fee_schedule_id": "e88c756f-5667-4a3c-a9f9-346446da71b1"
}
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var axios = require('axios');
var data = JSON.stringify("your raw data here");

var config = {
  method: 'patch',
  url: 'https://{{hostname}}/api/v2/merchant/:id',
  headers: { 
    'accept': 'application/json', 
    'Authorization': 'Basic {{YOUR_API_SECRET}}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Webhook event: **MERCHANT\_UPDATED**
{% endhint %}

## See also

{% content-ref url="/pages/QqMiGReWWkH9cub9nOmw" %}
[Application section criteria](/payengine-api-v2.5/onboarding/get-valid-criteria.md)
{% endcontent-ref %}

{% content-ref url="/pages/lYLcoklMzxsqHkLs9dDw" %}
[Get bank auto fill](/payengine-api-v2.5/onboarding/get-bank-name.md)
{% endcontent-ref %}
