curl --request GET \
--url https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}', 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/receivable_sales/{receivable_sale_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/receivable_sales/{receivable_sale_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "receivable_sale_8b2e4d6f0a1c3e5b7d9f1a3c5e7b9d0f",
"status": "created",
"request_date": "2026-06-04",
"currency_code": "USD",
"purchase_amount": 980500,
"purchase_amount_breakdown": {
"principal": 975000,
"interest": 4000,
"fees": 1500
},
"receivables_count": 31,
"core_transaction_id": null,
"created_at": "2026-06-05T06:00:00Z",
"settled_at": null,
"updated_at": "2026-06-05T06:00:00Z"
}{
"code": "request_malformed",
"message": "The request is invalid and cannot be parsed by the server.",
"errors": [
{
"code": "url_malformed",
"message": "The request URL could not be parsed."
}
]
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "object_not_found",
"message": "No object exists at the requested ID, or it is not visible to this caller."
}{
"code": "parameters_invalid",
"message": "One or more parameters are invalid.",
"errors": [
{
"code": "malformed",
"message": "receivable_sale_id must match the format receivable_sale_*.",
"parameters": [
"receivable_sale_id"
]
}
]
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry with backoff."
}{
"code": "internal_server_error",
"message": "An unexpected error occurred. Contact support with the Request-Id header value."
}{
"code": "gateway_timeout",
"message": "An upstream system did not respond in time. Retry with backoff."
}Retrieve a Receivable Sale
Retrieve a Receivable Sale by its ID, including its rollup totals. To list the Receivables in it, use GET /v2/receivables?receivable_sale_id={receivable_sale_id}.
curl --request GET \
--url https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}', 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/receivable_sales/{receivable_sale_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/receivable_sales/{receivable_sale_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/receivable_sales/{receivable_sale_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "receivable_sale_8b2e4d6f0a1c3e5b7d9f1a3c5e7b9d0f",
"status": "created",
"request_date": "2026-06-04",
"currency_code": "USD",
"purchase_amount": 980500,
"purchase_amount_breakdown": {
"principal": 975000,
"interest": 4000,
"fees": 1500
},
"receivables_count": 31,
"core_transaction_id": null,
"created_at": "2026-06-05T06:00:00Z",
"settled_at": null,
"updated_at": "2026-06-05T06:00:00Z"
}{
"code": "request_malformed",
"message": "The request is invalid and cannot be parsed by the server.",
"errors": [
{
"code": "url_malformed",
"message": "The request URL could not be parsed."
}
]
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "object_not_found",
"message": "No object exists at the requested ID, or it is not visible to this caller."
}{
"code": "parameters_invalid",
"message": "One or more parameters are invalid.",
"errors": [
{
"code": "malformed",
"message": "receivable_sale_id must match the format receivable_sale_*.",
"parameters": [
"receivable_sale_id"
]
}
]
}{
"code": "rate_limit_exceeded",
"message": "You have exceeded the rate limit for this endpoint. Retry with backoff."
}{
"code": "internal_server_error",
"message": "An unexpected error occurred. Contact support with the Request-Id header value."
}{
"code": "gateway_timeout",
"message": "An upstream system did not respond in time. Retry with backoff."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the Receivable Sale object to retrieve.
64Response
A Receivable Sale object.
A receivable sale is the aggregate of a program's eligible receivables for a single business day, which you purchase as a single unit.
Unique ID of the Receivable Sale object.
64^receivable_sale_\w+$"receivable_sale_3f9a1c7e5b2d4a6f8e0c1b3d5f7a9c2e"
The status of the receivable sale.
created: the sale has been created and its member receivables and amounts are frozen.settled: thepurchase_amounthas been debited from your account.core_transaction_idandsettled_atare set.failed: the sale could not be settled because your account has insufficient funds or is closed.failuredescribes why. Any other problem leaves the salecreated.
created, settled, failed "settled"
The business day being sold. This may be earlier than created_at when a sale is generated for a past business day.
"2026-06-03"
A three-letter currency code as defined in ISO 4217.
USD "USD"
The total amount you pay for the sale, in minor units, debited from your account as a single entry when the sale settles. Equal to the sum of the member receivables' amounts, frozen when the sale is created, and to the sum of the components in purchase_amount_breakdown.
1250000
The components that make up the sale's purchase_amount, in minor units. The components always sum to purchase_amount.
This object is an open map: Lead may add new components (for example, a premium) in the future without a version change. Each component is a signed integer, so a component that reduces the amount due is negative. Sum every key present rather than only the ones listed here.
Show child attributes
Show child attributes
The number of receivables in the sale. List them with GET /v2/receivables?receivable_sale_id={id}.
x >= 042
The core transaction that debited purchase_amount from your account. Null until the sale is settled.
^core_transaction_.+~\d+$"core_transaction_xyz123"
The ISO-8601 timestamp at which the Receivable Sale object was created.
"2026-06-04T06:00:00Z"
The ISO-8601 timestamp at which the sale settled and purchase_amount was debited. Null until the sale is settled.
"2026-06-04T14:30:00Z"
The ISO-8601 timestamp at which the Receivable Sale object was last updated.
"2026-06-04T14:30:00Z"
Why the sale failed. Present only when the sale is failed; omitted otherwise.
Show child attributes
Show child attributes
Was this page helpful?

