# Merchant Logo Upload API

- Anchor: `bankhub-en-api-api-merchant-upload-logo-merchant`
- URL: https://developer.sepay.vn/en/bankhub/api/api-merchant/upload-logo-merchant.md
- Description: API to upload the merchant logo to S3. The logo is displayed in the header of the hosted link WebView.

**POST** `https://bankhub-api-sandbox.sepay.vn/v1/merchant-config/logo`
```http
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: multipart/form-data
```



**Request Body (multipart/form-data)**

<!-- Params table -->

**Headers**

<!-- Params table -->

> **Note** (info)
>
>
> * This API requires a Bearer Token in the Authorization header
> * Content-Type must be `multipart/form-data`
> * The old logo (if any) will be automatically deleted from S3
> * The new logo is uploaded to S3 with the filename: `{merchant_id}-{timestamp}.png`
> * The logo is reflected immediately across all hosted links
>

| Code | Name | Description |
|------|------|-------------|
| 400 | Bad Request | Invalid file (wrong format, file too large, MIME type mismatch) |
| 401 | Unauthorized | Invalid or expired access token |
| 413 | Payload Too Large | File exceeds 1MB |







**RESPONSE 200 - Upload Successful**


```json
{
  "data": {
    "transaction_whitelist_remark_keywords": ["thanh toan"],
    "global_hosted_link_custom_css": null,
    "logo_url": "https://s3.example.com/bankhub/logos/123-1705392000.png"
  }
}
```





**RESPONSE 400 - Invalid File**


```json
{
  "code": 400,
  "message": "Validation error",
  "errors": {
    "logo": ["File must be JPG or PNG", "File size must not exceed 1MB"]
  }
}
```








---

> **Validation Rules** (warn)
>
> **File Requirements:**
>
> * **Format**: Only JPG or PNG is accepted
> * **Size**: Maximum 1MB (1,048,576 bytes)
> * **MIME Type**: Must match the file extension (image/jpeg or image/png)
> * **Extension**: File extension is validated (.jpg, .jpeg, .png)
>

> **Important Notes** (warn)
>
>
> * The old logo is automatically deleted and cannot be rolled back
> * The new logo is reflected immediately across all hosted links
> * The timestamp in the URL helps bypass browser cache
> * If the file is > 1MB, the API returns 400
> * Only JPG/PNG is accepted; GIF, WebP, SVG are not supported
>

---
