SAP BRIM Usage-Based Charging

Workflow capability for real-time usage rating, charging, and balance management in SAP BRIM Convergent Charging. Enables usage event submission, real-time rating against pricing plans, prepaid balance management, and pricing plan governance. Used by telecom engineers, IoT billing teams, and revenue managers.

Run with Naftiko BillingChargingRevenue ManagementSAPUsage-Based Pricing

What You Can Do

GET
Get balance — Get current account balance.
/v1/balances/{accountId}
GET
List pricing plans — List available pricing plans.
/v1/pricing-plans

MCP Tools

rate-usage-event

Rate a single usage event against the applicable SAP BRIM pricing plan.

rate-usage-batch

Rate a batch of usage events in a single request for high-throughput scenarios.

get-account-balance

Get the current prepaid or postpaid balance for a customer account.

read-only
adjust-balance

Apply a credit or debit adjustment to a customer account balance.

list-pricing-plans

List available pricing plans and rate cards in the charging engine.

read-only
get-pricing-plan

Get detailed configuration of a specific pricing plan.

read-only

APIs Used

sap-brim-convergent-charging

Capability Spec

usage-based-charging.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "SAP BRIM Usage-Based Charging"
  description: "Workflow capability for real-time usage rating, charging, and balance management in SAP BRIM Convergent Charging. Enables usage event submission, real-time rating against pricing plans, prepaid balance management, and pricing plan governance. Used by telecom engineers, IoT billing teams, and revenue managers."
  tags:
    - Billing
    - Charging
    - Revenue Management
    - SAP
    - Usage-Based Pricing
  created: "2026-05-02"
  modified: "2026-05-02"

binds:
  - namespace: env
    keys:
      SAP_BRIM_OAUTH_TOKEN: SAP_BRIM_OAUTH_TOKEN

capability:
  consumes:
    - import: sap-brim-convergent-charging
      location: ./shared/convergent-charging.yaml

  exposes:
    - type: rest
      port: 8081
      namespace: sap-brim-usage-charging-api
      description: "Unified REST API for SAP BRIM usage-based charging and balance management."
      resources:
        - path: /v1/balances/{accountId}
          name: account-balance
          description: "Account balance inquiries."
          operations:
            - method: GET
              name: get-balance
              description: "Get current account balance."
              call: "sap-brim-convergent-charging.get-balance"
              with:
                accountId: "rest.accountId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/pricing-plans
          name: pricing-plans
          description: "Pricing plan catalog."
          operations:
            - method: GET
              name: list-pricing-plans
              description: "List available pricing plans."
              call: "sap-brim-convergent-charging.list-pricing-plans"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9081
      namespace: sap-brim-usage-charging-mcp
      transport: http
      description: "MCP server for AI-assisted SAP BRIM usage-based charging operations."
      tools:
        - name: rate-usage-event
          description: "Rate a single usage event against the applicable SAP BRIM pricing plan."
          hints:
            readOnly: false
            idempotent: false
          call: "sap-brim-convergent-charging.rate-usage-event"
          with:
            accountId: "tools.accountId"
            serviceType: "tools.serviceType"
            quantity: "tools.quantity"
          outputParameters:
            - type: object
              mapping: "$."
        - name: rate-usage-batch
          description: "Rate a batch of usage events in a single request for high-throughput scenarios."
          hints:
            readOnly: false
            idempotent: false
          call: "sap-brim-convergent-charging.rate-usage-batch"
          with:
            events: "tools.events"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-account-balance
          description: "Get the current prepaid or postpaid balance for a customer account."
          hints:
            readOnly: true
            openWorld: false
          call: "sap-brim-convergent-charging.get-account-balance"
          with:
            accountId: "tools.accountId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: adjust-balance
          description: "Apply a credit or debit adjustment to a customer account balance."
          hints:
            readOnly: false
            idempotent: false
          call: "sap-brim-convergent-charging.adjust-balance"
          with:
            accountId: "tools.accountId"
            amount: "tools.amount"
            adjustmentType: "tools.adjustmentType"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-pricing-plans
          description: "List available pricing plans and rate cards in the charging engine."
          hints:
            readOnly: true
            openWorld: true
          call: "sap-brim-convergent-charging.list-pricing-plans"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-pricing-plan
          description: "Get detailed configuration of a specific pricing plan."
          hints:
            readOnly: true
            openWorld: false
          call: "sap-brim-convergent-charging.get-pricing-plan"
          with:
            planId: "tools.planId"
          outputParameters:
            - type: object
              mapping: "$."