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

# Cashback Progress

> How close a customer is to the next cashback payout

<span style={{display:"none"}}>For the complete documentation index, see [llms.txt](/llms.txt).</span>

Returns how much the customer has spent toward their next cashback payout. Use this to show progress bars or "spend X more to earn Y tokens" prompts.

### Query Parameters

<ParamField query="customer_ref" type="string" required>
  Your unique identifier for this customer
</ParamField>

<ParamField query="currency" type="string" required>
  Currency to display amounts in (e.g. `KES`, `USD`)
</ParamField>

### Response

<ResponseField name="spent" type="string">
  How much the customer has spent in the current cycle (in requested currency, 2 decimals)
</ResponseField>

<ResponseField name="threshold" type="string">
  Spend threshold for one cashback payout
</ResponseField>

<ResponseField name="remaining" type="string">
  Amount still to spend before the next payout
</ResponseField>

<ResponseField name="currency" type="string">
  Currency code matching the request
</ResponseField>

```javascript theme={null}
const res = await fetch(
  "https://tokens.shakesco.com/cashback-progress?customer_ref=customer-123&currency=KES",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const progress = await res.json();
```

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "spent": "320.00",
    "threshold": "500.00",
    "remaining": "180.00",
    "currency": "KES"
  }
  ```
</ResponseExample>
