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

# Quickstart

> Prerequisites, first POST and GET calls to the request-money API, and how to verify responses in minutes.

You will call **`POST /v1/request-money`** and optionally **`GET /v1/request-money/{referenceId}`** with header **`X-API-Key`**.

## Prerequisites

* Base URL for your environment (sandbox or production). Sandbox: set **`BASE_URL`** to `https://{raas-backend-sandbox}` (API root: `https://{raas-backend-sandbox}/v1`). Production: `https://{raas-backend-production}`.
* An integrator API key.
* TLS-capable HTTP client (HTTPS).

## Steps

<Steps>
  <Step title="Pick a referenceId">
    Choose an 8-character operation code your systems can reuse later: only `a-z`, `A-Z`, and `0-9` (for example `Ab3xY9mK`). It must identify this operation for your account.
  </Step>

  <Step title="Create an operation">
    Send **`POST /v1/request-money`** with a JSON body that satisfies **`RequestMoneyRequest`** (see OpenAPI for required fields and payout method shapes).
  </Step>

  <Step title="Read the response">
    On success you receive **`201`** with **`referenceId`**, **`id`**, **`status`**, **`waLink`**, **`landingLink`**, and related fields from **`RequestMoneyResponse`**. Choose the URL that matches your payer experience.
  </Step>

  <Step title="Fetch status (optional)">
    Call **`GET /v1/request-money/{referenceId}`** with the same `referenceId` to read the latest public status snapshot.
  </Step>
</Steps>

## Example requests

Replace `BASE_URL` and `YOUR_API_KEY`. The body below is illustrative; align field names and payout payloads with the OpenAPI schema for your payout type.

<CodeGroup>
  ```bash cURL theme={null}
  curl -sS -X POST "$BASE_URL/v1/request-money" \
    -H "Content-Type: application/json" \
    -H "X-API-Key: YOUR_API_KEY" \
    -d '{
    "referenceId": "Ab3xY9mK",
    "expiresInMinutes": 120,
    "amount": 150.5,
    "currency": "GTQ",
    "requestData": {
      "userReferenceId": "user-8842",
      "name": {
        "firstName": "Maria",
        "lastName": "Lopez"
      },
      "address": {
        "country": "GT",
        "stateCode": "GT-01",
        "city": "Guatemala City",
        "line1": "12 Av. Reforma"
      },
      "dob": "1990-05-15",
      "payoutMethod": {
        "type": "bank_account",
        "bankAccount": {
          "country": "GT",
          "stateCode": "GT-01",
          "accountNumber": "0123456789012",
          "accountType": "checking",
          "bankCode": "BIND",
          "bankName": "BANCO INDUSTRIAL"
        }
      }
    }
  }'
  ```

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

  base = os.environ["BASE_URL"].rstrip("/")
  key = os.environ["REQUEST_API_KEY"]

  payload = {
      "referenceId": "Ab3xY9mK",
      "amount": 150.5,
      "currency": "GTQ",
      "expiresInMinutes": 120,
      "requestData": {
          "userReferenceId": "user-8842",
          "name": {"firstName": "Maria", "lastName": "Lopez"},
          "address": {
              "country": "GT",
              "stateCode": "GT-01",
              "city": "Guatemala City",
              "line1": "12 Av. Reforma",
          },
          "dob": "1990-05-15",
          "payoutMethod": {
              "type": "bank_account",
              "bankAccount": {
                  "country": "GT",
                  "stateCode": "GT-01",
                  "accountNumber": "0123456789012",
                  "accountType": "checking",
                  "bankCode": "BIND",
                  "bankName": "BANCO INDUSTRIAL",
              },
          },
      },
  }

  r = requests.post(
      f"{base}/v1/request-money",
      headers={"X-API-Key": key, "Content-Type": "application/json"},
      json=payload,
      timeout=30,
  )
  print(r.status_code, r.text)
  ```

  ```javascript Node.js theme={null}
  import process from "node:process";

  const base = process.env.BASE_URL.replace(/\/$/, "");
  const key = process.env.REQUEST_API_KEY;

  const payload = {
    referenceId: "Ab3xY9mK",
    amount: 150.5,
    currency: "GTQ",
    expiresInMinutes: 120,
    requestData: {
      userReferenceId: "user-8842",
      name: { firstName: "Maria", lastName: "Lopez" },
      address: {
        country: "GT",
        stateCode: "GT-01",
        city: "Guatemala City",
        line1: "12 Av. Reforma",
      },
      dob: "1990-05-15",
      payoutMethod: {
        type: "bank_account",
        bankAccount: {
          country: "GT",
          stateCode: "GT-01",
          accountNumber: "0123456789012",
          accountType: "checking",
          bankCode: "BIND",
          bankName: "BANCO INDUSTRIAL",
        },
      },
    },
  };

  const res = await fetch(`${base}/v1/request-money`, {
    method: "POST",
    headers: { "Content-Type": "application/json", "X-API-Key": key },
    body: JSON.stringify(payload),
  });

  console.log(res.status, await res.text());
  ```
</CodeGroup>

## What you should see

* **`201 Created`** on a valid create payload, with JSON matching **`RequestMoneyResponse`**.
* **`401 Unauthorized`** if the key is missing or wrong.
* **`403 Forbidden`** on **`POST`** when screening blocks the operation (for example OFAC); see your integration contact for the exact payload.
* **`404 Not Found`** on **`GET`** when no public resource exists for that `referenceId` (for your account), as described in OpenAPI.

<Tip>
  Use the **API Reference** tab’s playground to send real requests against the base URL you configure there, with the same **`X-API-Key`** header. If you use the **partner portal** playground instead, read [Partner portal API playground](/request-api/guides/partner-portal-playground): you paste your own key for create and lookup; **Update status (internal)** uses a server-side secret and your JWT; runs do **not** rotate your API key automatically.
</Tip>
