Credit Transaction Object


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.

Properties
amountAmount

Transaction value in credits and actual price.


callerAppIdstringRead-onlyformat GUID

App ID of app that initiated the action


createdDatestringRead-onlyformat date-time

Date and time the CreditTransaction was created.


descriptionstringmaxLength 100

Description of the transaction


externalRefIdstringformat GUID

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.


idstringRead-onlyformat GUID

CreditTransaction ID.


idempotencyKeystringformat GUID

metadataStruct

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.


revisionstringRead-onlyformat int64

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.


updatedDatestringRead-onlyformat date-time

Date and time the CreditTransaction was last updated.

Did this help?