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

# Attribution & Reporting

> Understand where customers begin reimbursement and measure performance across websites, emails, stores, and other entry points.

Flex reimbursement links support URL parameters that let you identify where customers started a consultation, prefill customer information, and attach custom metadata to each session.

## Add attribution to reimbursement links

You can append metadata as key-value pairs to your reimbursement link. For example, use `source` to identify where a customer found the link:

```
https://checkout.withflex.com/pay/l/{payment_link_id}?metadata[source]=order-details
```

You can also include multiple values:

```
https://checkout.withflex.com/pay/l/{payment_link_id}?metadata[source]=email&metadata[campaign]=receipt-email
```

This lets you distinguish activity from different pages, emails, locations, or campaigns.

## Suggested metadata

These are suggested naming conventions, not predefined Flex fields.

| Key | Example value | Purpose |
| - | - | - |
| `source` | `order-details` | Where the customer found the link |
| `source` | `post-purchase-email` | Email attribution |
| `campaign` | `holiday-2026` | Marketing campaign |
| `location` | `store-104` | Retail location |
| `placement` | `receipt-qr` | Specific touchpoint |

## Metadata limits

| Property | Limit |
| - | - |
| Metadata key | 40 characters |
| Metadata value | 500 characters |
| Metadata pairs | Up to 50 per link |

Make sure values are URL-encoded when generating links.

> [!WARNING]
>
> Avoid including sensitive personal information or health information in URL metadata.

## Prefill customer information

Reimbursement links also support standard payment link parameters.

| Parameter | Description |
| - | - |
| `client_reference_id` | Identifier associated with the session |
| `email` | Customer email |
| `first_name` | Customer first name |
| `last_name` | Customer last name |

Example:

```
https://checkout.withflex.com/pay/l/{payment_link_id}?client_reference_id=order-9502&metadata[source]=order-details
```

For all supported parameters, see [Payment Links Overview](https://docs.withflex.com/developer-guides/integration/payment-links/overview.md).

## View reimbursement performance

### Through your Flex partner account

If you already process HSA/FSA payments with Flex, Flex can enable reimbursement on your existing partner account. Reimbursement activity then appears alongside your other activity: aggregate performance in [Flex Analytics](https://dashboard.withflex.com/analytics), and individual sessions in your checkout sessions list.

![Flex Dashboard Analytics page showing revenue, sessions, and conversion](https://mintcdn.com/flex-87/XmR1SME536_Djrbr/images/reimbursements/analytics.png?fit=max\&auto=format\&n=XmR1SME536_Djrbr\&q=85\&s=869ce675928d729bb2780b27151e3f8c)

### Flex-hosted reimbursement

Flex hosts reimbursement for you, so you don't need a Flex account. Flex-hosted activity isn't available in the Flex Dashboard. Flex still tracks every reimbursement session and can send performance reports on request.

## Recommended attribution strategy

Consider using distinct metadata values for each reimbursement entry point:

* Website reimbursement page
* Order confirmation page
* Post-purchase emails
* Customer account pages
* In-store QR codes
* Promotional campaigns

Consistent naming makes it easier to compare reimbursement activity across different placements.

> [!NOTE]
>
> **Reporting:** Flex tracks reimbursement activity and session information. Attribution doesn't establish that an HSA/FSA administrator approved or paid a reimbursement claim.


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