> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxpay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Branding

> POST /v2/naas/submerchants/branding — update a sub-merchant's visual identity on checkout pages.

Updates the visual identity of a sub-merchant used on their checkout pages: display name, logo, and/or primary button colour. Changes take effect on the next checkout session.

<Warning>
  This endpoint operates at the master merchant level. **Do not include `correlation_id` in the envelope** — pass it inside `payload` instead.
</Warning>

<Info>
  Branding can be updated **at most once every 30 days** per sub-merchant. At least one of `trade_name`, `logo`, or `colour` must be provided.
</Info>

## Payload fields

| Field            | Type            | Required | Description                                                                                                                                |
| ---------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `correlation_id` | string (UUID)   | Yes      | UUID returned by [Enroll Sub-merchant](/api-reference/naas/enroll).                                                                        |
| `trade_name`     | string          | No       | Display name shown on the checkout page.                                                                                                   |
| `logo`           | string (base64) | No       | Base64-encoded logo image. Standard or raw encoding; `data:<mime>;base64,` prefix optional. Must be PNG or JPEG, max 5 MB, max 400×400 px. |
| `colour`         | string          | No       | Hex colour code for the primary action button (e.g. `#FF5500`).                                                                            |

## Response `200 OK`

```json theme={null}
{ "message": "Company branding updated successfully" }
```

**`400`** — missing `correlation_id`; no fields provided; 30-day cooldown not elapsed; logo is not valid base64, not PNG/JPEG, exceeds 5 MB, or exceeds 400×400 px.

**`404`** — `correlation_id` not found or does not belong to this master merchant.

**`422`** — sub-merchant has no portal account yet (KYB not completed).

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://checkout.noxpay.io/v2/naas/submerchants/branding \
    -H "api-key: <key>" \
    -H "X-Signature: <signed-body-signature>" \
    -H "Content-Type: application/json" \
    -d '{
      "timestamp": "2026-05-27T14:30:00Z",
      "payload": {
        "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
        "trade_name": "AcmePay",
        "colour": "#FF5500"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  body, sig = sign_envelope({
      "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
      "trade_name": "AcmePay",
      "colour": "#FF5500",
  })
  response = requests.post(
      "https://checkout.noxpay.io/v2/naas/submerchants/branding",
      headers={"api-key": "<key>", "X-Signature": sig, "Content-Type": "application/json"},
      data=body,
  )
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const { body, signature } = signEnvelope({
    correlation_id: "a1b2c3d4-e5f6-4789-abcd-000000000001",
    trade_name: "AcmePay",
    colour: "#FF5500",
  });
  const response = await fetch("https://checkout.noxpay.io/v2/naas/submerchants/branding", {
    method: "POST",
    headers: { "api-key": "<key>", "X-Signature": signature, "Content-Type": "application/json" },
    body,
  });
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "message": "Company branding updated successfully" }
  ```

  ```json 400 theme={null}
  { "error": "logo exceeds maximum size of 5MB" }
  ```

  ```json 422 theme={null}
  { "error": "sub-merchant has no portal account" }
  ```
</ResponseExample>
