Upload Merchant Logo API

API to upload merchant logo to S3. The logo is displayed on the header of the hosted link WebView.


API Endpoint

POST
https://bankhub-api-sandbox.sepay.vn/v1/merchant-config/logo

Request Body (multipart/form-data)

Note
  • This API requires a Bearer Token in the Authorization header
  • Content-Type must be multipart/form-data
  • Old logo (if any) will automatically be deleted from S3
  • New logo is uploaded to S3 with filename: {merchant_id}-{timestamp}.png
  • Logo is displayed immediately on all hosted links

Error Handling

400Bad Request

Invalid file (wrong format, too large, MIME type mismatch)

401Unauthorized

Access token is invalid or expired

413Payload Too Large

File exceeds 1MB

API Response

Response 200 - Upload Successful
{
  "data": {
    "logo_url": "https://example.com"
  }
}
dataobject

Logo data

Code Examples

1
2
3
4
5
curl --request POST \
--url https://bankhub-api-sandbox.sepay.vn/v1/merchant-config/logo \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: multipart/form-data' \
--form logo=string

Usage Examples

JSUpload logo from file
1
2
3
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/merchant-config/logo' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'logo=@"/path/to/logo.png"'

Validation Rules

File Requirements:

  • Format: Only accepts JPG or PNG
  • Size: Maximum 1MB (1,048,576 bytes)
  • MIME Type: Must match extension (image/jpeg or image/png)
  • Extension: File extension is validated (.jpg, .jpeg, .png)
Important Note
  • Old logo is automatically deleted, cannot rollback
  • New logo is displayed immediately on all hosted links
  • Timestamp in URL helps bypass browser cache
  • If file > 1MB, API returns 400
  • Only accepts JPG/PNG, does not accept GIF, WebP, SVG