> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Resource: AI Credits

# Type: Credit Transaction Object

# Link: https://dev.wix.com/docs/api-reference/account-level/ai-credits/credit-transaction-object.md

## Description: 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.

## Schema:

```json
 Type: Credit Transaction Object | type: CreditTransaction
 Description: 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.
       - name: id  | type: string | description: CreditTransaction ID.
           - name: value  | type: string | description: 
       - name: revision  | type: string | description: 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.
           - name: value  | type: string | description: 
       - name: createdDate  | type: string | description: Date and time the CreditTransaction was created.
           - name: seconds  | type: string | description: 
           - name: nanos  | type: number | description: 
       - name: updatedDate  | type: string | description: Date and time the CreditTransaction was last updated.
       - name: amount  | type: Amount | description: Transaction value in credits and actual price.
           - name: credits  | type: number | description: Amount of credits charged
           - name: cost  | type: Money | description: Monetary value of the transaction.
               - name: amount  | type: string | description: Monetary amount in main currency units, formatted as a decimal string with a period as a decimal separator. For example, `3456.99` or `-789`.
               - name: currencyCode  | type: string | description: Currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD`.
               - name: formattedValue  | type: string | description: Localized monetary amount including the currency symbol. For example `1.000,30 €` or `-$12,345.67`.
           - name: creditsExact  | type: string | description: Exact credit value of this action, before sub-credit accumulation (e.g. "0.7"). Negative for reversals.  `credits` is the whole number of credits actually deducted from the balance by this transaction, which can be 0 when the cost was below a whole credit, or larger than this action's own value when it also settled fractions carried over from earlier actions. This field is the action's own price, so it is what a refund reverses and what usage reporting should sum.  Unset on transactions created before sub-credit accumulation, where `credits` was the rounded-up cost.
       - name: description  | type: string | description: Description of the transaction
       - name: callerAppId  | type: string | description: App ID of app that initiated the action
       - name: externalRefId  | type: string | description: 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.
       - name: metadata  | type: Struct | description: 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.
           - name: fields  | type: object | description: 
       - name: idempotencyKey  | type: string | description: 

```