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

# Rewards

> Connect page that shows what the user has earned under their VPP program and what has been paid.

This page shows what the user has earned under their VPP program, from the reward ledger Flatpeak keeps. The VPP operator pays the rewards; Flatpeak never holds or moves the money.

> [tab] Preview
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/vpp-rewards-external.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=4c5cd595ff31f63c64d903b60fc20a99)

> [tab] Code
>
> ```json Connect response theme={"system"}
> {
>     "connect_session": "cos_6587fa4362341be5b524de3b",
>     "route": "rewards",
>     "live_mode": true,
>     "actions": [
>         "REDIRECT",
>         "BACK",
>         "CLOSE"
>     ],
>     "data": {
>         "device_type": "BATTERY_STORAGE",
>         "location": {
>             "timezone": "America/Denver",
>             "currency_code": "USD"
>         },
>         "accrued": 8.43,
>         "approved": 62.11,
>         "paid": 331.73,
>         "lifetime": 402.27,
>         "operator": {
>             "display_name": "Pick",
>             "url": "https://pick.com/rewards"
>         },
>         "support_reference": "AZ01346701301",
>         "support_email": "help@pick.com"
>     }
> }
> ```
>
> ```bash Your POST to Connect (action) theme={"system"}
> curl --request POST \
>   --url https://connect.flatpeak.com \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "connect_session": "cos_6587fa4362341be5b524de3b",
>     "route": "rewards",
>     "action": "REDIRECT"
>   }'
> ```
>
> #### Response fields
>
> | Field | Description |
> | :- | :- |
> | `accrued` | Earned from delivery. The VPP operator has not confirmed it. |
> | `approved` | Confirmed by the VPP operator and owed to the user. |
> | `paid` | Paid by the VPP operator. |
> | `lifetime` | Total earned since enrollment: the sum of the three above. |
> | `operator` | Display name and rewards page of the VPP operator. |
> | `support_reference` | Reference the user quotes when contacting support. |
> | `support_email` | Support contact for rewards. |
>
> Amounts are in the location's `currency_code`, in large currency units. Your backend reads the same entries with [list device rewards](/docs/energy-api/reference/vpp-enrollments/list-rewards.md).
>
> #### Actions
>
> | Action | Result |
> | :- | :- |
> | `REDIRECT` | Sends the user to `operator.url`, where the VPP operator shows payments and payment details. |
> | `BACK` | Returns the previous page. If there is none, returns `callback_url`. |
> | `CLOSE` | Returns the `callback_url` set on the Connect session. |
>
> #### Errors
>
> | Error code | Description |
> | :- | :- |
> | `data_json_invalid` | Data does not conform to the JSON schema. |
> | `action_invalid` | Action is not available on this route, or is not permitted in the current state. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.