> For the complete documentation index, see [llms.txt](https://developer.providusbank.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.providusbank.com/xpress-wallet-api/merchant/team/switch-merchant.md).

# Switch Merchant

Switch the active merchant account.

* **Endpoint**: `POST {{base-url}}/team/merchants/switch`
* **Headers**:

  ```json
  {
    "X-Access-Token": "{{access-token}}",
    "X-Refresh-Token": "{{refresh-token}}"
  }
  ```
* **Body**:

  ```json
  {
    "merchantId": "0cee2057-645e-48aa-b2f7-712e07cd0232"
  }
  ```
* **Response**:
  * **200 OK**:

    ```json
    {
      "status": true,
      "message": "Merchant successfully switched."
    }
    ```
* **Sample Code (Dart)**:

  ```dart
  var headers = {
    'X-Access-Token': '{{access-token}}',
    'X-Refresh-Token': '{{refresh-token}}'
  };
  var request = http.Request('POST', Uri.parse('{{base-url}}/team/merchants/switch'));
  request.body = '''{
    "merchantId": "151b73ed-93b8-4ed8-9288-6e290c2af38e"
  }''';
  request.headers.addAll(headers);
  http.StreamedResponse response = await request.send();
  if (response.statusCode == 200) {
    print(await response.stream.bytesToString());
  } else {
    print(response.reasonPhrase);
  }
  ```
