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

ParameterTypeRequiredDescription

revname

string

yes

Title of revenue head

rev_status

enum (REVHEAD, SUBACC)

no

Used to enable or disable revenue head

revenue_status

string

no

Unique identifier for revenue head

settlement_bank_id

string

yes

The id of the settlement bank for the revenue head’s payout.

Sample Request

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

{
    "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

ParameterRequiredDescription

search

no

string

Sample Request


curl -X GET \
  '{{baseUrl}}/v1/payment/revenue_head/search?search=revenue_code' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Response

{
"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

ParameterRequiredDescription

revenue_code

no

string

Body Parameters

ParameterRequiredDescription

revname

yes

string

rev_status

yes

enum('REVHEAD', 'SUBACC', 'MAINACC’)

revenue_code

no

string

settlement_bank_id

yes

string

display

no

enum('yes', 'no')

Sample Request


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

{
    "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