> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.outpave.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.outpave.com/_mcp/server.

# Update a merchant

POST https://api.outpave.com/api/v1/onboard/merchant/{id}
Content-Type: application/json

Updates an existing merchant, identified by its `id` or your `externalId`.

Reference: https://developers.outpave.com/api-reference/customer-portal-api/merchants/post-api-v-1-onboard-merchant-id

## Authentication

- `Authorization` header (bearer token, required) — A short-lived access token from `POST /api/v1/access-token` (30 minutes by default). Send as `Authorization: Bearer <jwt>`.

## Request

### Path parameters

- `id` (string, required) — The record's `id` (a UUID), or your own `externalId` (any non-UUID value is treated as an `externalId`).

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — The merchant's display name.
- `externalId` (string, optional) — The merchant's identifier in your system. Send it again on a later request to update the same record.
- `logoUrl` (string, optional) — A URL to the merchant's logo.
- `primaryColor` (string, optional) — The merchant's primary brand color (e.g. a hex value).
- `websiteSlug` (string, optional) — A lowercase alphanumeric/hyphen slug for the merchant's portal URL.

## Response

### 200

Merchant updated.

- `data` (ApiV1OnboardMerchantIdPostResponsesContentApplicationJsonSchemaData, required) — A merchant that bills your end users.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 401 Unauthorized Error

The credential is missing, invalid, expired, or not permitted on this endpoint.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 409 Conflict Error

A unique-constraint conflict (e.g. duplicate EIN, website, or externalId).

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 500 Internal Server Error

An unexpected server error occurred. Retry the request; if the problem persists, contact support.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

## Types

### ApiV1OnboardMerchantIdPostResponsesContentApplicationJsonSchemaData

A merchant that bills your end users.

- `id` (string, required) — The merchant's unique identifier.
- `name` (string, required) — The merchant's display name.
- `platformId` (string, required) — The platform that owns the merchant.
- `status` (enum, required) — The merchant's current status.
  - Allowed values: `ACTIVE`, `DISABLED`
- `externalId` (string, optional, nullable) — The merchant's identifier in your system.
- `businessId` (string, optional, nullable) — The business linked to the merchant, if any.
- `logoUrl` (string, optional, nullable) — A URL to the merchant's logo.
- `primaryColor` (string, optional, nullable) — The merchant's primary brand color.
- `websiteSlug` (string, optional, nullable) — The merchant's portal URL slug.

## Examples

**Request**

```json
{
  "name": "Ozinga"
}
```

**Response**

```json
{
  "data": {
    "id": "string",
    "name": "string",
    "platformId": "string",
    "status": "ACTIVE",
    "externalId": "string",
    "businessId": "string",
    "logoUrl": "string",
    "primaryColor": "string",
    "websiteSlug": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.outpave.com/api/v1/onboard/merchant/id"

payload = { "name": "Ozinga" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.outpave.com/api/v1/onboard/merchant/id';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Ozinga"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.outpave.com/api/v1/onboard/merchant/id"

	payload := strings.NewReader("{\n  \"name\": \"Ozinga\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.outpave.com/api/v1/onboard/merchant/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Ozinga\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.outpave.com/api/v1/onboard/merchant/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Ozinga\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.outpave.com/api/v1/onboard/merchant/id', [
  'body' => '{
  "name": "Ozinga"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v1/onboard/merchant/id");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Ozinga\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["name": "Ozinga"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v1/onboard/merchant/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```