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

# Lola flow

> WhatsApp-handoff send — chat closes corridor and payout; the widget quotes funding and returns to chat

## Overview

**`lola`** is the conversational send handoff. The chat already asked **who receives** and **how they get paid**. The widget asks **how the sender pays**, shows a binding quote, runs CIP only if needed, creates the operation, and sends the user back to WhatsApp.

Identity is Family A: `referenceId` is the WhatsApp sender (`wa:<E.164>`). The same number always maps to the same User (saved cards, CIP status). There is no Clerk bind and no isolated payer.

Your partner `allowedFlows` must include `lola`. Discover with `GET /partner/flows`.

## Create example

Set `BASE_URL` from [Partner API overview](/raas-widgets/api-reference/introduction).

```bash theme={null}
curl -X POST "$BASE_URL/partner/links" \
  -H "X-API-Key: raas_sandbox_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "referenceId": "wa:+15551234567",
    "externalId": "intent_abc123",
    "flow": "lola",
    "expiresInMinutes": 120,
    "language": "es",
    "config": {
      "amount": 150,
      "amountAnchor": "send",
      "sourceCountry": "US",
      "destinationCountry": "MX",
      "sourceCurrency": "USD",
      "destinationCurrency": "MXN",
      "recipient": {
        "name": { "firstName": "Maria", "lastName": "Lopez" },
        "payoutMethod": {
          "type": "cash",
          "cash": { "payer": "ELEKTRA", "country": "MX" }
        }
      },
      "returnToChatUrl": "https://wa.me/15551234567"
    }
  }'
```

`config` must include amount, `amountAnchor`, corridor, currencies, and `recipient.payoutMethod`. Do **not** send prices, `capabilityKey`, or funding instrument ids.

Payout `type` reuses the fund-request discriminator: `bank_account` | `card` | `cash` | `mobile_wallet` | `home_delivery`.

Optional `senderUserData` prefills CIP / summary sender rows (name, dob, id, address). Optional `returnToChatUrl` must be **https** (typically `wa.me`). It is used on success **and** Cancel — not the partner `sessionExpiredRedirectUrl` (that stays for 410/409 dead links).

Create is rejected with `422 ROUTE_NOT_AVAILABLE` when the catalog has no available, quotable capability for that payout.

The payout must name its catalog payer: `cash.payer`, `mobileWallet.carrier`, or `bankAccount.payer` for `bank_account` (`bankAccount.bankCode` is still read when `payer` is absent). Without it, create is rejected with `422 PAYER_REQUIRED`. The route never falls back to a default payer.

## One payment per link

A Lola link can create **one** operation. After that payment:

* Reopening the URL still **claims with HTTP 200**. Session `config` includes `usage.state: "consumed"` plus `operationId` / `consumedAt`, and still includes `returnToChatUrl`. For **cash deposit**, the widget resumes the how-to + store map (read-only — no second payment). For **card** (and other funding), it shows that the link was already used and offers **Return to chat**.
* A second `POST /widget/links/:linkId/operations` returns **409 `LINK_ALREADY_USED`**. You also receive webhook [`link.reuse_blocked`](/raas-widgets/webhooks/events#linkreuseblocked) so the assistant can mint a new link.

The link is **not** released if the operation later fails or is cancelled. Mint another Lola link (new `externalId` / intention). `GET /partner/links/{linkId}` exposes `consumedAt` and `consumedOperationId` when the payment landed.

This cap is Lola-only. Other flows keep unlimited operations on the same magic link.

## Cancel

If the user taps Cancel on the summary, the widget calls `POST /widget/links/:linkId/cancel`. You receive webhook [`link.cancelled`](/raas-widgets/webhooks/events#linkcancelled). The link is **not** revoked: the same URL still opens until TTL. Ask whether they want another link or help; do not treat the link as dead.

## Related

<CardGroup cols={2}>
  <Card title="Create links" icon="link" href="/raas-widgets/guides/create-links">
    Shared envelope and flow discriminator.
  </Card>

  <Card title="Webhook events" icon="webhook" href="/raas-widgets/webhooks/events">
    `link.cancelled`, `link.reuse_blocked`, `operation.*`.
  </Card>
</CardGroup>


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