Skip to content
On this page

Register Employee account

Overview

A POST request needs to be sent to https://sandbox.tendopay.ph/api/payroll/v1/user/register to register an employee.

Please refer to the parameters section for the required parameters.

Parameters

ParameterData TypeRequiredDescription
tp_company_idStringyesTendopay company ID
ref_user_idStringyesJustPayroll user ID
emailStringyes
mobile_numberStringyes
second_phone_numberString
first_nameStringyes
middle_nameString
last_nameString
date_of_birthStringYYYY-MM-DD
tinStringTIN Number of user
sssString
nationalityString
genderStringMale or Female
address_lineString
postal_codeString
base_monthly_salaryNumeric
net_monthly_salaryNumeric
employment_start_dateStringYYYY-MM-DD
employment_statusInt@see job status codes

Job Status codes

The employment_status parameter is an integer that represents the job status of the employee.

Below are the possible values:

Int ParameterDefinition
1Permanent Job (Private sector)
2Temporary Job (Private sector)
3Permanent Job (Government sector)
4Temporary Job (Government sector)
9Other
10Business Owner
11Freelance
12Remittance Beneficiary
14Resigned
15Casual
16Contractual
17Part Time
18Probationary
19Project Based

Example

Example Request:

bash
curl --location --request POST 'https://sandbox.tendopay.ph/api/payroll/v1/user/register' \
--data-raw '{
    "tp_company_id": "10110",
    "ref_user_id": "test-user-0003",
    "first_name": "John",
    "middle_name": "F",
    "last_name": "Doe",
    "date_of_birth": "1980-01-02",
    "email": "jane@test.dev",
    "mobile_number": "09112223333",
    "secondary_phone_number": "",
    "tin": "000-123-345",
    "sss": "12-3456789-0",
    "nationality": "PH",
    "gender": "Male",
    "address_line": "Unit 123, Zeta Building, 1 Salcedo Street, Makati City, Philippines",
    "postal_code": "1234",
    "base_monthly_salary": 14000.00,
    "net_monthly_salary": 10000.00,
    "employment_start_date": "2012-11-06",
    "document_image": "https://robohash.org/driver_license.jpg",
    "document_type": "driver_license",
    "employment_status": 1
}

Example Response:200

If the registration is successful you will see the following information:

json
{
  "tp_user_id": 728240,
  "tp_company_id": 10110,
  "ref_user_id": "test-user-0004",
  "ref_company_id": "DEMO-123460",
  "first_name": "John4",
  "middle_name": "F",
  "last_name": "Doe",
  "email": "jane1@test.dev",
  "phone": "+63 (911) 222 3333",
  "user_status": "VERIFIED",
  "message": "Not specify Tier",
  "registered_at": "2022-03-09T04:26:55+08:00",
  "updated_at": "2022-03-09T09:15:37+08:00",
  "credit_limit": 57600,
  "available_credit_limit": 57600,
  "repayment_days": "15,30",
  "billing_account_id": "TP990A76"
}

Example Response:422

If the phone number is already in use, you will get the response below:

json
{
  "message": "The given data was invalid.",
  "error": "This phone already in use with TendoPay."
}

Example Response:422

If an invalid nationality is given or the field is empty you will receive the error below.

WARNING

Please note that TendoPay only currently accepts Philippines nationality.

json
{
  "message": "The given data was invalid.",
  "error": "This phone already in use with TendoPay."
}

Example Response:422

If the company is not activated, you will receive the following error.

json
{
  "message": "The given data was invalid.",
  "error": "This company is not activated yet."
}