curl --request POST \
--url https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"documentType": "utility_bill",
"fileType": "jpeg",
"fileContent": "<string>",
"country": "US",
"filename": "utility-bill.pdf"
}
}
'import requests
url = "https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument"
payload = { "data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"documentType": "utility_bill",
"fileType": "jpeg",
"fileContent": "<string>",
"country": "US",
"filename": "utility-bill.pdf"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
userId: 'usr_7aff81763cae58c936aa6de67dd5a95e',
documentType: 'utility_bill',
fileType: 'jpeg',
fileContent: '<string>',
country: 'US',
filename: 'utility-bill.pdf'
}
})
};
fetch('https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument', 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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument",
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([
'data' => [
'userId' => 'usr_7aff81763cae58c936aa6de67dd5a95e',
'documentType' => 'utility_bill',
'fileType' => 'jpeg',
'fileContent' => '<string>',
'country' => 'US',
'filename' => 'utility-bill.pdf'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument"
payload := strings.NewReader("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"documentId": "<string>",
"status": "<string>"
}
}Upload a proof-of-address document
Attaches a proof-of-address document to the banking application, for the cases where the partner asks for one. The application must already exist and have an individual on it, so complete the application first.
Two things reject uploads that otherwise look fine. A .jpg file must be sent as fileType: "jpeg" — "jpg" is refused. And the partner caps the decoded size at 10MB, even though their own upload page advertises 20MB; oversized files are rejected here before the round-trip.
fileContent accepts either a bare base64 string or a data: URL, so a browser FileReader.readAsDataURL result can be passed through unchanged.
This is a Firebase callable served from the Cloud Function URL (https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument), not the https://laso.finance base URL used by the paywalled routes. Callables wrap the request in {"data": ...} and the reply in {"result": ...}. Send the id_token from /auth as a Bearer token. Free.
curl --request POST \
--url https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"documentType": "utility_bill",
"fileType": "jpeg",
"fileContent": "<string>",
"country": "US",
"filename": "utility-bill.pdf"
}
}
'import requests
url = "https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument"
payload = { "data": {
"userId": "usr_7aff81763cae58c936aa6de67dd5a95e",
"documentType": "utility_bill",
"fileType": "jpeg",
"fileContent": "<string>",
"country": "US",
"filename": "utility-bill.pdf"
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
userId: 'usr_7aff81763cae58c936aa6de67dd5a95e',
documentType: 'utility_bill',
fileType: 'jpeg',
fileContent: '<string>',
country: 'US',
filename: 'utility-bill.pdf'
}
})
};
fetch('https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument', 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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument",
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([
'data' => [
'userId' => 'usr_7aff81763cae58c936aa6de67dd5a95e',
'documentType' => 'utility_bill',
'fileType' => 'jpeg',
'fileContent' => '<string>',
'country' => 'US',
'filename' => 'utility-bill.pdf'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument"
payload := strings.NewReader("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us-central1-kyc-ts.cloudfunctions.net/uploadBankingDocument")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"userId\": \"usr_7aff81763cae58c936aa6de67dd5a95e\",\n \"documentType\": \"utility_bill\",\n \"fileType\": \"jpeg\",\n \"fileContent\": \"<string>\",\n \"country\": \"US\",\n \"filename\": \"utility-bill.pdf\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"documentId": "<string>",
"status": "<string>"
}
}Authorizations
Firebase ID token from /auth or any paid route, sent as a Bearer token: Authorization: Bearer <id_token> (the Bearer prefix is required).
Body
Show child attributes
Show child attributes
Response
The created document id and its review status.
Show child attributes
Show child attributes
Was this page helpful?