curl --request POST \
--url https://api.sandbox.lead.bank/v0/lending/disbursements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"client_loan_id": "<string>",
"payment_method": "ach",
"payment_details": {
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"delivery_type": "same_business_day"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/lending/disbursements"
payload = {
"client_loan_id": "<string>",
"payment_method": "ach",
"payment_details": {
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"delivery_type": "same_business_day"
}
}
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({
client_loan_id: '<string>',
payment_method: 'ach',
payment_details: {
statement_descriptor: 'P2P Credit',
counterparty: {
name: 'Lara Smikle',
account_number: '1032345678',
routing_number: '021000021',
account_type: 'checking'
},
delivery_type: 'same_business_day'
}
})
};
fetch('https://api.sandbox.lead.bank/v0/lending/disbursements', 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/v0/lending/disbursements",
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([
'client_loan_id' => '<string>',
'payment_method' => 'ach',
'payment_details' => [
'statement_descriptor' => 'P2P Credit',
'counterparty' => [
'name' => 'Lara Smikle',
'account_number' => '1032345678',
'routing_number' => '021000021',
'account_type' => 'checking'
],
'delivery_type' => 'same_business_day'
]
]),
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/v0/lending/disbursements"
payload := strings.NewReader("{\n \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\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/v0/lending/disbursements")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/lending/disbursements")
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 \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "disbursement_xyz001",
"client_loan_id": "<string>",
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:33Z",
"status": "succeeded",
"amount": 123,
"currency_code": "USD",
"payment_method": "ach",
"payment_details": {
"delivery_type": "same_business_day",
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"effective_date": "<string>",
"trace_number": "123456789012345",
"correction": {
"account_number": "1032345678",
"routing_number": "021000021"
},
"failure": {
"failure_code": "account_closed"
}
}
}{
"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 a Disbursement
Creates a disbursement for a loan
curl --request POST \
--url https://api.sandbox.lead.bank/v0/lending/disbursements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"client_loan_id": "<string>",
"payment_method": "ach",
"payment_details": {
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"delivery_type": "same_business_day"
}
}
'import requests
url = "https://api.sandbox.lead.bank/v0/lending/disbursements"
payload = {
"client_loan_id": "<string>",
"payment_method": "ach",
"payment_details": {
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"delivery_type": "same_business_day"
}
}
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({
client_loan_id: '<string>',
payment_method: 'ach',
payment_details: {
statement_descriptor: 'P2P Credit',
counterparty: {
name: 'Lara Smikle',
account_number: '1032345678',
routing_number: '021000021',
account_type: 'checking'
},
delivery_type: 'same_business_day'
}
})
};
fetch('https://api.sandbox.lead.bank/v0/lending/disbursements', 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/v0/lending/disbursements",
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([
'client_loan_id' => '<string>',
'payment_method' => 'ach',
'payment_details' => [
'statement_descriptor' => 'P2P Credit',
'counterparty' => [
'name' => 'Lara Smikle',
'account_number' => '1032345678',
'routing_number' => '021000021',
'account_type' => 'checking'
],
'delivery_type' => 'same_business_day'
]
]),
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/v0/lending/disbursements"
payload := strings.NewReader("{\n \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\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/v0/lending/disbursements")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/lending/disbursements")
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 \"client_loan_id\": \"<string>\",\n \"payment_method\": \"ach\",\n \"payment_details\": {\n \"statement_descriptor\": \"P2P Credit\",\n \"counterparty\": {\n \"name\": \"Lara Smikle\",\n \"account_number\": \"1032345678\",\n \"routing_number\": \"021000021\",\n \"account_type\": \"checking\"\n },\n \"delivery_type\": \"same_business_day\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "disbursement_xyz001",
"client_loan_id": "<string>",
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:33Z",
"status": "succeeded",
"amount": 123,
"currency_code": "USD",
"payment_method": "ach",
"payment_details": {
"delivery_type": "same_business_day",
"statement_descriptor": "P2P Credit",
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"effective_date": "<string>",
"trace_number": "123456789012345",
"correction": {
"account_number": "1032345678",
"routing_number": "021000021"
},
"failure": {
"failure_code": "account_closed"
}
}
}{
"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 your loan. This must be the same loan_id used in the Loan Origination Request.
The payment method chosen for disbursement. Only ACH is supported today.
ach "ach"
Show child attributes
Show child attributes
Response
Disbursement object created.
id of the Disbursement object
^disbursement_\w+$"disbursement_xyz001"
The ID of your loan. This must be the same loan_id used in the Loan Origination Request.
The ISO-8601 timestamp at which the Disbursement object was created.
"2022-06-27T11:22:33Z"
The ISO-8601 timestamp at which the Disbursement object was last updated.
"2022-06-27T11:22:33Z"
The current status of this Disbursement object.
created, processing, succeeded, canceled, failed "succeeded"
Amount disbursed to the counterparty in cents. This amount will align with disbursement_amount from the Loan Origination Request
A three-letter currency code as defined in ISO 4217.
USD "USD"
The payment method chosen for disbursement. Only ACH is supported today.
ach "ach"
Show child attributes
Show child attributes
Was this page helpful?

