> ## 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.

# Reimbursement

> Learn how to set up reimbursement integrations where consumers receive a Letter of Medical Necessity to file for reimbursement.

In a reimbursement integration, the consumer would fill out the intake form and if a consumer qualifies they will receive a Letter of Medical Necessity for their records to file for reimbursement.

<Note>
  Reimbursement is part of the functionality we offer to select merchants. If you want access to this feature, contact Flex Support.
</Note>

## Getting started

Generate a checkout session of type reimbursement with the items that you would like a consumer to reimburse for.

```bash theme={null}
curl --request POST \
  --url https://api.withflex.com/v1/checkout/sessions \
  --header 'authorization: Bearer <flex_api_key>' \
  --header 'content-type: application/json' \
  --data '{"checkout_session": {"line_items": [{"product": "fprod_01jgjwnxashqsj0t7s7fey7jak"}],"success_url": "https://example.com/thank-you?success=true","mode": "reimbursement","cancel_url": "https://example.com/thank-you?canceled=true"}}'
```

## The consultation object

```json theme={null}
{
  "consultation_id": "fcons_2c963f66afa6",
  "consultation_type": "fitness",
  "status": "complete",
  "customer": "fcus_01jdjxzxpzban2j2za1qp4jc8y",
  "created_at": "2025-01-23T14:00:00Z",
  "test_mode": true
}
```

## Webhooks

If you want to trigger any action after a consultation such as triggering an email or updating a field in your Database for tracking, you can do so by subscribing to the following webhooks.

***

**consultation.approved** where `object` is the consultation object

Occurs whenever a customer has been approved

***

**consultation.expired** where `object` is the consultation object

Occurs whenever a customer's consultation has expired

***

**customer.consultation.attached** where `object` is the customer object

Occurs whenever a consultation object has been attached to the customer
