API Cập nhật cấu hình Merchant

API cập nhật cấu hình merchant bao gồm transaction whitelist keywords và custom CSS cho hosted link.


API Endpoint

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

Request Body

transaction_whitelist_remark_keywordsarray<string>

Từ khóa whitelist cho nội dung giao dịch

Lưu ý
  • API này yêu cầu Bearer Token trong header Authorization
  • Hỗ trợ partial update: chỉ gửi các trường cần cập nhật
  • Các trường không gửi sẽ giữ nguyên giá trị cũ

Xử lý lỗi

400Validation Error

Dữ liệu đầu vào không hợp lệ (keywords không phải array, v.v.)

401Unauthorized

Access token không hợp lệ hoặc đã hết hạn

API Response

Response 200 - Cập nhật thành công
{
  "data": {
    "transaction_whitelist_remark_keywords": [
      "string"
    ],
    "logo_url": "https://example.com"
  }
}
dataobject

Cấu hình merchant

Code mẫu

>
>
>
>
>
curl --request POST \
--url https://bankhub-api-sandbox.sepay.vn/v1/merchant-config \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"transaction_whitelist_remark_keywords":["string"]}'

Ví dụ sử dụng

JSCập nhật whitelist keywords
1
2
3
4
5
6
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/merchant-config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"transaction_whitelist_remark_keywords": ["thanh toan", "payment", "chuyen khoan"]
}'
JSCập nhật nhiều keywords
1
2
3
4
5
6
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/merchant-config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"transaction_whitelist_remark_keywords": ["thanh toan", "payment", "don hang"]
}'

Validation Rules

Transaction Whitelist Keywords:

  • Từ khóa được trim và loại bỏ trùng lặp
  • Từ khóa rỗng bị từ chối