curl --request POST \
--url https://api.sandbox.lead.bank/v1/instant_payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"creditor_agent": {
"routing_number": "111000111"
},
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"description": "Payment for invoice 12345"
}
'import requests
url = "https://api.sandbox.lead.bank/v1/instant_payments"
payload = {
"account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"creditor_agent": { "routing_number": "111000111" },
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"description": "Payment for invoice 12345"
}
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({
account_number_id: 'account_number_xyz123',
amount: 5000,
currency_code: 'USD',
creditor_agent: {routing_number: '111000111'},
creditor: {name: 'Alex Smith', account_number: '1234567890'},
description: 'Payment for invoice 12345'
})
};
fetch('https://api.sandbox.lead.bank/v1/instant_payments', 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/instant_payments",
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([
'account_number_id' => 'account_number_xyz123',
'amount' => 5000,
'currency_code' => 'USD',
'creditor_agent' => [
'routing_number' => '111000111'
],
'creditor' => [
'name' => 'Alex Smith',
'account_number' => '1234567890'
],
'description' => 'Payment for invoice 12345'
]),
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/instant_payments"
payload := strings.NewReader("{\n \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\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/instant_payments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/instant_payments")
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 \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\n}"
response = http.request(request)
puts response.read_body{
"id": "instant_payment_xyz123",
"account_id": "account_xyz123",
"account_number_id": "account_number_xyz123",
"direction": "outgoing",
"payment_rail": "rtp",
"status": "posted",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": {
"routing_number": "111000111"
},
"instructing_agent": {
"routing_number": "111000111"
},
"instructed_agent": {
"routing_number": "111000111"
},
"creditor_agent": {
"routing_number": "111000111"
},
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"payment_identifiers": {
"end_to_end_id": "033me5upSkktRorr3J6TKZ",
"uetr": "8dc981d2-e8c2-4a7b-8df0-0781b46328d9",
"transaction_id": "3G0CQxK8gKLpzaaxc7A9spDiifK"
},
"related_objects": {
"original_payment_id": "instant_payment_xyz123",
"return_payment_ids": [
"instant_payment_xyz456"
]
},
"return_requests": [
{
"status": "pending",
"reason": "duplicate",
"created_at": "2022-06-27T11:22:33Z",
"details": "<string>",
"deadline": "2022-07-11T23:30:00-04:00",
"resolution": {
"resolved_at": "2022-06-27T11:22:33Z",
"resolved_by": "counterparty",
"rejection_reason": "customer_no_response",
"rejection_details": "<string>"
}
}
],
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:40Z",
"counterparty_status": "posted",
"description": "Payment for invoice 12345",
"ultimate_debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"initiating_party": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"ultimate_creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"return": {
"reason": "duplication",
"details": "<string>"
},
"rejection": {
"rejected_by": "lead",
"reason": "non_sufficient_funds",
"details": "<string>"
}
}{
"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>"
}{
"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>"
}Create an Instant Payment
Initiates an outgoing instant payment.
curl --request POST \
--url https://api.sandbox.lead.bank/v1/instant_payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"creditor_agent": {
"routing_number": "111000111"
},
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"description": "Payment for invoice 12345"
}
'import requests
url = "https://api.sandbox.lead.bank/v1/instant_payments"
payload = {
"account_number_id": "account_number_xyz123",
"amount": 5000,
"currency_code": "USD",
"creditor_agent": { "routing_number": "111000111" },
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"description": "Payment for invoice 12345"
}
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({
account_number_id: 'account_number_xyz123',
amount: 5000,
currency_code: 'USD',
creditor_agent: {routing_number: '111000111'},
creditor: {name: 'Alex Smith', account_number: '1234567890'},
description: 'Payment for invoice 12345'
})
};
fetch('https://api.sandbox.lead.bank/v1/instant_payments', 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/instant_payments",
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([
'account_number_id' => 'account_number_xyz123',
'amount' => 5000,
'currency_code' => 'USD',
'creditor_agent' => [
'routing_number' => '111000111'
],
'creditor' => [
'name' => 'Alex Smith',
'account_number' => '1234567890'
],
'description' => 'Payment for invoice 12345'
]),
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/instant_payments"
payload := strings.NewReader("{\n \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\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/instant_payments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/instant_payments")
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 \"account_number_id\": \"account_number_xyz123\",\n \"amount\": 5000,\n \"currency_code\": \"USD\",\n \"creditor_agent\": {\n \"routing_number\": \"111000111\"\n },\n \"creditor\": {\n \"name\": \"Alex Smith\",\n \"account_number\": \"1234567890\"\n },\n \"description\": \"Payment for invoice 12345\"\n}"
response = http.request(request)
puts response.read_body{
"id": "instant_payment_xyz123",
"account_id": "account_xyz123",
"account_number_id": "account_number_xyz123",
"direction": "outgoing",
"payment_rail": "rtp",
"status": "posted",
"amount": 5000,
"currency_code": "USD",
"debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"debtor_agent": {
"routing_number": "111000111"
},
"instructing_agent": {
"routing_number": "111000111"
},
"instructed_agent": {
"routing_number": "111000111"
},
"creditor_agent": {
"routing_number": "111000111"
},
"creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"payment_identifiers": {
"end_to_end_id": "033me5upSkktRorr3J6TKZ",
"uetr": "8dc981d2-e8c2-4a7b-8df0-0781b46328d9",
"transaction_id": "3G0CQxK8gKLpzaaxc7A9spDiifK"
},
"related_objects": {
"original_payment_id": "instant_payment_xyz123",
"return_payment_ids": [
"instant_payment_xyz456"
]
},
"return_requests": [
{
"status": "pending",
"reason": "duplicate",
"created_at": "2022-06-27T11:22:33Z",
"details": "<string>",
"deadline": "2022-07-11T23:30:00-04:00",
"resolution": {
"resolved_at": "2022-06-27T11:22:33Z",
"resolved_by": "counterparty",
"rejection_reason": "customer_no_response",
"rejection_details": "<string>"
}
}
],
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:40Z",
"counterparty_status": "posted",
"description": "Payment for invoice 12345",
"ultimate_debtor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"initiating_party": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"ultimate_creditor": {
"name": "Alex Smith",
"account_number": "1234567890"
},
"return": {
"reason": "duplication",
"details": "<string>"
},
"rejection": {
"rejected_by": "lead",
"reason": "non_sufficient_funds",
"details": "<string>"
}
}{
"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>"
}{
"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 Lead Bank Account Number object.
^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 financial institution where the creditor (payee) holds their account.
Show child attributes
Show child attributes
The details of the creditor (payee) receiving the funds.
Show child attributes
Show child attributes
Free-form information on the reason for the payment.
140"Payment for invoice 12345"
Response
The new instant payment object.
The unique identifier of the instant payment object.
^instant_payment_\w+$"instant_payment_xyz123"
The ID of the Account object.
^account_\w+$"account_xyz123"
The ID of the Lead Bank Account Number object.
^account_number_\w+$"account_number_xyz123"
Who is initiating the transaction.
outgoing: You are sending a transaction to a counterparty. incoming: You are receiving a transaction from a counterparty.
outgoing, incoming "outgoing"
The payment network the instant payment travelled over.
fednow, rtp "rtp"
The current status of the instant payment object. If outgoing: created, under_review, canceled, rejected, posted. If incoming: under_review, rejected, posted.
created, under_review, canceled, rejected, posted "posted"
The amount of the instant payment in cents.
x >= 05000
A three-letter currency code as defined in ISO 4217.
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
The details of the network participant bank that submitted the payment into the network. For a standard payment this is the same as the debtor agent; where a participant routes on behalf of a non-participant the two differ. This object is always populated.
Show child attributes
Show child attributes
The details of the network participant bank that received the payment from the network. For a standard payment this is the same as the creditor agent. This object is always populated.
Show child attributes
Show child attributes
The details of the financial institution where the creditor (payee) holds their account.
Show child attributes
Show child attributes
The details of the creditor (payee) receiving the funds.
Show child attributes
Show child attributes
The instant payment's identifiers.
Show child attributes
Show child attributes
This instant payment's related instant payments or other objects.
Show child attributes
Show child attributes
The return requests that reference this instant payment.
Show child attributes
Show child attributes
The ISO 8601 format timestamp that represents when the instant payment object was created.
"2022-06-27T11:22:33Z"
The ISO 8601 format timestamp that represents when the instant payment object was last updated.
"2022-06-27T11:22:40Z"
The current status of the instant payment from the counterparty's perspective. If outgoing: posted, under_review, or rejected. If incoming: posted or null.
posted, under_review, rejected "posted"
Free-form information on the reason for the payment.
"Payment for invoice 12345"
The party on whose behalf the payment is made, if different from the debtor (payer). Only present on on-behalf-of payments.
Show child attributes
Show child attributes
The party that transmitted the payment instruction. On outgoing payments this is set to your organization's name and cannot be changed. On incoming payments it is populated from the sending institution's message when provided.
Show child attributes
Show child attributes
The party on whose behalf the payment is received, if different from the creditor (payee). Only present on on-behalf-of payments.
Show child attributes
Show child attributes
If this instant payment is a return, this object contains details on the return.
Show child attributes
Show child attributes
If this instant payment was rejected, this object contains details on the rejection.
Show child attributes
Show child attributes
Was this page helpful?

