Collection Revenue Head A revenue head can be created via the Create Revenue Head API endpoint. Once it is created a revenue_code is automatically generated that can be used when initializing transactions.
Endpoint - POST - {{baseUrl}}/v1/payment/revenue_head
Body Parameters
Parameter
Type
Required
Description
Used to enable or disable revenue head
Unique identifier for revenue head
The id of the settlement bank for the revenue head’s payout.
Sample Request
Copy curl -X POST \
{{baseUrl}}/v1/payment/revenue_head \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"revname": "test",
"rev_status": "REVHEAD",
"revenue_code": "123",
"settlement_bank_id": "SB00000000"
}'
Response
Copy {
"status" : true ,
"message" : "revenue_head.created" ,
"data" : {
"name" : "test" ,
"id" : "REV0000000000" ,
"type" : "REVHEAD" ,
"revenue_code" : "123" ,
"settlement_bank_id" : "SB00000000" ,
"updated_at" : "2022-05-17T20:56:51.000000Z" ,
"created_at" : "2022-05-17T20:56:51.000000Z"
}
}
Fetch Revenue Head
Get details of a revenue head
Endpoint: GET - {{baseUrl}}/v1/payment/revenue_head/search?search=revenue_code
Path Parameters
Parameter
Required
Description
Sample Request
Copy
curl -X GET \
'{{baseUrl}}/v1/payment/revenue_head/search?search=revenue_code' \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
Response
Copy {
"status" : true ,
"message" : "revenue_head.view" ,
"data" : {
"id" : "REV00000000" ,
"name" : "test" ,
"type" : "REVHEAD" ,
"revenue_code" : "123" ,
"settlement_bank_id" : "SB00000000" ,
"display" : "yes" ,
"created_at" : "2022-04-29T14:37:19.000000Z" ,
"updated_at" : "2022-04-29T14:37:40.000000Z"
}
}
Update Revenue Head
Update details of revenue head
Endpoint- PUT - {{baseUrl}}/v1/payment/revenue_head/:revenue_code
Path Parameters
Parameter
Required
Description
Body Parameters
Parameter
Required
Description
enum('REVHEAD', 'SUBACC', 'MAINACC’)
Sample Request
Copy
curl -X PUT \
{{baseUrl}}/v1/payment/revenue_head/:revenue_code \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"revname": "test",
"rev_status": "REVHEAD",
"revenue_code": "123",
"settlement_bank_id": "SB0000000000",
"display": "yes"
}'
Response
Copy {
"status" : true ,
"message" : "revenue_head.updated" ,
"data" : {
"id" : "REV000000" ,
"name" : "test" ,
"type" : "REVHEAD" ,
"revenue_code" : "123" ,
"settlement_bank_id" : "SB000000" ,
"display" : "yes" ,
"created_at" : "2022-05-17T20:56:51.000000Z" ,
"updated_at" : "2022-05-17T20:59:31.000000Z"
}
}
Last updated 11 months ago