> ## Documentation Index
> Fetch the complete documentation index at: https://lago-ftr-wallet-improvements.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The wallet object

> This object represents a wallet, holding free or prepaid credits.

<RequestExample>
  ```json The wallet object
  {
    "wallet": {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "external_customer_id": "hooli_1234",
      "status": "active",
      "currency": "USD",
      "name": "Prepaid",
      "rate_amount": "1.5",
      "credits_balance": "28.0",
      "balance_cents": 1000,
      "consumed_credits": "2.0",
      "created_at": "2022-04-29T08:59:51Z",
      "expiration_at": null,
      "last_balance_sync_at": "2022-04-29T08:59:51Z",
      "last_consumed_credit_at": "2022-04-29T08:59:51Z",
      "terminated_at": "2022-09-14T16:35:31Z",
      "recurring_transaction_rules": [
        {
          "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
          "rule_type": "interval",
          "interval": "monthly",
          "threshold_credits": "20.0",
          "paid_credits": "20.0",
          "granted_credits": "10.0",
          "created_at": "2022-04-29T08:59:51Z"
        }
      ],
      "ongoing_balance_cents": 800,
      "ongoing_usage_balance_cents": 200,
      "credits_ongoing_balance": "8.0",
      "credits_ongoing_usage_balance": "2.0"
    }
  }
  ```
</RequestExample>

## Attributes

<ResponseField name="wallet" type="object">
  <Expandable title="object" defaultOpen="true">
    <ResponseField name="balance_cents" type="integer" required>
      The current wallet balance expressed in cents.
    </ResponseField>

    <ResponseField name="consumed_credits" type="string" required>
      The number of consumed credits.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      The date of the wallet creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
    </ResponseField>

    <ResponseField name="credits_balance" type="string" required>
      The current wallet balance expressed in credits.
    </ResponseField>

    <ResponseField name="currency" type="string" required>
      The currency of the wallet.
    </ResponseField>

    <ResponseField name="expiration_at" type="string">
      The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
    </ResponseField>

    <ResponseField name="external_customer_id" type="string" required>
      The customer external unique identifier (provided by your own application).
    </ResponseField>

    <ResponseField name="lago_customer_id" type="string" required>
      Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer’s record within the Lago system.
    </ResponseField>

    <ResponseField name="lago_id" type="string" required>
      Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet’s record within the Lago system.
    </ResponseField>

    <ResponseField name="last_balance_sync_at" type="string">
      The date and time of the last balance top-up. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
    </ResponseField>

    <ResponseField name="last_consumed_credit_at" type="string">
      The date and time of the last credits consumption. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
    </ResponseField>

    <ResponseField name="name" type="string" required>
      The name of the wallet.
    </ResponseField>

    <ResponseField name="rate_amount" type="string" required>
      The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      The status of the wallet. Possible values are `active` or `terminated`.
    </ResponseField>

    <ResponseField name="terminated_at" type="string">
      The date of terminaison of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
    </ResponseField>

    <ResponseField name="recurring_transaction_rules" type="array">
      List of recurring transaction rules. Currently, we only allow one recurring rule per wallet.

      <Expandable title="array">
        <ResponseField name="created_at" type="string">
          The date of the recurring rule creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
        </ResponseField>

        <ResponseField name="granted_credits" type="string">
          The number of free granted credits. Required only if there is no paid credits.
        </ResponseField>

        <ResponseField name="interval" type="string">
          The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when rule type is `interval`.
        </ResponseField>

        <ResponseField name="lago_id" type="string">
          Unique identifier assigned to the recurring rule within a wallet in the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the recurring rule record within the Lago system.
        </ResponseField>

        <ResponseField name="paid_credits" type="string">
          The number of paid credits. Required only if there is no granted credits.
        </ResponseField>

        <ResponseField name="rule_type" type="string">
          The rule type. Possible values are `interval` or `threshold`.
        </ResponseField>

        <ResponseField name="threshold_credits" type="string">
          The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when rule type is set to `threshold`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="ongoing_balance_cents" type="integer" required>
      The wallet ongoing balance expressed in cents.
    </ResponseField>

    <ResponseField name="ongoing_usage_balance_cents" type="integer" required>
      The wallet ongoing usage balance expressed in cents.
    </ResponseField>

    <ResponseField name="credits_ongoing_balance" type="string" required>
      The wallet ongoing balance expressed in credits.
    </ResponseField>

    <ResponseField name="credits_ongoing_usage_balance" type="string" required>
      The wallet ongoing usage balance expressed in credits.
    </ResponseField>
  </Expandable>
</ResponseField>
