# Credits are not being deducted

## When does this happen?

Very rarely. But when it does, we want the diagnosis to be as easy as possible. Three typical constellations:

1. **Technical error during the tool run:** the platform refunded automatically.
2. **Job aborted before completion:** for example by closing the browser during processing.
3. **Suspected bug:** very rare, but worth documenting.

---

## How the credit system normally works

Every tool run that costs credits passes through three phases, the **reserve, compute, commit/refund** pattern:

| Phase | What happens | Credit status |
|---|---|---|
| **Reserve** | The platform reserves the estimated credit amount on your account | Available balance drops, reserved amount rises |
| **Compute** | The tool calls the AI provider and processes the result | The reserve stays unchanged |
| **Commit** | On success: the actual consumption is finally debited | The reserve becomes consumption, the difference flows back to the balance |
| **Refund** | On error: the reserve is fully returned | The available balance returns to its starting value |

The pattern guarantees that **no tool run happens without a booking**: either commit or refund. Even if the platform crashes mid-run, a cleanup job runs at the next start and either commits or refunds open reserves.

---

## The most common reason: an automatic refund

If a tool run appears to have been "free", the most likely cause is: an error occurred between reserve and commit, and the platform **refunded automatically**. Typical triggers:

- The AI provider returned a timeout or an error.
- An internal validation (e.g. output schema) failed.
- The compute backend was restarted during the call (e.g. a deployment).

What you see in the interface can be misleading: the tool may already show a **partial result**, such as an exposé with missing sections or an aborted floorplan. The platform judged this result as "not worth committing" and refunded accordingly.

For you this means: **the result may be incomplete or visibly broken, and the run was free**. Simply start the run again.

---

## Step by step: verify in the credit history

1. Go to **Settings > Billing > Credit history**.
2. Find the entry around the time of the tool run.
3. Look at the **Type** column:
   - *Consumed:* credits were finally debited (commit).
   - *Refunded:* credits were returned (automatic refund).
   - *Reserved:* the run is still in progress (should turn into *Consumed* or *Refunded* within a few minutes).

For a *Refunded* entry, the detail view shows a **reason** (e.g. "provider timeout", "output validation failed") and a reference to the original reserve.

---

## If the entry is missing from the credit history

If you find **no entry at all** for your tool run (neither consumption nor refund), one of the three bookings evidently never happened. That is a bug, not normal behavior. Please contact support.

What support needs for the diagnosis:

- **Tenant ID** (shown under *Settings > Account*)
- **Tool name** (e.g. "Exposé generator", "Smart floorplan")
- **Approximate time** of the tool run (date + time, time zone)
- **URL of the tool result page** (from the browser tab, ideally as a screenshot)
- **What you saw:** a short description: what should the tool do, what actually happened, what was displayed?
- If available: **browser console logs** (DevTools > Console > copy the content)

With this data support can trace the run in the backend, set the missing booking manually and pass the cause on to engineering.

---

## What technically cannot happen

The platform architecture guarantees: **an AI call is never executed without a booking on one of the three tracks (reserve, commit, refund).** If you find nothing in the credit history, it means one of two things:

- The tool never actually executed (for example because the action was cancelled before it started). Then no booking is correct.
- There is a bug on the platform side. Then the entry must still exist in the audit log and can be reconstructed manually.

Both can be resolved with support's help.

---

## Goodwill for user mistakes

For every **technical** error the platform refunds credits automatically. If you **discard a result yourself** (you started a run but rejected the outcome because you did not like the style), there is **no automatic refund**. The AI call was billed and the costs were incurred with the provider.

You can contact support in such cases. We review individual cases on a goodwill basis, especially when a tool is new and its result behavior was not yet clearly documented. Blanket refunds for "I did not like the result" are not possible, because we in turn pay the AI provider for the consumption.

---

## Summary

- For every technical error the platform refunds automatically.
- The refund is visible in the credit history together with a reason.
- If every entry is missing, it is a bug: contact support with tenant ID, tool, time and URL.
- Discarding a result yourself is not an automatic refund: contact support if needed.
