Skip to main content
POST
/
billing
/
feeComponent
cURL
curl --request POST \
  --url https://api.valyx.com/billing/feeComponent \
  --header 'Content-Type: application/json' \
  --header 'X-Valyx-Signature: <x-valyx-signature>' \
  --data '
{
  "name": "<string>",
  "taxRate": [
    {
      "name": "<string>",
      "value": 123,
      "isActive": true,
      "taxCategory": "GST"
    }
  ],
  "hsnOrSacCode": "<string>",
  "sku": "<string>",
  "unit": "<string>",
  "description": "<string>",
  "billLimit": {
    "isUsageBased": false,
    "tiers": [
      {
        "upTo": "Infinity",
        "minValue": 123,
        "maxValue": 123
      }
    ],
    "minValue": 123,
    "maxValue": 123
  },
  "driverUpsertRequest": {
    "upsertRequests": [
      {
        "usageDriverId": "<string>",
        "weight": 123
      }
    ]
  }
}
'
{
  "error": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>"
  }
}

Headers

X-Valyx-Signature
string
required

Auth key to authenticate the request

Body

application/json
name
string
required

The unique name of the fee component.

taxRate
object[]
required

List of taxes applicable to this fee component. Each tax includes its name, value, and category.

hsnOrSacCode
string

HSN (Harmonized System of Nomenclature) code or SAC (Service Accounting Code) for GST classification.

sku
string

Stock Keeping Unit (SKU) – a unique identifier for the product or service. Useful for inventory or internal tracking.

unit
string

The unit of measurement for this fee component (e.g., 'GB', 'Hour', 'User'). Used when calculating usage-based charges.

description
string

Optional detailed description of the fee component.

billLimit
object

Optional limits for billing this component, e.g., min/max values or usage-based tiers.

driverUpsertRequest
object

Optional usage driver relationships, defining how different usage drivers contribute to this fee component's calculations.

Response

200 - application/json

Success

error
string
required

Error message if the operation failed. Null if the operation was successful.

message
string
required

Informational message about the result of the operation.

data
object
required