Company Creation API
API to create a new company in the Bank Hub system. Allows creating a company with a name and an initial status.
API Endpoint
POST
https://bankhub-api-sandbox.sepay.vn/v1/company/createRequest Body
full_namestringrequired
Full name of the company
statusenumrequired
Initial status of the company
Note
- This API requires a Bearer Token in the Authorization header
- The company name must be unique within the merchant scope
- The status should be set to
Activeat creation time so the company can be used immediately - After creation, the company will receive a unique
xid(UUID format)
Error Handling
401UnauthorizedThe access token is invalid or has expired
400Validation ErrorInvalid input data (empty company name, invalid status, etc.)
503Service UnavailableDatabase error
API Response
Response 201 - Created Successfully
{
"code": 201,
"message": "string",
"data": {
"xid": "string",
"full_name": "string"
}
}codeinteger
HTTP status code
messagestring
Result message
dataobject
Created company data
Code Examples
>
>
>
>
>
curl --request POST \--url https://bankhub-api-sandbox.sepay.vn/v1/company/create \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \--header 'content-type: application/json' \--data '{"full_name":"string","status":"Active"}'
Usage Examples
JSCreate a new company with Active status
1
2
3
4
5
6
7
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company/create' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \--data '{"full_name": "Công ty TNHH ABC","status": "Active"}'
JSCreate a company with Pending status (not yet usable)
1
2
3
4
5
6
7
curl --location 'https://bankhub-api-sandbox.sepay.vn/v1/company/create' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \--data '{"full_name": "Công ty TNHH XYZ","status": "Pending"}'
Important Notes
- You can store the company ID: After creation, save the
xidto use with other APIs