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

# Fee Refunds

> Use the fee refunds endpoint to refund fees to an account holder's general purpose account.

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 `/feerefunds` endpoint to refund fees to your account holder’s general purpose account (GPA).

<h2 id="post_fee_refunds">
  Create fee refund
</h2>

**Action:** `POST`\
**Endpoint:** `/feerefunds`

{/* <EndpointCard
title="Creates a fee refund"
path="/feerefunds"
method="post"
/> */}

Use this endpoint to create a fee refund. Include the fee charge `token` path parameter to specify the fee to return.

If there are insufficient funds in your fee account to refund the fee, funds are drawn from your program reserve account.

<h3 id="_request_body">
  Request body
</h3>

| Fields                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| original\_fee\_transaction\_token<br /><br />string<br /><br />Optional | Unique identifier of the fee to be refunded.<br /><br />You can find this token in the response of the original `/feecharges` or `/gpaorders` request used to assess the standalone fee or from the webhook corresponding to the original request. You can also send a `GET` request to `/transactions?type=fee.charges` to retrieve a list of fee transactions.<br /><br />**Allowable Values:**<br /><br />36 char max |
| tags<br /><br />string<br /><br />Optional                              | Descriptive metadata about the fee.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                             |

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

| Fields                                                               | Description                                                                                                                                                           |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| business\_token<br /><br />string<br /><br />Returned                | Specifies the business account holder to which the fee applies.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                |
| created\_time<br /><br />datetime<br /><br />Returned                | Date and time when the `fee_charge` object was created, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ |
| fees<br /><br />array of objects<br /><br />Returned                 | Contains attributes that define characteristics of one or more fees.<br /><br />**Allowable Values:**<br /><br />Array of existing `fees` objects                     |
| fees\[].**fee**<br /><br />object<br /><br />Returned                | Contains details about the fee.<br /><br />**Allowable Values:**<br /><br />`amount`, `created_time`, `currency_code`, `last_modified_time`, `name`, `tags`, `token`  |
| fees\[].**memo**<br /><br />string<br /><br />Conditionally returned | Additional text that describes the fee transfer.<br /><br />**Allowable Values:**<br /><br />1–99 chars                                                               |
| fees\[].**tags**<br /><br />string<br /><br />Conditionally returned | Descriptive metadata about the fee.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                          |
| fees\[].**token**<br /><br />string<br /><br />Returned              | Unique identifier of the fee.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                  |
| fees\[].**transaction\_token**<br /><br />string<br /><br />Returned | Unique identifier of the fee transaction.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                     |
| tags<br /><br />string<br /><br />Conditionally returned             | Metadata about the fee charge.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />255 char max               |
| token<br /><br />string<br /><br />Returned                          | Unique identifier of the fee transfer.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                         |
| user\_token<br /><br />string<br /><br />Returned                    | Specifies the user account holder to which the fee applies.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                    |


## Related topics

- [Fees](/docs/core-api/fees.md)
- [About Credit Account Ledger Entries](/docs/developer-guides/about-credit-account-ledger-entries.md)
- [About Credit Account Journal Entries](/docs/developer-guides/about-credit-account-journal-entries.md)
- [Account Refunds](/docs/core-api/credit-account-refunds.md)
- [Balance Refunds](/docs/core-api/credit-account-balance-refunds.md)
