curl --request POST \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstAmount": 123,
"secondAmount": 123
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate"
payload = {
"firstAmount": 123,
"secondAmount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({firstAmount: 123, secondAmount: 123})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate', 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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate",
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([
'firstAmount' => 123,
'secondAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate"
payload := strings.NewReader("{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountNumber": "<string>",
"accountStatus": "ACTIVE",
"nameOnAccount": "<string>",
"nickname": "<string>",
"routingNumber": "<string>",
"type": "CHECKING",
"verificationStatus": "UNVERIFIED",
"accountHolderType": "INDIVIDUAL"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Verify micro-deposits
Validates an external bank account using micro-deposit amounts.
Token types: APP, USER | Required scopes: external_bank_account:write:org
curl --request POST \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstAmount": 123,
"secondAmount": 123
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate"
payload = {
"firstAmount": 123,
"secondAmount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({firstAmount: 123, secondAmount: 123})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate', 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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate",
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([
'firstAmount' => 123,
'secondAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate"
payload := strings.NewReader("{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstAmount\": 123,\n \"secondAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountNumber": "<string>",
"accountStatus": "ACTIVE",
"nameOnAccount": "<string>",
"nickname": "<string>",
"routingNumber": "<string>",
"type": "CHECKING",
"verificationStatus": "UNVERIFIED",
"accountHolderType": "INDIVIDUAL"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Application (M2M) OAuth2 access token (client credentials).
Headers
ID of the organization to perform this operation on behalf of. Required for BANK and PLATFORM app token callers targeting a specific organization. If omitted, the request uses the authenticated caller's own organization. Must be a valid non-empty UUID. Present but malformed values return 400.
Path Parameters
The external bank account ID.
Body
The validate request.
Request to validate an external bank account using micro-deposits.
One of the two micro-deposit verification amounts, in minor units (e.g. cents for USD). Order does not matter: the pair is compared unordered.
The other micro-deposit verification amount, in minor units (e.g. cents for USD). Order does not matter: the pair is compared unordered.
Response
External bank account validated.
Response representing an external bank account.
Unique identifier for the external bank account.
Masked account number (last 4 digits visible).
Status of the external bank account.
ACTIVE, INACTIVE Name on the bank account.
Nickname for the external bank account.
Bank routing number (ABA number).
Type of bank account (checking or savings).
CHECKING, SAVINGS Verification status of the external bank account.
UNVERIFIED, VERIFICATION_SENT, VERIFIED, FAILED Holder of the bank account (individual or business).
INDIVIDUAL, BUSINESS Was this page helpful?