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

# Account Rewards

> Use Account Rewards to create a one-time, nonrecurring reward on a credit 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 `/credit/accounts/{account_token}/rewards` endpoint to create a one-time reward on a [credit account](/core-api/credit-accounts/).

Creating a reward triggers the creation of a [journal entry](/core-api/credit-account-journal-entries/) belonging to the `REWARD` group. For more on reward journal entries, see [Rewards](/developer-guides/about-credit-account-journal-entries/#_rewards) in the About Credit Account Journal Entries guide.

For the reward programs that are associated with a reward policy on a bundle, see [About Credit Reward Accounts](/developer-guides/about-credit-reward-accounts/) and [Reward Global Configurations](/core-api/credit-reward-global-configurations/).

<h2 id="create_reward">
  Create account reward
</h2>

**Action:** `POST`\
**Endpoint:** `/credit/accounts/{account_token}/rewards`

Create a reward for an existing credit account.

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

| Fields                                               | Description                                                                                                                                                                                                                                         |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| account\_token<br /><br />string<br /><br />Required | Unique identifier of the credit account for which you want to create a reward.<br /><br />Send a `GET` request to `/credit/accounts` to retrieve existing credit account tokens.<br /><br />**Allowable Values:**<br /><br />Existing account token |

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

| Fields                                               | Description                                                                                                                                                                                                                                                                                             |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Optional          | Unique identifier of the reward.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                                                                |
| description<br /><br />string<br /><br />Required    | Description of the reward.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                     |
| currency\_code<br /><br />string<br /><br />Required | Valid three-digit <a href="https://www.iso.org/iso-4217-currency-codes.html" target="_blank" rel="noopener">ISO 4217 currency code</a>.<br /><br />**Allowable Values:**<br /><br />`USD`                                                                                                               |
| amount<br /><br />decimal<br /><br />Required        | Amount of the reward.<br /><br />**Allowable Values:**<br /><br />0 min                                                                                                                                                                                                                                 |
| note<br /><br />string<br /><br />Optional           | Additional information about the reward.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                       |
| forced<br /><br />boolean<br /><br />Optional        | Allows you to force the creation of a reward on an account.<br /><br />By default, reward creation is not permitted for accounts with a status of `SUSPENDED` or `TERMINATED` if more than 90 days have passed since the status transition.<br /><br />**Allowable Values:**<br /><br />`true`, `false` |

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_rewards_token1234",
  "account_token": "my_account_token_12",
  "type": "CASH_BACK",
  "description": "$20 reward",
  "currency_code": "USD",
  "amount": 20,
  "updated_time": "2023-09-03T22:53:57.895Z",
  "created_time": "2023-09-03T22:53:57.895Z"
}
```

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

| Fields                                                                   | Description                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Returned                              | Unique identifier of the reward.<br /><br />If in the `detail_object`, unique identifier of the detail object.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                      |
| account\_token<br /><br />string<br /><br />Conditionally returned       | Unique identifier of the account on which the reward exists.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                                                                                                                        |
| type<br /><br />string<br /><br />Returned                               | Type of reward.<br /><br />**Allowable Values:**<br /><br />`AUTO_CASH_BACK`, `CASH_BACK`, `STATEMENT_CREDIT`                                                                                                                                                                                                                               |
| description<br /><br />string<br /><br />Returned                        | Description of the reward.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                         |
| currency\_code<br /><br />string<br /><br />Returned                     | Valid three-digit <a href="https://www.iso.org/iso-4217-currency-codes.html" target="_blank" rel="noopener">ISO 4217 currency code</a>.<br /><br />**Allowable Values:**<br /><br />`USD`                                                                                                                                                   |
| amount<br /><br />decimal<br /><br />Returned                            | Amount of the reward.<br /><br />**Allowable Values:**<br /><br />0 min                                                                                                                                                                                                                                                                     |
| applied\_to\_amount<br /><br />decimal<br /><br />Conditionally returned | Total amount to which a percentage reward method is applied (for example, if a 3% reward is applied to 100, then `100` is the `applied_to_amount` value).<br /><br />This field is not applicable for a flat fee method.<br /><br />Returned for auto-cash back reward types only.<br /><br />**Allowable Values:**<br /><br />Format: 0.00 |
| method<br /><br />string<br /><br />Conditionally returned               | Method, either a flat amount or a percentage.<br /><br />**NOTE:** Only `FLAT` is currently supported.<br /><br />**Allowable Values:**<br /><br />`PERCENTAGE`, `FLAT`                                                                                                                                                                     |
| value<br /><br />decimal<br /><br />Conditionally returned               | Value of the percentage or flat amount.<br /><br />Returned for auto-cash back reward types only.<br /><br />**Allowable Values:**<br /><br />Format: 0.00                                                                                                                                                                                  |
| note<br /><br />string<br /><br />Conditionally returned                 | Additional information about the reward.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                           |
| updated\_time<br /><br />datetime<br /><br />Returned                    | Date and time when the reward was last updated on Marqeta’s credit platform, in UTC.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                               |
| created\_time<br /><br />datetime<br /><br />Returned                    | Date and time when the reward was created on Marqeta’s credit platform, in UTC.<br /><br />**Allowable Values:**<br /><br />Format: yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                    |

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

```json JSON lines wrap theme={null}
{
  "token": "my_rewards_token1234",
  "account_token": "my_account_token_12",
  "type": "CASH_BACK",
  "description": "$20 reward",
  "currency_code": "USD",
  "amount": 20,
  "updated_time": "2023-09-03T22:53:57.895Z",
  "created_time": "2023-09-03T22:53:57.895Z"
}
```


## Related topics

- [Reward Accounts](/docs/core-api/credit-reward-accounts.md)
- [About Reward Accounts](/docs/developer-guides/about-credit-reward-accounts.md)
- [Credit Overview](/docs/developer-guides/credit-landing-page.md)
- [About Credit Account Ledger Entries](/docs/developer-guides/about-credit-account-ledger-entries.md)
- [About Credit Accounts](/docs/developer-guides/about-credit-accounts.md)
