Simulate Wire V2
curl --request POST \
--url https://api.sandbox.lead.bank/v2/simulate/wires \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"scenario": "incoming_payment",
"corridor_type": "domestic",
"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_1": "123 Main St",
"line_2": "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"
payload = {
"scenario": "incoming_payment",
"corridor_type": "domestic",
"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_1": "123 Main St",
"line_2": "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({
scenario: 'incoming_payment',
corridor_type: 'domestic',
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_1: '123 Main St',
line_2: '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', 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",
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([
'scenario' => 'incoming_payment',
'corridor_type' => 'domestic',
'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_1' => '123 Main St',
'line_2' => '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"
payload := strings.NewReader("{\n \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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")
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 \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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_not_found",
"message": "The requested object does not exist or is not visible to this caller."
}{
"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."
}Wire V2
Simulate Wire
Simulates a wire scenario in sandbox. Set scenario to choose what happens; each scenario takes the fields listed in its request shape. Available in Sandbox only.
POST
/
v2
/
simulate
/
wires
Simulate Wire V2
curl --request POST \
--url https://api.sandbox.lead.bank/v2/simulate/wires \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"scenario": "incoming_payment",
"corridor_type": "domestic",
"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_1": "123 Main St",
"line_2": "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"
payload = {
"scenario": "incoming_payment",
"corridor_type": "domestic",
"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_1": "123 Main St",
"line_2": "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({
scenario: 'incoming_payment',
corridor_type: 'domestic',
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_1: '123 Main St',
line_2: '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', 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",
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([
'scenario' => 'incoming_payment',
'corridor_type' => 'domestic',
'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_1' => '123 Main St',
'line_2' => '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"
payload := strings.NewReader("{\n \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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")
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 \"scenario\": \"incoming_payment\",\n \"corridor_type\": \"domestic\",\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_1\": \"123 Main St\",\n \"line_2\": \"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_not_found",
"message": "The requested object does not exist or is not visible to this caller."
}{
"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."
}See Errors for the common errors every v2 endpoint can return.
Authorizations
Body
application/json
- Incoming payment
- Incoming return
- Incoming return request
- Outgoing return request accepted
- Outgoing return request rejected
Simulates an incoming wire. The wire is created in posted. debtor_agent must match corridor_type: a domestic wire takes a 9-digit local_routing_identifier and no business_identifier_code; an international wire takes a non-US business_identifier_code.
Response
The simulation was accepted. The response body is empty.
The response is of type object.
Was this page helpful?

