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

# Quick Start

> Create your first RaaS Widgets magic link with the smart flow in minutes

## Prerequisites

Before you begin, make sure you have:

* A RaaS Widgets partner account (contact [sales@leapfinancial.com](mailto:sales@leapfinancial.com))
* A sandbox API key from the [Partner Portal](https://raas-widgets-partner-portal-sandbox.up.railway.app/)
* The `smart` flow enabled on your partner (`allowedFlows`)

<Note>
  Use your sandbox API key (`raas_sandbox_*`) for this guide.
</Note>

## Create your first magic link

The **smart** flow is the lowest-friction starting point: you only need a `referenceId`. The end user completes corridor, amount, and payment details inside the widget.

<Steps>
  <Step title="Make the API call">
    <CodeGroup>
      ```bash cURL 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": "smart",
          "expiresInMinutes": 60
        }'
      ```

      ```javascript Node.js theme={null}
      const response = await fetch(
        'https://raas-widgets-backend-sandbox.up.railway.app/partner/links',
        {
          method: 'POST',
          headers: {
            'X-API-Key': 'raas_sandbox_your_api_key_here',
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            referenceId: 'user_12345',
            flow: 'smart',
            expiresInMinutes: 60,
          }),
        },
      );

      const data = await response.json();
      console.log(data.data.url);
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          'https://raas-widgets-backend-sandbox.up.railway.app/partner/links',
          headers={
              'X-API-Key': 'raas_sandbox_your_api_key_here',
              'Content-Type': 'application/json',
          },
          json={
              'referenceId': 'user_12345',
              'flow': 'smart',
              'expiresInMinutes': 60,
          },
      )

      print(response.json()['data']['url'])
      ```
    </CodeGroup>
  </Step>

  <Step title="Get the response">
    ```json Response theme={null}
    {
      "success": true,
      "data": {
        "linkId": "link_yourpartner_a1b2c3d4e5f6",
        "referenceId": "user_12345",
        "status": "created",
        "url": "https://<smart-flow-host>/link_yourpartner_a1b2c3d4e5f6",
        "token": "550e8400-e29b-41d4-a716-446655440000",
        "expiresAt": "2026-07-23T15:30:00.000Z",
        "createdAt": "2026-07-23T14:30:00.000Z"
      }
    }
    ```

    <Check>
      You now have a magic link. Deliver `data.url` to your user.
    </Check>
  </Step>

  <Step title="Send the link to your user">
    Share the URL through your preferred channel:

    * Email or SMS
    * Push notification
    * In-app button
    * Native WebView (see [Embed & WebView](/raas-widgets/guides/embed-webview))
  </Step>
</Steps>

## Prefer less friction?

Some flows (especially **m2m**) accept richer `config.userData` so the widget can skip steps. See [User data & friction](/raas-widgets/guides/user-data) and the [M2M flow guide](/raas-widgets/flows/m2m).

## What happens next

1. **User opens the link** — the flow widget loads for that `linkId`
2. **User completes verification** — CIP runs when required
3. **User completes the transfer** — amount, methods, confirmation
4. **You receive webhooks** — link and lifecycle events

## Handle webhooks (recommended)

Configure a webhook URL in the Partner Portal. Example event:

```json Webhook: link.opened theme={null}
{
  "event": "link.opened",
  "timestamp": "2026-07-23T14:35:00.000Z",
  "data": {
    "linkId": "link_yourpartner_a1b2c3d4e5f6",
    "referenceId": "user_12345",
    "openedAt": "2026-07-23T14:35:00.000Z"
  }
}
```

<Info>
  Webhooks are signed with HMAC-SHA256 using `X-RAAS-*` headers. See [Webhook Security](/raas-widgets/webhooks/security).
</Info>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/raas-widgets/authentication">
    API keys and security.
  </Card>

  <Card title="Create links" icon="link" href="/raas-widgets/guides/create-links">
    Envelope, flow discriminator, and options.
  </Card>

  <Card title="Flows" icon="layer-group" href="/raas-widgets/concepts/flows">
    Pick the right flow for your product.
  </Card>

  <Card title="Webhooks" icon="bell" href="/raas-widgets/webhooks/overview">
    Real-time notifications.
  </Card>
</CardGroup>
