# merchant_id_mismatch

> The clinic in the body isn't the token's

- Status: 400 Bad Request
- Returned by: /api/public
- Operations: [createOrder](https://developers.rivr.io/reference/api-public/createOrder.md)
- Retry (`retryWhen`): `after_fix`
- Did anything happen? (`outcome`): `none` (It did not happen)
- Creating an order in /api/public
- Page in the portal: https://developers.rivr.io/errors/merchant_id_mismatch
- Try it: `GET https://developers.rivr.io/errors/simulate/merchant_id_mismatch` answers with the code's exact wire form; `?succeedAfter=N&attempt=K` gives a 200 once `attempt` passes `N`

## What it means

`merchantId` in the body isn't the clinic the token is issued for, or the body has no `merchantId`. The answer comes before the validation rules, so no 422 code. Nothing was created.

## What your system does

Send the token's clinic in `merchantId`, or call with the token for the clinic in the body.

## Is it worth retrying?

No, not without changing the call.

`retryWhen`: `after_fix`. Change the request first, as the code's page says: a value, the token, a header or a new key. Then send it.

## Did anything happen?

`outcome`: `none`. **It did not happen.** This call did not do what you asked for and changed nothing else that you can see or that concerns money. Where the code has an `outcomeNote`, it takes precedence.

## Example: /api/public

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "propertyName": "MerchantId",
  "message": "The merchantId in the token does not match the merchantId in the payload",
  "errorCode": "merchant_id_mismatch",
  "code": "merchant_id_mismatch",
  "type": "https://developers.rivr.io/errors/merchant_id_mismatch"
}
```

The `title`, `detail`, `message` and `error_description` texts are exactly as the API writes them today.
