Credit Commit EDRs

Purpose

Credit Commit EDRs are generated by the OCS “engine” subsystem when a credit is applied to an account through the engine (in comparison to through the /resources/ API, which allows direct bucket creation on wallets).

Example

{
  "type": "credit-commit",
  "node-name": "strange",
  "event-timestamp": "2023-03-26T22:07:47.478980Z",
  "correlation-info": {
    "slee-session-id": "15749ef2-e072-431c-8ab9-4c02a01e206f",
    "slee-event-id": "2/2",
    "ocs-inner-intent": {
      "intention": "SERVICE_VALUE_PACK",
      "subscription-id": "vcnTXS",
      "value-pack-id": "6420c233ec4e334c86124434"
    }
  },
  "source-info": {
    "source-service": "localhost:58772",
    "source-system": "n2ocs",
    "source-endpoint": "localhost:10800",
    "source-subsystem": "http-api"
  },
  "status-message": "",
  "rating-info": {
    "balance-initial": [
      {
        "bucket-info": {
          "bucket-id": "WbRLBR",
          "bucket-amount": 100,
          "bucket-unit": "microcents"
        }
      }
    ],
    "balance-current": [
      {
        "bucket-info": {
          "bucket-id": "WbRLBR",
          "bucket-amount": 100,
          "bucket-unit": "microcents"
        }
      },
      {
        "bucket-info": {
          "bucket-id": "oqlULA",
          "bucket-amount": 1024,
          "bucket-unit": "bytes",
          "derived-from": "service,6420c233ec4e334c86124434,TestService credit only"
        }
      }
    ],
    "policies": [],
    "ancillary-info": {},
    "rating-applied": [
      {
        "bucket-amount": 0,
        "bucket-unit": "microcents"
      },
      {
        "bucket-amount": -1024,
        "bucket-unit": "bytes"
      }
    ],
    "credit-requested": [
      {
        "bucket-info": {
          "bucket-id": "sRcZmS",
          "bucket-amount": 1024,
          "bucket-unit": "bytes"
        }
      }
    ],
    "rating-timestamp": "2023-03-26T22:07:47.449663Z",
    "context-info": {
      "derived_from": "service,6420c233ec4e334c86124434,TestService credit only"
    }
  },
  "account-info": {
    "account-id": "TestAccountdaae354b-54c1-4ce9-be8b-c49ae6ad40db"
  }
}

Fields

Field Type Presence Description
account-info Object Always Information on the wallet against which the credit applied.
account-info.account-id String Always The unique ID of the wallet against which the credit was applied.
rating-applied Object Always A breakdown of the credits that were applied to the subscriber in terms of types of value.
policies Array Always A list of policies that were applied to this credit event.
context-info Object Always The information provided to this rating event from the client. This will include, for example, derived_from which is a description of the source of the funds which is stored with the bucket.
ancillary-info Object Always When a credit event is performed as part of a greater action - e.g. a voucher redemption, ancillary information is passed through the engine and included in the EDR in this object.
rating-timestamp Timestamp Always The timestamp that the event was considered to have taken place. This may not be the same as the wall-clock time - i.e. it can be altered by the client.
credit-requested Array Always An array of units and amounts requested by the client to apply to the wallet.
balance-initial Array Always An array of the balances that were available prior to the credit.
balance-current Array Always An array of the balances that were available after the credit was applied.