Appearance
Register company
Overview
Request
A POST request needs to be sent to https://sandbox.tendopay.ph/api/payroll/v1/company/register to register a company.
| Method | End Point |
|---|---|
| POST | /api/payroll/jp/company/register |
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| name | String | yes | Name of Company |
| domain | String | yes | Domain of Company |
| address | String | yes | Address of Company |
| city | String | yes | City of Company |
| postal | String | yes | Postal Code of Company |
| tin | String | yes | TIN Number of Company |
| contact_email | String | yes | Email Contact of Company to Send MOA |
| contact_phone | String | yes | Phone Contact of Company |
| contact_name | String | yes | Phone Contact of Company |
| ref_company_id | String | yes | Unique company identifier on Just Payroll |
Response
If the status is 200, the company has been successfully registered.
| Status |
|---|
| 200 |
| Parameter | Data Type | Description |
|---|---|---|
| tp_company_id | Number | Unique identifier on TendoPay |
| ref_company_id | String | Unique company identifier on Just Payroll |
| status | String | PENDING, ACTIVATED, DECLINED |
| name | String | |
| domain | String | |
| address | String | |
| tin | String | |
| message | String | Error message if status is declined |
TendoPay will activate the Employer account and notify payroll when the MOA is signed and TendoPay is ready to accept employees from the company registered.
WARNING
Please note that the company will be in PENDING status until the MOA is signed.
TIP
Note that companies with DECLINED status will not be able to register employees and will be automatically denied.
TIP
For details on failed response codes, please visit Response Status
Example
Example Request
bash
curl --location --request POST 'https://sandbox.tendopay.ph/api/payroll/v1/company/register' \
--data-raw '{
"name": "TestCompany",
"domain": "test.test.dev",
"address": "11 street",
"city": "Manila",
"postal": "1234",
"tin": "123456789000",
"contact_email": "",
"contact_phone": "091112223333",
"contact_name": "John",
"ref_company_id": "DEMO-123458"
}'
Example Response:200 When the company is fully registered
json
{
"message": "Request is queued",
"tp_company_id": 10114,
"ref_company_id": "DEMO-123459",
"tin": "123456789001",
"name": "TestCompany",
"email_domain": "test.test.dev",
"repayment_days": "",
"address": "11 street",
"status": "PENDING",
"created_at": "2022-03-07T10:17:01+08:00",
"updated_at": "2022-03-07T10:17:01+08:00"
}
Example Response:200 When company account is ACTIVATED
json
{
"message": "",
"tp_company_id": 10114,
"ref_company_id": "DEMO-123459",
"tin": "123456789001",
"name": "TestCompany",
"email_domain": "test.test.dev",
"repayment_days": "",
"address": "11 street",
"status": "ACTIVATED",
"created_at": "2022-03-07T10:17:01+08:00",
"updated_at": "2022-03-07T10:17:01+08:00"
}
Example Response:422 When the TIN number is already in use
json
{
"message": "The given data was invalid.",
"error": "TIN number already in use"
}