Make payroll payments using SingleView APIs
Payroll payments can be processed through SingleView APIs and require the following details to be enclosed in the payment processing request:
- The user must provide the valid credentials in the header
- Valid
clientid,clientsecret, andsignature- The request should be in the specified format
- The request should include all the mandatory details with appropriate request tags
Endpoint URL | Method | Grant type |
|---|---|---|
| POST |
|
basicSalary tag cannot be 0payeeId must be unique for all the transactionscurl --location --request POST 'https://servicesuat.onesingleview.com/v1/api/erp/svPayrollService' \
--header 'clientid: Enter_Client_ID' \
--header 'clientsecret: Enter_Client_Secret' \
--header 'signature: Enter_Signature' \
--header 'Content-Type: application/json' \
--data-raw '{
"svPayrollServiceRQ": {
"company": [
{
"companyCode": "1234",
"payroll": [
{
"acERPcode": "1908",
"amount": 10000,
"currency": "SAR",
"description": "payroll payment",
"dueDate": "2025-12-16",
"userName": "Ismail123",
"payrollPayId": "5723",
"payeeDetails": [
{
"bankCode": "12",
"iban": "SA52378645318653186531",
"name": "Abdullah",
"payeeId": "0213688",
"nationalId": "0012",
"basicSalary": "1500",
"housingAllowance": "100",
"otherAllowance": "100",
"deduction": "50",
"amount": "1650",
"currency": "SAR",
"remarks": "Current month salary"
},
{
"bankCode": "11",
"iban": "SA52378645311234567891",
"name": "AbduRahman",
"payeeId": "0213689",
"nationalId": "0013",
"basicSalary": "1800",
"housingAllowance": "200",
"otherAllowance": "200",
"deduction": "50",
"amount": "2250",
"currency": "SAR",
"remarks": "Current month salary"
},
{
"bankCode": "12",
"iban": "SA52378645319876543211",
"name": "Ibrahim",
"payeeId": "021369",
"nationalId": "0014",
"basicSalary": "2000",
"housingAllowance": "400",
"otherAllowance": "400",
"deduction": "100",
"amount": "2900",
"currency": "SAR",
"remarks": "Current month salary"
}
]
}
]
}
]
}
}'Request description
JSON Tag | Description | Data Type |
|---|---|---|
clientid Mandatory | Unique client identification details Length of input: Min 3 Characters Max 20 Characters | String |
clientsecret Mandatory | Unique client identification secret code Length of input: Min 3 Characters Max 20 Characters | String |
signature Mandatory | 64-Bit string obtained by processing client signature key through Base-64 and SHA-256 | String |
svPayrollServiceRQ Mandatory | Tag carrying information on request to process a payroll | Object |
company Mandatory | Tag carrying information about the company | Object |
companyCode Mandatory | Unique company identification code Length of input: Min 3 Characters Max 20 Characters | String |
payroll Mandatory | Tag carrying information on payroll details in the request | Object |
acERPcode Mandatory | Unique account ERP identification code Min: 9 Characters | Alphanumeric |
amount Mandatory | Total amount of the payroll | Numerical |
currency Mandatory | Currency representing the payroll amount | String |
description Mandatory | Description of the payroll Length of input: Min 3 Characters Max 20 Characters | String |
dueDate Mandatory | Due date for processing the payroll in | Date |
userName Mandatory | Unique user identification details Length of input: Min 3 Characters Max 20 Characters | String |
payrollPayId Mandatory | Unique payroll payment identification Length of input: Min 3 Characters Max 20 Characters | String |
payeeDetails Mandatory | Tag carrying information of payees included in the payroll request | Object |
bankCode Mandatory | Unique bank identification code Length of input: Min 3 Characters Max 20 Characters | Stringt |
iban Mandatory | Unique international bank account number | String |
name Mandatory | Name of the payee Length of input: Min 3 Characters Max 35 Characters | String |
payeeId Mandatory | Unique employee code or payee code identification Length of input: Min 3 Characters Max 20 Characters | String |
nationalId Mandatory | Unique national identification details of the payee Length of input: 10 Digits | String |
basicSalary Mandatory | Basic salary amount of the payee | Numerical |
housingAllowance Mandatory | Housing allowance amount of the payee | Numerical |
otherAllowance Mandatory | Other allowance amount of the payee | Numerical |
deduction Mandatory | Total deduction amount of the payee | Numerical |
amount Mandatory | Total amount for the payee | Numerical |
currency Mandatory | Currency representing the payee amount | String |
remarks Optional | Remarks for payment to the payee Length of input: Min 3 Characters Max 20 Characters | String |
{
"svPayrollServiceRS": {
"company": [
{
"companyCode": "1234",
"payroll": [
{
"payrollPayId": "75645342552",
"acERPcode": "ALRAJHI123",
"status": 0,
"transactionId": "664346630",
"message": "data added successfully"
}
]
}
]
}
}Response description
JSON Tag | Description | Data Type |
|---|---|---|
svPayrollServiceRS | Tag carrying information on process response for payroll processing request | Object |
company | Tag carrying information on company | Object |
companyCode | Unique company identification code | String |
payroll | Tag carrying information on payroll payments in the response | Object |
acERPcode | Unique ERP account code | Alphanumeric |
payrollPayId | Unique payroll payment identification details | String |
transactionId | Unique transaction identification details | String |
status | Status code of the payroll response | Boolean |
message | Status message payroll response description | String |
Tags appearing for failed payments scenario |
|
|
payeeDetails | Tag carrying information on payee payment details in the response | Object |
bankCode | Unique bank code identification | String |
payeeId | Unique payee/employee identification | String |
status | Status code of the payroll payment | Numeric |
message | Status message payroll payment description | String |