A CreditTransaction represents a credit charge deducted from a user's balance for performing an AI action or other credit-consuming operation.
Each transaction records the monetary cost of the operation, the equivalent number of credits charged and metadata about the operation that triggered the charge. CreditTransactions are immutable records created through the Charge method and serve as an audit trail for credit usage and billing purposes.
Transaction value in credits and actual price.
App ID of app that initiated the action
Date and time the CreditTransaction was created.
Description of the transaction
External reference ID that links this credit transaction to the specific operation or action that triggered it. This ID is provided by the calling application when creating the transaction and can be used to correlate credit charges with specific AI actions, API calls, or other operations for tracking and reconciliation purposes.
CreditTransaction ID.
Additional context about the operation that triggered this credit transaction. May include details such as the AI feature type, operation parameters, usage metrics, or other relevant information that helps track and understand credit consumption patterns.
Revision number, which increments by 1 each time the CreditTransaction is updated. To prevent conflicting changes, the current revision must be passed when updating the CreditTransaction.
Ignored when creating a CreditTransaction.
Date and time the CreditTransaction was last updated.