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

# User data and friction

> Trade off integration effort vs widget friction with prefills, webhooks, and progressive enhancement

## The trade-off

When you create a magic link, you choose how much end-user data to send up front. More data means less typing in the widget — and usually higher conversion.

| Approach                     | Partner effort | User friction | When to use                                     |
| ---------------------------- | -------------- | ------------- | ----------------------------------------------- |
| Full prefills                | High           | Lowest        | You already have KYC + payout data              |
| Partial + webhook            | Medium         | Low           | You have some fields; fetch the rest async      |
| Minimal (`referenceId` only) | Low            | Highest       | POC, or flows that collect everything in-widget |

<Note>
  Prefills and `user.data_request` matter most for **m2m** and **request**-style configs. Flows like **smart** and **send** are designed for minimal create payloads — users complete corridor and payment details in the widget. See [M2M flow](/raas-widgets/flows/m2m).
</Note>

## What "friction" means

Friction is every step the user must complete before they can confirm a transfer:

<AccordionGroup>
  <Accordion title="Low friction">
    You prefilled name, ID, DOB, and payout method. The user reviews and confirms.
  </Accordion>

  <Accordion title="Medium friction">
    Some fields are prefilled. Missing CIP fields may trigger a [data request webhook](/raas-widgets/guides/data-requests) or a short form.
  </Accordion>

  <Accordion title="High friction">
    Only `referenceId` is known. The user enters identity and payment data in the widget and completes CIP.
  </Accordion>
</AccordionGroup>

## Prefill shape (`config.userData`)

Typical CIP-related fields (flow-dependent):

| Field                             | Impact if missing                                           |
| --------------------------------- | ----------------------------------------------------------- |
| `name.firstName` / `lastName` / … | User types legal name                                       |
| `idNumber` / `idType`             | User enters ID; may need document capture                   |
| `dob`                             | User picks date of birth                                    |
| `paymentMethod`                   | User adds bank/card (when the flow supports partner payout) |

Example (m2m):

```bash theme={null}
curl -X POST https://raas-widgets-backend-sandbox.up.railway.app/partner/links \
  -H "X-API-Key: raas_sandbox_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceId": "user_12345",
    "flow": "m2m",
    "config": {
      "userData": {
        "name": {
          "firstName": "Juan",
          "lastName": "Garcia"
        },
        "dob": "1990-05-15"
      }
    }
  }'
```

## Progressive enhancement

Start thin, then add data as your systems allow:

<Steps>
  <Step title="MVP">
    Mint links with `referenceId` only (or use [smart](/raas-widgets/flows/smart)). Accept higher friction while you ship.
  </Step>

  <Step title="Add profile fields">
    Pass name (and DOB/ID when available) in `config.userData` for m2m/request.
  </Step>

  <Step title="Handle data requests">
    Implement `user.data_request` so you can fill gaps without blocking the user. See [Data requests](/raas-widgets/guides/data-requests).
  </Step>

  <Step title="Full prefills">
    Send complete CIP + payment method when you have trusted KYC data.
  </Step>
</Steps>

## Precedence

When the same field arrives from multiple sources, RaaS Widgets keeps the highest-priority value:

1. Partner API (link create)
2. Partner webhook (`PUT /partner/data-requests/:id`)
3. Widget (user input)

<Tip>
  Higher-priority data is not overwritten by lower-priority sources. Prefill what you trust; let webhooks and the widget fill gaps.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Data requests" icon="database" href="/raas-widgets/guides/data-requests">
    Respond to missing CIP fields over webhooks.
  </Card>

  <Card title="M2M flow" icon="user" href="/raas-widgets/flows/m2m">
    Prefill-heavy collect / transfer flow.
  </Card>
</CardGroup>
