curl --request POST \
--url https://api.sandbox.lead.bank/v2/simulate/wires/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount": 5000,
"creditor_account_number_id": "account_number_xyz123",
"debtor": {
"name": "Alex Smith",
"account_identifier": {
"type": "account_number",
"value": "1032345678"
},
"address": {
"town_name": "Kansas City",
"country": "US",
"line_one": "123 Main St",
"line_two": "Suite 100",
"country_sub_division": "MO",
"post_code": "64105"
}
},
"debtor_agent": {
"local_routing_identifier": {
"value": "123456"
},
"business_identifier_code": "DEUTDEDB"
},
"instructing_agent": {
"local_routing_identifier": {
"value": "123456"
}
},
"remittance_details": {
"message_to_creditor": "Payment for invoice 12345"
},
"payment_identifiers": {
"end_to_end_identification": "EndtoEnd12345"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v2/simulate/wires/incoming"
payload = {
"amount": 5000,
"creditor_account_number_id": "account_number_xyz123",
"debtor": {
"name": "Alex Smith",
"account_identifier": {
"type": "account_number",
"value": "1032345678"
},
"address": {
"town_name": "Kansas City",
"country": "US",
"line_one": "123 Main St",
"line_two": "Suite 100",
"country_sub_division": "MO",
"post_code": "64105"
}
},
"debtor_agent": {
"local_routing_identifier": { "value": "123456" },
"business_identifier_code": "DEUTDEDB"
},
"instructing_agent": { "local_routing_identifier": { "value": "123456" } },
"remittance_details": { "message_to_creditor": "Payment for invoice 12345" },
"payment_identifiers": { "end_to_end_identification": "EndtoEnd12345" }
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 5000,
creditor_account_number_id: 'account_number_xyz123',
debtor: {
name: 'Alex Smith',
account_identifier: {type: 'account_number', value: '1032345678'},
address: {
town_name: 'Kansas City',
country: 'US',
line_one: '123 Main St',
line_two: 'Suite 100',
country_sub_division: 'MO',
post_code: '64105'
}
},
debtor_agent: {
local_routing_identifier: {value: '123456'},
business_identifier_code: 'DEUTDEDB'
},
instructing_agent: {local_routing_identifier: {value: '123456'}},
remittance_details: {message_to_creditor: 'Payment for invoice 12345'},
payment_identifiers: {end_to_end_identification: 'EndtoEnd12345'}
})
};
fetch('https://api.sandbox.lead.bank/v2/simulate/wires/incoming', 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.lead.bank/v2/simulate/wires/incoming",
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([
'amount' => 5000,
'creditor_account_number_id' => 'account_number_xyz123',
'debtor' => [
'name' => 'Alex Smith',
'account_identifier' => [
'type' => 'account_number',
'value' => '1032345678'
],
'address' => [
'town_name' => 'Kansas City',
'country' => 'US',
'line_one' => '123 Main St',
'line_two' => 'Suite 100',
'country_sub_division' => 'MO',
'post_code' => '64105'
]
],
'debtor_agent' => [
'local_routing_identifier' => [
'value' => '123456'
],
'business_identifier_code' => 'DEUTDEDB'
],
'instructing_agent' => [
'local_routing_identifier' => [
'value' => '123456'
]
],
'remittance_details' => [
'message_to_creditor' => 'Payment for invoice 12345'
],
'payment_identifiers' => [
'end_to_end_identification' => 'EndtoEnd12345'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.lead.bank/v2/simulate/wires/incoming"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.lead.bank/v2/simulate/wires/incoming")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/simulate/wires/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"code": "request_malformed",
"message": "The request is invalid and cannot be parsed by the server."
}{
"code": "token_invalid",
"message": "Your bearer token is expired, invalid, or lacks required scopes. Get a new token."
}{
"code": "object_state_mismatched",
"message": "The object is not in a state that permits this operation."
}{
"code": "parameters_invalid",
"message": "One or more parameters are invalid. See errors for each one.",
"errors": [
{
"code": "schema_violation",
"message": "debtor_agent.local_routing_identifier.value isn't a valid ABA routing number.",
"parameters": [
"debtor_agent.local_routing_identifier.value"
]
}
]
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry after the limit resets."
}{
"code": "internal_server_error",
"message": "Something went wrong on our end. Contact Lead with the Request-Id if this persists."
}{
"code": "endpoint_disabled",
"message": "This endpoint is temporarily disabled. Retry after the indicated delay."
}{
"code": "gateway_timeout",
"message": "An upstream system timed out. Retry with backoff."
}Simulate Incoming Wire
Simulates an incoming wire against a creditor account in sandbox. Automatically advances to posted on creation; no call to advance required.
curl --request POST \
--url https://api.sandbox.lead.bank/v2/simulate/wires/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount": 5000,
"creditor_account_number_id": "account_number_xyz123",
"debtor": {
"name": "Alex Smith",
"account_identifier": {
"type": "account_number",
"value": "1032345678"
},
"address": {
"town_name": "Kansas City",
"country": "US",
"line_one": "123 Main St",
"line_two": "Suite 100",
"country_sub_division": "MO",
"post_code": "64105"
}
},
"debtor_agent": {
"local_routing_identifier": {
"value": "123456"
},
"business_identifier_code": "DEUTDEDB"
},
"instructing_agent": {
"local_routing_identifier": {
"value": "123456"
}
},
"remittance_details": {
"message_to_creditor": "Payment for invoice 12345"
},
"payment_identifiers": {
"end_to_end_identification": "EndtoEnd12345"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v2/simulate/wires/incoming"
payload = {
"amount": 5000,
"creditor_account_number_id": "account_number_xyz123",
"debtor": {
"name": "Alex Smith",
"account_identifier": {
"type": "account_number",
"value": "1032345678"
},
"address": {
"town_name": "Kansas City",
"country": "US",
"line_one": "123 Main St",
"line_two": "Suite 100",
"country_sub_division": "MO",
"post_code": "64105"
}
},
"debtor_agent": {
"local_routing_identifier": { "value": "123456" },
"business_identifier_code": "DEUTDEDB"
},
"instructing_agent": { "local_routing_identifier": { "value": "123456" } },
"remittance_details": { "message_to_creditor": "Payment for invoice 12345" },
"payment_identifiers": { "end_to_end_identification": "EndtoEnd12345" }
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 5000,
creditor_account_number_id: 'account_number_xyz123',
debtor: {
name: 'Alex Smith',
account_identifier: {type: 'account_number', value: '1032345678'},
address: {
town_name: 'Kansas City',
country: 'US',
line_one: '123 Main St',
line_two: 'Suite 100',
country_sub_division: 'MO',
post_code: '64105'
}
},
debtor_agent: {
local_routing_identifier: {value: '123456'},
business_identifier_code: 'DEUTDEDB'
},
instructing_agent: {local_routing_identifier: {value: '123456'}},
remittance_details: {message_to_creditor: 'Payment for invoice 12345'},
payment_identifiers: {end_to_end_identification: 'EndtoEnd12345'}
})
};
fetch('https://api.sandbox.lead.bank/v2/simulate/wires/incoming', 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.lead.bank/v2/simulate/wires/incoming",
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([
'amount' => 5000,
'creditor_account_number_id' => 'account_number_xyz123',
'debtor' => [
'name' => 'Alex Smith',
'account_identifier' => [
'type' => 'account_number',
'value' => '1032345678'
],
'address' => [
'town_name' => 'Kansas City',
'country' => 'US',
'line_one' => '123 Main St',
'line_two' => 'Suite 100',
'country_sub_division' => 'MO',
'post_code' => '64105'
]
],
'debtor_agent' => [
'local_routing_identifier' => [
'value' => '123456'
],
'business_identifier_code' => 'DEUTDEDB'
],
'instructing_agent' => [
'local_routing_identifier' => [
'value' => '123456'
]
],
'remittance_details' => [
'message_to_creditor' => 'Payment for invoice 12345'
],
'payment_identifiers' => [
'end_to_end_identification' => 'EndtoEnd12345'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.lead.bank/v2/simulate/wires/incoming"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.lead.bank/v2/simulate/wires/incoming")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/simulate/wires/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_identifier\": {\n \"type\": \"account_number\",\n \"value\": \"1032345678\"\n },\n \"address\": {\n \"town_name\": \"Kansas City\",\n \"country\": \"US\",\n \"line_one\": \"123 Main St\",\n \"line_two\": \"Suite 100\",\n \"country_sub_division\": \"MO\",\n \"post_code\": \"64105\"\n }\n },\n \"debtor_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n },\n \"business_identifier_code\": \"DEUTDEDB\"\n },\n \"instructing_agent\": {\n \"local_routing_identifier\": {\n \"value\": \"123456\"\n }\n },\n \"remittance_details\": {\n \"message_to_creditor\": \"Payment for invoice 12345\"\n },\n \"payment_identifiers\": {\n \"end_to_end_identification\": \"EndtoEnd12345\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"code": "request_malformed",
"message": "The request is invalid and cannot be parsed by the server."
}{
"code": "token_invalid",
"message": "Your bearer token is expired, invalid, or lacks required scopes. Get a new token."
}{
"code": "object_state_mismatched",
"message": "The object is not in a state that permits this operation."
}{
"code": "parameters_invalid",
"message": "One or more parameters are invalid. See errors for each one.",
"errors": [
{
"code": "schema_violation",
"message": "debtor_agent.local_routing_identifier.value isn't a valid ABA routing number.",
"parameters": [
"debtor_agent.local_routing_identifier.value"
]
}
]
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry after the limit resets."
}{
"code": "internal_server_error",
"message": "Something went wrong on our end. Contact Lead with the Request-Id if this persists."
}{
"code": "endpoint_disabled",
"message": "This endpoint is temporarily disabled. Retry after the indicated delay."
}{
"code": "gateway_timeout",
"message": "An upstream system timed out. Retry with backoff."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Body
Request body to simulate an incoming wire in sandbox. The corridor is inferred from the
shape of debtor_agent rather than an explicit field, matching how Lead derives the
corridor from the ISO 20022 payload on real incoming wires: a business_identifier_code
with a non-US country code produces an international wire, while providing only
local_routing_identifier produces a domestic wire.
Wire amount in USD cents.
1 <= x <= 9900000000005000
The ID of the account number that will receive the simulated wire.
^account_number_\w+$"account_number_xyz123"
The party sending the wire.
Show child attributes
Show child attributes
The debtor's financial institution.
Show child attributes
Show child attributes
The financial institution that transmitted the payment to Lead.
Show child attributes
Show child attributes
Details of the remittance information for the wire.
Show child attributes
Show child attributes
Payment identifiers for the wire.
Show child attributes
Show child attributes
Response
Incoming wire object created. The response body is empty.
The response is of type object.
Was this page helpful?

