> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Balances

> Use the balances endpoint to retrieve general purpose account balance details for users and businesses.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

Use the `/balances` endpoint to retrieve the following general purpose account (GPA) balance details for a user or business:

* **Ledger balance** - When using standard funding: The funds that are available to spend immediately, including funds from any authorized transactions that have not yet cleared. When using Just-in-Time (JIT) Funding: Authorized funds that are currently on hold, but not yet cleared.

* **Available balance** - The ledger balance minus any authorized transactions that have not yet cleared. Also known as the cardholder’s purchasing power. If you are using JIT Funding, this balance is usually 0.00.

* **Cached balance** - Not currently used.

* **Credit balance** - Not currently used.

* **Pending credits** - ACH loads that have been accepted, but for which the funding time has not yet elapsed.

<h2 id="get_balances_token">
  Retrieve GPA balances
</h2>

**Action:** `GET`\
**Endpoint:** `/balances/{token}`

{/* <EndpointCard
title="Returns account balances for a cardholder"
path="balances/{token}"
method="get"
/> */}

Use this endpoint to return general purpose account (GPA) balances for a user or a business. The response object includes a link to balances of related user GPAs.

<h3 id="_url_path_parameters">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                                               |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Unique identifier of the user or business for which you want to return GPA balances.<br /><br />**Allowable Values:**<br /><br />Existing user or business resource token |

<h3 id="_response_body">
  Response body
</h3>

| Fields                                                                        | Description                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gpa<br /><br />object<br /><br />Returned                                     | Returns general purpose account (GPA) balances for a user or business.<br /><br />**Allowable Values:**<br /><br />`available_balance`, `balances`, `cached_balance`, `credit_balance`, `currency_code`, `impacted_amount`, `last_updated_time`, `ledger_balance`, `pending_credits`                                          |
| gpa.**available\_balance**<br /><br />decimal<br /><br />Returned             | Ledger balance minus any authorized transactions that have not yet cleared. Also known as the cardholder’s purchasing power. When using JIT Funding, this balance is usually equal to \$0.00.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                        |
| gpa.**balances**<br /><br />object<br /><br />Returned                        | Contains GPA balance information, organized by currency code.<br /><br />**Allowable Values:**<br /><br />One or more balances objects                                                                                                                                                                                        |
| gpa.**cached\_balance**<br /><br />decimal<br /><br />Returned                | Not currently in use.<br /><br />**Allowable Values:**<br /><br />Not applicable                                                                                                                                                                                                                                              |
| gpa.**credit\_balance**<br /><br />decimal<br /><br />Returned                | Not currently in use.<br /><br />**Allowable Values:**<br /><br />Not applicable                                                                                                                                                                                                                                              |
| gpa.**currency\_code**<br /><br />string<br /><br />Returned                  | Three-digit ISO 4217 currency code.<br /><br />**Allowable Values:**<br /><br />Valid three-digit <a href="https://www.iso.org/iso-4217-currency-codes.html" target="_blank" rel="noopener">ISO 4217 currency code</a>.                                                                                                       |
| gpa.**impacted\_amount**<br /><br />decimal<br /><br />Conditionally returned | Balance change based on the amount of the transaction.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                                                                                               |
| gpa.**last\_updated\_time**<br /><br />datetime<br /><br />Returned           | Date and time when the resource was last updated, in UTC.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                            |
| gpa.**ledger\_balance**<br /><br />decimal<br /><br />Returned                | When using standard funding: The funds that are available to spend immediately, including funds from any authorized transactions that have not yet cleared. When using Just-in-Time (JIT) Funding: Authorized funds that are currently on hold, but not yet cleared.<br /><br />**Allowable Values:**<br /><br />Format: 0.00 |
| gpa.**pending\_credits**<br /><br />decimal<br /><br />Returned               | ACH loads that have been accepted, but for which the funding time has not yet elapsed.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                                                               |
| links<br /><br />array of objects<br /><br />Returned                         | Array of links to balances of related user GPAs.<br /><br />**Allowable Values:**<br /><br />Valid array of one or more `links` objects                                                                                                                                                                                       |
| links\[].**href**<br /><br />string<br /><br />Returned                       | URL of the requested `/balances` resource.<br /><br />**Allowable Values:**<br /><br />A valid URL                                                                                                                                                                                                                            |
| links\[].**method**<br /><br />string<br /><br />Returned                     | The HTTP method of the link.<br /><br />**Allowable Values:**<br /><br />`GET` currently supported                                                                                                                                                                                                                            |
| links\[].**rel**<br /><br />string<br /><br />Returned                        | Specifies the relationship between the current resource and the linked resource.<br /><br />**Allowable Values:**<br /><br />`gpa` currently supported                                                                                                                                                                        |

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "gpa": {
    "currency_code": "USD",
    "ledger_balance": 1000,
    "available_balance": 990,
    "pending_credits": 0,
    "balances": {
      "USD": {
        "currency_code": "USD",
        "ledger_balance": 1000,
        "available_balance": 990,
        "pending_credits": 0
      }
    }
  },
  "links": {
    "rel": "gpa",
    "method": "GET",
    "href": "/v3/balances/my_user_01/gpa"
  }
}
```


## Related topics

- [Balance Refunds](/docs/core-api/credit-account-balance-refunds.md)
- [Activity Balances](/docs/diva-api/activity-balances.md)
- [Program Balances Settlement](/docs/diva-api/program-balances-settlement.md)
- [Program Funding Balances](/docs/diva-api/program-funding-balances.md)
- [Activity Balances Funding Day](/docs/diva-api/activity-balances-funding-day.md)
