curl --request POST \
--url https://api.sandbox.lead.bank/v1/simulate/instant_payments/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"creditor_account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": {
"routing_number": "111000111"
},
"description": "Payment for invoice 12345",
"payment_identifiers": {
"end_to_end_id": "E2E-20240101-001"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v1/simulate/instant_payments/incoming"
payload = {
"creditor_account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": { "routing_number": "111000111" },
"description": "Payment for invoice 12345",
"payment_identifiers": { "end_to_end_id": "E2E-20240101-001" }
}
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({
creditor_account_number_id: 'account_number_xyz123',
amount: 5000,
currency_code: 'USD',
debtor: {name: 'Alex Smith', account_number: '1234567890'},
debtor_agent: {routing_number: '111000111'},
description: 'Payment for invoice 12345',
payment_identifiers: {end_to_end_id: 'E2E-20240101-001'}
})
};
fetch('https://api.sandbox.lead.bank/v1/simulate/instant_payments/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/v1/simulate/instant_payments/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([
'creditor_account_number_id' => 'account_number_xyz123',
'amount' => 5000,
'currency_code' => 'USD',
'debtor' => [
'name' => 'Alex Smith',
'account_number' => '1234567890'
],
'debtor_agent' => [
'routing_number' => '111000111'
],
'description' => 'Payment for invoice 12345',
'payment_identifiers' => [
'end_to_end_id' => 'E2E-20240101-001'
]
]),
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/v1/simulate/instant_payments/incoming"
payload := strings.NewReader("{\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\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/v1/simulate/instant_payments/incoming")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/simulate/instant_payments/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 \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Simulate Incoming Instant Payment
Simulate an incoming instant payment.
curl --request POST \
--url https://api.sandbox.lead.bank/v1/simulate/instant_payments/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"creditor_account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": {
"routing_number": "111000111"
},
"description": "Payment for invoice 12345",
"payment_identifiers": {
"end_to_end_id": "E2E-20240101-001"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v1/simulate/instant_payments/incoming"
payload = {
"creditor_account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": { "routing_number": "111000111" },
"description": "Payment for invoice 12345",
"payment_identifiers": { "end_to_end_id": "E2E-20240101-001" }
}
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({
creditor_account_number_id: 'account_number_xyz123',
amount: 5000,
currency_code: 'USD',
debtor: {name: 'Alex Smith', account_number: '1234567890'},
debtor_agent: {routing_number: '111000111'},
description: 'Payment for invoice 12345',
payment_identifiers: {end_to_end_id: 'E2E-20240101-001'}
})
};
fetch('https://api.sandbox.lead.bank/v1/simulate/instant_payments/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/v1/simulate/instant_payments/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([
'creditor_account_number_id' => 'account_number_xyz123',
'amount' => 5000,
'currency_code' => 'USD',
'debtor' => [
'name' => 'Alex Smith',
'account_number' => '1234567890'
],
'debtor_agent' => [
'routing_number' => '111000111'
],
'description' => 'Payment for invoice 12345',
'payment_identifiers' => [
'end_to_end_id' => 'E2E-20240101-001'
]
]),
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/v1/simulate/instant_payments/incoming"
payload := strings.NewReader("{\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\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/v1/simulate/instant_payments/incoming")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/simulate/instant_payments/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 \"creditor_account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"debtor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"debtor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"description\": \"Payment for invoice 12345\",\n \"payment_identifiers\": {\n \"end_to_end_id\": \"E2E-20240101-001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Body
The ID of the Account Number object receiving the instant payment.
^account_number_\w+$"account_number_xyz123"
The amount of the instant payment in cents.
x >= 05000
A three-letter currency code as defined in ISO 4217. Only USD is supported.
USD "USD"
The details of the debtor (payer) sending the funds.
Show child attributes
Show child attributes
The details of the financial institution where the debtor (payer) holds their account.
Show child attributes
Show child attributes
Free-form information on the reason for the payment.
140"Payment for invoice 12345"
Optional payment identifiers.
Show child attributes
Show child attributes
Response
Intentionally empty - incoming instant payment will be created asynchronously.
Was this page helpful?

