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

# Store credits

> Customer credit balances in 86d. Issue store credit, debit at Checkout, and audit every credit change through the Audit Log Module.

<Warning>
  **Experimental.** This Module has no test or production evidence recorded yet. Read it, run it locally, and hold off on real Orders. See [maturity levels](/docs/resources/versioning).
</Warning>

The Store Credits [Module](/docs/concepts/modules) manages a credit balance for each [Customer](/docs/resources/glossary#customer). You issue or revoke credit; Customers apply available credit at [Checkout](/docs/concepts/commerce-model) in place of payment. The Module records every credit change with a reason and a source, and the balance never goes negative.

**Source:** [`modules/store-credits`](https://github.com/86d-store/86d/tree/main/modules/store-credits) · **npm:** [`@86d-store/store-credits`](https://www.npmjs.com/package/@86d-store/store-credits)

## Installation

```sh theme={null}
86d module add store-credits
```

## Store endpoints

| Method | Path                             | Description              |
| ------ | -------------------------------- | ------------------------ |
| `GET`  | `/store-credits/me/balance`      | Current balance          |
| `GET`  | `/store-credits/me/transactions` | Credit history           |
| `POST` | `/store-credits/me/apply`        | Apply credit at Checkout |

## Admin endpoints

| Method | Path                                      | Description         |
| ------ | ----------------------------------------- | ------------------- |
| `POST` | `/admin/store-credits/:customerId/issue`  | Add credit          |
| `POST` | `/admin/store-credits/:customerId/revoke` | Subtract credit     |
| `GET`  | `/admin/store-credits/:customerId`        | Detail with history |

## Related pages

* [Customers](/docs/modules/customers)
* [Checkout](/docs/modules/checkout)
* [Returns](/docs/modules/returns) for refunds issued as credit
* [Audit log](/docs/modules/audit-log)
* [How commerce records relate](/docs/concepts/commerce-model)
* [Glossary](/docs/resources/glossary)
* [Versioning and maturity](/docs/resources/versioning)
