The charged-type metric (numeric type) is used to track user usage, calculate and charge the amount at period end.

The metric system integrates with the UniBee API, which provides event-based statistics.

You can report usage data by sending events to the Event API.

The metric counting for each product, you may need specified for the productId at Event API, default product will used if not specified

Aggregation Type of Count metric event, it increases 1 usage number

curl --location --request POST "$UniBee_API_Host/merchant/merchant_metric/merchant_metric_event" \
  --header "Authorization: Bearer $YOUR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "metricCode": "folder_count_limit", // code needs to be configured in advance in the UniBee portal
    "externalUserId": "$YOUR_USER_ID",
    "externalEventId": "string", // string, **unique**, e.m. [folderId]
    "metricProperties": {}
}'

same externalEventId , no double counting

Aggregation Type of Latest metric event, it Inspect 5, event of Latest type will not be add up

curl --location --request POST "$UniBee_API_Host/merchant/merchant_metric/merchant_metric_event" \
  --header "Authorization: Bearer $YOUR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "metricCode": "active_profile_limit", // code needs to be configured in advance in the UniBee portal
    "externalUserId": "$YOUR_USER_ID",
    "externalEventId": "string", // string, **unique**, e.m. [folderId]
    "metricProperties": {
      "active_profile": 5
    }
}'

Define how much cost for every event at Plan definision after complete set-up your billable metric

  • Go to the Plan Definition page
  • Navigate to Advanced Setup, add a billing model under Usage-based billing, and choose your Pricing type:
    • Standard pricing A fixed rate is applied for each unit of usage. For example, if the unit price is 0.05andausergenerates100events,theywillbecharged0.05 and a user generates 100 events, they will be charged 5.
    • Graduated pricing Usage is divided into tiers, and each tier has a different rate. For example:
      • First 100 events: $0.05 each
      • Next 200 events: $0.03 each
      • Remaining events: $0.01 each
        This model encourages higher usage by reducing unit costs at higher volumes.

Check the customer’s current metric statistics

  • Go to User-Detail Page at UniBee Admin Portal
  • Tab to Metering-Usage Page, check current billing period charged metered usage data
  • Charged metered usage amount will append to next invoice items automatically