curl --request POST \
--url https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance', 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/simulate/lending/disbursements/{disbursement_id}/advance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/simulate/lending/disbursements/{disbursement_id}/advance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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",
"account_type": "checking"
},
"failure": {
"failure_code": "account_closed",
"failure_details": "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>"
}Simulate Advance Disbursement
Advances a disbursement object status in the sandbox environment.
curl --request POST \
--url https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance', 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/simulate/lending/disbursements/{disbursement_id}/advance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/simulate/lending/disbursements/{disbursement_id}/advance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/simulate/lending/disbursements/{disbursement_id}/advance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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",
"account_type": "checking"
},
"failure": {
"failure_code": "account_closed",
"failure_details": "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.
Path Parameters
ID of the disbursement object you want to advance.
^disbursement_\w+$Query Parameters
Disbursement webhook event that you want to simulate. Possible values can be found in the Events & Webhooks section.
Response
Disbursement object advanced.
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?

