curl --request POST \
--url https://api.sandbox.raas-widgets.leapfinancial.com/partner/links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"referenceId": "user-12345",
"flow": "m2m",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"expiresInMinutes": 120,
"metadata": {
"orderId": "ORD-2026-001",
"note": "branch-42"
},
"theme": {
"name": "lola-default-dark",
"tokens": {
"color-accent": "#1dafa1"
}
},
"language": "es",
"callbackUrl": "https://app.example.com/return",
"headerName": "Lola Send",
"cipTemplateId": "raas-v1",
"presentation": {
"showSplash": true,
"showAgreement": false
},
"contact": {
"email": "jane@example.com"
},
"config": {
"flavor": "C",
"themeMode": "dark",
"sourceCountry": "US",
"destinationCountry": "MX",
"sourceCurrency": "USD",
"destinationCurrency": "MXN"
}
}
'import requests
url = "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links"
payload = {
"referenceId": "user-12345",
"flow": "m2m",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"expiresInMinutes": 120,
"metadata": {
"orderId": "ORD-2026-001",
"note": "branch-42"
},
"theme": {
"name": "lola-default-dark",
"tokens": { "color-accent": "#1dafa1" }
},
"language": "es",
"callbackUrl": "https://app.example.com/return",
"headerName": "Lola Send",
"cipTemplateId": "raas-v1",
"presentation": {
"showSplash": True,
"showAgreement": False
},
"contact": { "email": "jane@example.com" },
"config": {
"flavor": "C",
"themeMode": "dark",
"sourceCountry": "US",
"destinationCountry": "MX",
"sourceCurrency": "USD",
"destinationCurrency": "MXN"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
referenceId: 'user-12345',
flow: 'm2m',
externalId: 'ORD-2026-001',
campaign: 'feb-promo-gt',
expiresInMinutes: 120,
metadata: {orderId: 'ORD-2026-001', note: 'branch-42'},
theme: {name: 'lola-default-dark', tokens: {'color-accent': '#1dafa1'}},
language: 'es',
callbackUrl: 'https://app.example.com/return',
headerName: 'Lola Send',
cipTemplateId: 'raas-v1',
presentation: {showSplash: true, showAgreement: false},
contact: {email: 'jane@example.com'},
config: {
flavor: 'C',
themeMode: 'dark',
sourceCountry: 'US',
destinationCountry: 'MX',
sourceCurrency: 'USD',
destinationCurrency: 'MXN'
}
})
};
fetch('https://api.sandbox.raas-widgets.leapfinancial.com/partner/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'referenceId' => 'user-12345',
'flow' => 'm2m',
'externalId' => 'ORD-2026-001',
'campaign' => 'feb-promo-gt',
'expiresInMinutes' => 120,
'metadata' => [
'orderId' => 'ORD-2026-001',
'note' => 'branch-42'
],
'theme' => [
'name' => 'lola-default-dark',
'tokens' => [
'color-accent' => '#1dafa1'
]
],
'language' => 'es',
'callbackUrl' => 'https://app.example.com/return',
'headerName' => 'Lola Send',
'cipTemplateId' => 'raas-v1',
'presentation' => [
'showSplash' => true,
'showAgreement' => false
],
'contact' => [
'email' => 'jane@example.com'
],
'config' => [
'flavor' => 'C',
'themeMode' => 'dark',
'sourceCountry' => 'US',
'destinationCountry' => 'MX',
'sourceCurrency' => 'USD',
'destinationCurrency' => 'MXN'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links"
payload := strings.NewReader("{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"linkId": "link_acme_m2m_a1b2c3d4e5f6",
"referenceId": "user-12345",
"status": "created",
"url": "https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6",
"token": "550e8400-e29b-41d4-a716-446655440000",
"expiresAt": "2026-02-11T12:00:00.000Z",
"createdAt": "2026-02-10T12:00:00.000Z",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt"
}
}Create a magic link
Creates a new magic link that can be sent to an end user. The request body is discriminated by the flow field: each flow defines its own config payload (e.g. m2m accepts pre-filled user data; smart is minimal). The shared envelope (referenceId, expiration, theme, language) is common to all flows. Returns the full shareable URL and authentication token. Fund-request URLs include a public social-preview layer that redirects browsers to the widget.
curl --request POST \
--url https://api.sandbox.raas-widgets.leapfinancial.com/partner/links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"referenceId": "user-12345",
"flow": "m2m",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"expiresInMinutes": 120,
"metadata": {
"orderId": "ORD-2026-001",
"note": "branch-42"
},
"theme": {
"name": "lola-default-dark",
"tokens": {
"color-accent": "#1dafa1"
}
},
"language": "es",
"callbackUrl": "https://app.example.com/return",
"headerName": "Lola Send",
"cipTemplateId": "raas-v1",
"presentation": {
"showSplash": true,
"showAgreement": false
},
"contact": {
"email": "jane@example.com"
},
"config": {
"flavor": "C",
"themeMode": "dark",
"sourceCountry": "US",
"destinationCountry": "MX",
"sourceCurrency": "USD",
"destinationCurrency": "MXN"
}
}
'import requests
url = "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links"
payload = {
"referenceId": "user-12345",
"flow": "m2m",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt",
"expiresInMinutes": 120,
"metadata": {
"orderId": "ORD-2026-001",
"note": "branch-42"
},
"theme": {
"name": "lola-default-dark",
"tokens": { "color-accent": "#1dafa1" }
},
"language": "es",
"callbackUrl": "https://app.example.com/return",
"headerName": "Lola Send",
"cipTemplateId": "raas-v1",
"presentation": {
"showSplash": True,
"showAgreement": False
},
"contact": { "email": "jane@example.com" },
"config": {
"flavor": "C",
"themeMode": "dark",
"sourceCountry": "US",
"destinationCountry": "MX",
"sourceCurrency": "USD",
"destinationCurrency": "MXN"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
referenceId: 'user-12345',
flow: 'm2m',
externalId: 'ORD-2026-001',
campaign: 'feb-promo-gt',
expiresInMinutes: 120,
metadata: {orderId: 'ORD-2026-001', note: 'branch-42'},
theme: {name: 'lola-default-dark', tokens: {'color-accent': '#1dafa1'}},
language: 'es',
callbackUrl: 'https://app.example.com/return',
headerName: 'Lola Send',
cipTemplateId: 'raas-v1',
presentation: {showSplash: true, showAgreement: false},
contact: {email: 'jane@example.com'},
config: {
flavor: 'C',
themeMode: 'dark',
sourceCountry: 'US',
destinationCountry: 'MX',
sourceCurrency: 'USD',
destinationCurrency: 'MXN'
}
})
};
fetch('https://api.sandbox.raas-widgets.leapfinancial.com/partner/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'referenceId' => 'user-12345',
'flow' => 'm2m',
'externalId' => 'ORD-2026-001',
'campaign' => 'feb-promo-gt',
'expiresInMinutes' => 120,
'metadata' => [
'orderId' => 'ORD-2026-001',
'note' => 'branch-42'
],
'theme' => [
'name' => 'lola-default-dark',
'tokens' => [
'color-accent' => '#1dafa1'
]
],
'language' => 'es',
'callbackUrl' => 'https://app.example.com/return',
'headerName' => 'Lola Send',
'cipTemplateId' => 'raas-v1',
'presentation' => [
'showSplash' => true,
'showAgreement' => false
],
'contact' => [
'email' => 'jane@example.com'
],
'config' => [
'flavor' => 'C',
'themeMode' => 'dark',
'sourceCountry' => 'US',
'destinationCountry' => 'MX',
'sourceCurrency' => 'USD',
'destinationCurrency' => 'MXN'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.raas-widgets.leapfinancial.com/partner/links"
payload := strings.NewReader("{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.raas-widgets.leapfinancial.com/partner/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"referenceId\": \"user-12345\",\n \"flow\": \"m2m\",\n \"externalId\": \"ORD-2026-001\",\n \"campaign\": \"feb-promo-gt\",\n \"expiresInMinutes\": 120,\n \"metadata\": {\n \"orderId\": \"ORD-2026-001\",\n \"note\": \"branch-42\"\n },\n \"theme\": {\n \"name\": \"lola-default-dark\",\n \"tokens\": {\n \"color-accent\": \"#1dafa1\"\n }\n },\n \"language\": \"es\",\n \"callbackUrl\": \"https://app.example.com/return\",\n \"headerName\": \"Lola Send\",\n \"cipTemplateId\": \"raas-v1\",\n \"presentation\": {\n \"showSplash\": true,\n \"showAgreement\": false\n },\n \"contact\": {\n \"email\": \"jane@example.com\"\n },\n \"config\": {\n \"flavor\": \"C\",\n \"themeMode\": \"dark\",\n \"sourceCountry\": \"US\",\n \"destinationCountry\": \"MX\",\n \"sourceCurrency\": \"USD\",\n \"destinationCurrency\": \"MXN\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"linkId": "link_acme_m2m_a1b2c3d4e5f6",
"referenceId": "user-12345",
"status": "created",
"url": "https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6",
"token": "550e8400-e29b-41d4-a716-446655440000",
"expiresAt": "2026-02-11T12:00:00.000Z",
"createdAt": "2026-02-10T12:00:00.000Z",
"externalId": "ORD-2026-001",
"campaign": "feb-promo-gt"
}
}Authorizations
Your partner API key. Use raas_sandbox_* keys for the sandbox environment and raas_live_* keys for production.
Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Your unique identifier for the end user in your system. Used to correlate users with your records and to detect returning users.
"user-12345"
Flow discriminator. Must be "m2m" for this variant.
m2m "m2m"
Your tracing ID for this link/intent (order id, ticket, invoice, etc.). Copied onto the operation when the transfer is created so you can search operations by this value. Distinct from referenceId (which identifies the user).
128"ORD-2026-001"
Campaign slug this link belongs to. Opaque to RaaS — the campaign definition (sponsor, dates, terms) lives in your campaign system. Lowercased and trimmed; rejected (not rewritten) if it is not a slug. Stamped on the user at claim (first-touch) and copied onto every operation.
64^[a-z0-9][a-z0-9._-]{0,63}$"feb-promo-gt"
Link time-to-live in minutes. The link becomes inaccessible after expiration. Minimum: 5 minutes. Maximum: 10,080 minutes (7 days). Defaults to the partner-level configuration (usually 60 minutes).
5 <= x <= 10080120
Arbitrary key-value metadata to attach to the link. Useful for storing internal references. Campaign attribution uses the first-class campaign field, not metadata. Returned in link detail and webhook payloads.
{
"orderId": "ORD-2026-001",
"note": "branch-42"
}
Theme configuration object for the widget. The schema is owned by the flow frontend and is stored as-is. Overrides the partner-level theme.
{
"name": "lola-default-dark",
"tokens": { "color-accent": "#1dafa1" }
}
Language code for the widget UI (ISO 639-1). Overrides browser detection. Must be one of the languages shipped by the widgets.
en, es, fr "es"
HTTPS (or http) URL the widget uses for Return to app while this magic link is still valid. Distinct from the partner-level sessionExpiredRedirectUrl used on 410/409, and from webhookUrl (Partner Settings → Webhooks).
"https://app.example.com/return"
Brand name shown in the widget header for this link. When omitted, the widget falls back to the partner logo, then to the partner display name.
80"Lola Send"
Kentucky CIP template ID to use when provisioning the CIP ticket for this link. Overrides the partner-level setting and the global default.
120"raas-v1"
Link-scoped presentation flags (splash / agreement) common to every flow. Returned to the widget inside the claim config block.
Show child attributes
Show child attributes
Optional end-user contact data (e.g. email from your auth provider). Merged onto the User when the link is claimed by the same referenceId. Not used for notifications or corridor provisioning.
Show child attributes
Show child attributes
M2M-specific configuration: pre-filled user data, transfer flavor, theme mode.
Show child attributes
Show child attributes