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

# Program Reserve

> Use the Program Reserve API to credit or debit your program reserve account, and to return program reserve balances and transactions.

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 Program Reserve API to retrieve program reserve account balances and transactions.

<h2 id="get_programreserve_balances">
  Retrieve reserve account balances
</h2>

**Action:** `GET`\
**Endpoint:** `/programreserve/balances`

{/* <EndpointCard
title="Returns the latest balance in the program reserve account"
path="/programreserve/balances"
method="get"
/> */}

Use this endpoint to return balances for your program reserve account (sometimes referred to as a *program funding account*).

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

| Fields                                                                  | Description                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| available\_balance<br /><br />decimal<br /><br />Conditionally returned | Ledger balance, minus any authorized transactions that have not yet cleared. When using JIT Funding, this balance is usually equal to \$0.00.<br /><br />**Allowable Values:**<br /><br />decimal<br /><br />**Format:**<br />0.00                                                                                                                        |
| balances<br /><br />object<br /><br />Conditionally returned            | Contains program reserve account balance information, organized by currency code. Sometimes referred to as a *program funding account*.<br /><br />**Allowable Values:**<br /><br />Valid `balances` object                                                                                                                                               |
| credit\_balance<br /><br />decimal<br /><br />Conditionally returned    | Not currently in use.<br /><br />**Allowable Values:**<br /><br />Not applicable                                                                                                                                                                                                                                                                          |
| currency\_code<br /><br />string<br /><br />Conditionally 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>                                                                                                                                    |
| ledger\_balance<br /><br />decimal<br /><br />Conditionally 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 />decimal<br /><br />**Format:**<br />0.00 |
| pending\_credits<br /><br />decimal<br /><br />Conditionally returned   | ACH loads that have been accepted, but for which the funding time has not yet elapsed.<br /><br />**Allowable Values:**<br /><br />decimal<br /><br />**Format:**<br />0.00                                                                                                                                                                               |

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

```json JSON lines wrap theme={null}
{
  "currency_code": "USD",
  "ledger_balance": 10100,
  "available_balance": 10100,
  "pending_credits": 0,
  "balances": {
    "USD": {
      "currency_code": "USD",
      "ledger_balance": 10100,
      "available_balance": 10100,
      "pending_credits": 0
    }
  }
}
```

<h2 id="get_programreserve_transactions">
  List program reserve transactions
</h2>

**Action:** `GET`\
**Endpoint:** `/programreserve/transactions`

{/* <EndpointCard
title="Returns a list of program reserve transactions (credits and debits)"
path="/programreserve/transactions"
method="get"
/> */}

Use this endpoint to return a list of credits and debits made to your program reserve account.

This endpoint supports [sorting and pagination](/core-api/sorting-and-pagination/).

<h3 id="_url_query_parameters">
  URL query parameters
</h3>

| Fields                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count<br /><br />integer<br /><br />Optional        | Number of resources to retrieve.<br /><br />**Allowable Values:**<br /><br />1-10<br /><br />**Default value:**<br />5                                                                                                                                                                                                                                                                                               |
| start\_index<br /><br />integer<br /><br />Optional | Sort order index of the first resource in the returned array.<br /><br />**Allowable Values:**<br /><br />Any integer<br /><br />**Default value:**<br />5                                                                                                                                                                                                                                                           |
| sort\_by<br /><br />string<br /><br />Optional      | Field on which to sort. Use any field in the resource model, or one of the system fields `lastModifiedTime` or `createdTime`. Prefix the field name with a hyphen (`-`) to sort in descending order. Omit the hyphen to sort in ascending order.<br /><br />**Allowable Values:**<br /><br />`createdTime`, `lastModifiedTime`, or any field in the resource model<br /><br />**Default value:**<br />`-createdTime` |

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

| Fields                                                                             | Description                                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| count<br /><br />integer<br /><br />Conditionally returned                         | Number of resources to retrieve.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />1-10                                                                                                                   |
| data<br /><br />array of objects<br /><br />Conditionally returned                 | List of program reserve transactions.<br /><br />Objects are returned as appropriate to your query.<br /><br />**Allowable Values:**<br /><br />Valid array of one or more program reserve transaction objects                                                                       |
| data\[].**amount**<br /><br />decimal<br /><br />Conditionally returned            | Amount of the program reserve account credit or debit. Sometimes referred to as a *program funding account*.<br /><br />**Allowable Values:**<br /><br />decimal<br /><br />**Format:**<br />0.00                                                                                    |
| data\[].**created\_time**<br /><br />datetime<br /><br />Returned                  | Date and time when the resource was created, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                           |
| data\[].**currency\_code**<br /><br />string<br /><br />Conditionally 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>                                                               |
| data\[].**last\_modified\_time**<br /><br />datetime<br /><br />Returned           | The date and time when the resource was last modified, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                 |
| data\[].**memo**<br /><br />string<br /><br />Conditionally returned               | Memo or note describing the transaction.<br /><br />**Allowable Values:**<br /><br />99 char max                                                                                                                                                                                     |
| data\[].**state**<br /><br />string<br /><br />Conditionally returned              | Transaction state.<br /><br />**Allowable Values:**<br /><br />`PENDING`, `COMPLETE`                                                                                                                                                                                                 |
| data\[].**tags**<br /><br />string<br /><br />Conditionally returned               | Comma-delimited list of tags describing the transaction.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                    |
| data\[].**token**<br /><br />string<br /><br />Conditionally returned              | The unique identifier of the transaction response.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                           |
| data\[].**transaction\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of the transaction.<br /><br />**Allowable Values:**<br /><br />Existing transaction token                                                                                                                                                                         |
| data\[].**type**<br /><br />string<br /><br />Conditionally returned               | Transaction type.<br /><br />**Allowable Values:**<br /><br />`CREDIT`, `DEBIT`, `PENDING_CREDIT`, `PENDING_DEBIT`                                                                                                                                                                   |
| end\_index<br /><br />integer<br /><br />Conditionally returned                    | Sort order index of the last resource in the returned array.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                |
| is\_more<br /><br />boolean<br /><br />Conditionally returned                      | A value of `true` indicates that more unreturned resources exist. A value of `false` indicates that no more unreturned resources exist.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />`true`, `false` |
| start\_index<br /><br />integer<br /><br />Conditionally returned                  | Sort order index of the first resource in the returned array.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                               |

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

```json JSON expandable lines wrap theme={null}
{
  "count": 2,
  "start_index": 0,
  "end_index": 1,
  "is_more": false,
  "data": [
    {
      "created_time": "2024-02-10T21:52:18Z",
      "last_modified_time": "2024-02-10T21:52:18Z",
      "token": "my_deposit_02",
      "amount": 120,
      "currency_code": "USD",
      "memo": "my_memo",
      "tags": "my, tags",
      "transaction_token": "154",
      "type": "CREDIT"
    },
    {
      "created_time": "2024-02-10T21:51:28Z",
      "last_modified_time": "2024-02-10T21:51:28Z",
      "token": "my_deposit_01",
      "amount": 100,
      "currency_code": "USD",
      "memo": "my_memo",
      "tags": "my, tags",
      "transaction_token": "153",
      "type": "CREDIT"
    }
  ]
}
```
