Update Merchant Configuration API
API to update merchant configuration including transaction whitelist keywords and custom CSS for hosted links.
API Endpoint
POST
https://bankhub-api-sandbox.sepay.vn/v1/merchant-configRequest Body
transaction_whitelist_remark_keywordsarray<string>
Whitelist keywords for transaction content
global_hosted_link_custom_cssstring
Custom CSS for hosted link
Note
- This API requires a Bearer Token in the Authorization header
- Supports partial update: only send fields that need updating
- Fields not sent will retain their old values
- Configuration applies immediately to all hosted links
Error Handling
400Validation ErrorInvalid input data (CSS contains script, keywords not array, etc.)
401UnauthorizedAccess token is invalid or expired
API Response
Response 200 - Update Successful
{
"data": {
"transaction_whitelist_remark_keywords": [
"string"
],
"global_hosted_link_custom_css": "string",
"logo_url": "https://example.com"
}
}dataobject
Merchant configuration
Code Examples
1
2
3
4
5
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"],"global_hosted_link_custom_css":"string"}'
Usage Examples
JSUpdate 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"]}'
JSUpdate custom CSS
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 '{"global_hosted_link_custom_css": "body { background: #f0f0f0; color: #333; }"}'
JSUpdate both at once
1
2
3
4
5
6
7
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"],"global_hosted_link_custom_css": "body { background: #ffffff; }"}'
Validation Rules
Transaction Whitelist Keywords:
- Keywords are trimmed and duplicates are removed
- Empty keywords are rejected
Global Hosted Link Custom CSS:
- Requires admin permissions for
global_hosted_link_custom_css - CSS is sanitized to prevent XSS attacks