Update Company API

POST /company/edit/{id}: update a SePay Bank Hub company name, status, or notified-transaction quota via partial-update on this authenticated endpoint.

||

API Endpoint

POST
https://bankhub-api.sepay.vn/v1/company/edit/{company_id}

Path Parameters

company_idstringrequired

ID of the company to edit

Request Body

full_namestring

Full name of the company

short_namestring

Short name

statusenum

Company status

payment_codeenum

Enable/disable payment code recognition

payment_code_prefixstring

Payment code prefix (2-5 letter characters)

payment_code_suffix_frominteger

Minimum suffix length

payment_code_suffix_tointeger

Maximum suffix length

payment_code_suffix_character_typeenum

Suffix character type

transaction_amountobject

Number of transactions still eligible for notifications (each notified incoming transaction decrements it by 1; at 0 notifications stop), or "Unlimited"

Note
  • This API requires a Bearer Token in the Authorization header
  • Supports partial update - only send the fields you want to change

Error Handling

404Not Found

The company does not exist or does not belong to this merchant

401Unauthorized

The access token is invalid or has expired

400Validation Error

Invalid input data

API Response

Response 200 - Updated Successfully
{
  "code": 200,
  "message": "Đã cập nhật thông tin công ty (tổ chức) thành công."
}
codeinteger
messagestring
Response 404 - Not Found
{
  "code": 0,
  "message": "string",
  "status": 0,
  "error": "string"
}

Code Examples

>
>
>
>
>
curl --request POST \
--url https://bankhub-api.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"full_name":"string","short_name":"string","status":"Pending","payment_code":"on","payment_code_prefix":"string","payment_code_suffix_from":1,"payment_code_suffix_to":1,"payment_code_suffix_character_type":"NumberOnly","transaction_amount":null}'

Usage Examples

JSUpdate the company name
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"full_name": "Công ty TNHH ABC Updated"
}'
JSChange the company status to Pending
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"status": "Pending"
}'
JSUpdate the number of notified transactions
1
2
3
4
5
6
curl --location --request POST 'https://bankhub-api.sepay.vn/v1/company/edit/d3dafd01-e06b-11f0-b29e-52c7e9b4f41b' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"transaction_amount": "1000"
}'

Important Notes
  • Send only the fields you want to change (partial update).
  • Submitted fields still follow the validation rules: a name of at least 3 characters and a valid status format.
  • Check the company_id before updating to avoid a 404 error.
  • transaction_amount is the number of transactions still eligible for notifications, not an amount limit: each notified incoming transaction decrements it by 1, and notifications stop at 0. Send a non-negative integer as a string, or "Unlimited" for no limit. The value replaces the remaining count instead of adding to it: with 200 left, sending "1000" sets it to 1000.