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

# Request API

> Create request-money asks, share payer links, and track fulfillment — the Request Money HTTP contract on RaaS Widgets

## Overview

Use the **Request API** when your product needs to **start a request-money flow** and **surface status** to end users or internal systems.

You call the familiar versioned paths under **`/v1/request-money`**. RaaS Widgets hosts that contract: same JSON over HTTPS, same create/lookup shape, now backed by fund-request links and operations on this platform.

```mermaid theme={null}
sequenceDiagram
  participant You as Your backend
  participant API as Request API
  participant Payer as Payer journey

  You->>API: POST /v1/request-money
  API-->>You: 201 + referenceId, status, waLink, landingLink, fundRequestLink
  You->>Payer: Share payer URL
  Payer->>API: Opens fund-request link and pays
  You->>API: GET /v1/request-money/{referenceId}
  API-->>You: 200 public status
```

## What you get

| Capability      | Detail                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------- |
| **Create**      | `POST /v1/request-money` — applicant, payout, amount, currency, your 8-char `referenceId` |
| **Lookup**      | `GET /v1/request-money/{referenceId}` — public status for that code                       |
| **Payer links** | `fundRequestLink` (widget), plus `landingLink` / `waLink` when configured                 |
| **Webhooks**    | `request_money.created` / `request_money.failed`, then `operation.*` through settlement   |

The authoritative schemas live in the [API Reference](/raas-widgets/api-reference/introduction) (OpenAPI tag **request-money**).

## How it fits RaaS Widgets

Under the hood, a successful create:

1. Screens the requester identity when required
2. Creates a **money request** (`requestId`, e.g. `req_…`)
3. Mints a **fund-request** magic link for the sender
4. Returns the links and public `status` you already expect

When the sender pays, RaaS Widgets creates an **operation**. You correlate fulfillment with `requestId` on `operation.*` webhooks — see [Lifecycle](/raas-widgets/request-api/lifecycle) and [Operation lifecycle](/raas-widgets/ops/operation-lifecycle).

<Info>
  You can also originate asks with the widget [`request`](/raas-widgets/flows/request) flow, or mint payer links directly with [`fund-request`](/raas-widgets/flows/fund-request). The Request API remains the server-to-server path for partners who already integrate `/v1/request-money`.
</Info>

## Environments

| Environment | Host base URL                                         | Versioned API root     |
| ----------- | ----------------------------------------------------- | ---------------------- |
| Sandbox     | `https://raas-widgets-backend-sandbox.up.railway.app` | `…/v1`                 |
| Production  | Provided at go-live                                   | `{production-host}/v1` |

In samples, set `BASE_URL` to the **host** (no trailing slash, no `/v1`). Append `/v1/request-money` in your client.

Authenticate with `X-API-Key` using Partner Portal keys (`raas_sandbox_*` / `raas_live_*`). See [Authentication](/raas-widgets/authentication). Your partner must have the **request-money** API feature enabled.

<Warning>
  Never use production API keys in development, shared sandboxes, or public repositories.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/raas-widgets/request-api/quickstart">
    Create and look up a request in a few minutes.
  </Card>

  <Card title="Create and lookup" icon="code" href="/raas-widgets/request-api/endpoints">
    POST/GET payloads, status values, and idempotency.
  </Card>

  <Card title="Lifecycle" icon="arrows-split-up-and-left" href="/raas-widgets/request-api/lifecycle">
    Ask → fund-request link → operation → settlement.
  </Card>

  <Card title="Webhooks" icon="bell" href="/raas-widgets/request-api/webhooks">
    Event names, payloads, and signature headers.
  </Card>
</CardGroup>
