> For the complete documentation index, see [llms.txt](https://platformdocs.lattica.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platformdocs.lattica.ai/how-to-guides/account-and-finance-operations/how-to-view-credit-balance-and-add-credit-to-your-account.md).

# How-To: View Credit Balance and Add Credit to Your Account

This guide explains how to view your credit balance and add credits to your account using the web console.

***

### Accessing the Credit Balance

You can access your credit balance from two locations in the web console:

1. **Main Page of the Console**
   * Log in to the web console, and your credit balance will be prominently displayed on the main page.
2. **Finance Dashboard**
   * Navigate to the **Finance Page** and access the **Finance Dashboard** for a detailed view of your financial activity.

***

{% tabs %}
{% tab title="🌐Console" %}
On either page, you’ll find the following credit-related information:

<figure><img src="/files/yAwg11SGReqU2TPoNLcl" alt=""><figcaption><p>Balance</p></figcaption></figure>

{% stepper %}
{% step %}

### R**emaining Credit Balance**

* Displays the current amount of credits available in your account.
* These credits are used to pay for **worker runtime**.
  {% endstep %}

{% step %}

### E**stimated Usage Time**

* Provides an approximate estimate of how long the remaining credits will allow your workers to operate.
* **Note**: This calculation depends on the type of workers you are running and their usage rate, so it is an approximation.
  {% endstep %}

{% step %}

### L**ast Payment Date**

Shows the date of your most recent payment, helping you track when credits were last added.
{% endstep %}

{% step %}

### Adding Credits

* Click the "Add Credit" Button
* Follow the prompts to enter your payment information
* Confirm your payment to complete the transaction.
  {% endstep %}
  {% endstepper %}

{% endtab %}

{% tab title="🧊 Python SDK" %}

```python
import lattica_common.auth_local_state as auth
import lattica_common.app_api as agent_app

# Notice your account token expires every 30 days and it's up to you to renew it
auth.set_session_token("your_account_token_you_got_in_your_email")

credits = agent_app.account.get_credits_balance()

if credits < 100:
    try:
        # Add credits to the account
        agent_app.account.add_credits(200)
        print(f"Added {CREDITS_TO_ADD} credits to your account successfully.")
    except Exception as e:
        # Handle any errors that occur during the credit addition
        print(f"Failed to add credits: {e}")
else:
    print("Sufficient credits available. No need to add more credits.")

```

{% endtab %}
{% endtabs %}
