curl --request POST \
--url https://api.lbpay.example.com/v1/inventories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quoteId": "qt_01JA1X",
"externalId": "inventory-2026-11-04-001"
}
'import requests
url = "https://api.lbpay.example.com/v1/inventories"
payload = {
"quoteId": "qt_01JA1X",
"externalId": "inventory-2026-11-04-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({quoteId: 'qt_01JA1X', externalId: 'inventory-2026-11-04-001'})
};
fetch('https://api.lbpay.example.com/v1/inventories', 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.lbpay.example.com/v1/inventories",
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([
'quoteId' => 'qt_01JA1X',
'externalId' => 'inventory-2026-11-04-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.lbpay.example.com/v1/inventories"
payload := strings.NewReader("{\n \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\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.lbpay.example.com/v1/inventories")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lbpay.example.com/v1/inventories")
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 \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\n}"
response = http.request(request)
puts response.read_body{
"inventoryId": "inv_01JA2B",
"quoteId": "<string>",
"status": "ACTIVE",
"fromCurrency": "USD",
"toCurrency": "BRL",
"rate": "5.40000000",
"total": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"available": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"reserved": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"used": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"referenceRate": "5.43210000",
"spread": {
"percentage": "0.75",
"amount": {
"currency": "USD",
"amount": "7.50"
}
},
"pendingSettlement": {
"currency": "USD",
"amount": "1000.00"
},
"settlementId": "<string>",
"metadata": {}
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Create an inventory lot
Cria um Inventory Lot a partir de uma cotação usage = INVENTORY, AVAILABLE e não expirada. Esta é a única operação de aceite: em uma chamada a LB Pay fecha com a MSB a taxa e o volume, cria a promessa de pagamento em USDC e cria o lote, que nasce ACTIVE com taxa, volume e validade da cotação. A execução do câmbio acontece em cada withdrawal que consome o lote. A cotação passa a USED (FxQuote.inventoryId). Cada chamada cria um lote novo e independente; lotes nunca são agregados. O lote não depende de withdrawal e é consumido depois por withdrawals com funding.mode = INVENTORY. Idempotente por Idempotency-Key. Cliente sem a modalidade INVENTORY habilitada recebe FUNDING_MODE_NOT_ENABLED.
Cancelamento, tratamento do volume não utilizado na expiração e cobrança da obrigação em USDC serão comunicados antes da disponibilidade geral.
curl --request POST \
--url https://api.lbpay.example.com/v1/inventories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quoteId": "qt_01JA1X",
"externalId": "inventory-2026-11-04-001"
}
'import requests
url = "https://api.lbpay.example.com/v1/inventories"
payload = {
"quoteId": "qt_01JA1X",
"externalId": "inventory-2026-11-04-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({quoteId: 'qt_01JA1X', externalId: 'inventory-2026-11-04-001'})
};
fetch('https://api.lbpay.example.com/v1/inventories', 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.lbpay.example.com/v1/inventories",
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([
'quoteId' => 'qt_01JA1X',
'externalId' => 'inventory-2026-11-04-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.lbpay.example.com/v1/inventories"
payload := strings.NewReader("{\n \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\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.lbpay.example.com/v1/inventories")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lbpay.example.com/v1/inventories")
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 \"quoteId\": \"qt_01JA1X\",\n \"externalId\": \"inventory-2026-11-04-001\"\n}"
response = http.request(request)
puts response.read_body{
"inventoryId": "inv_01JA2B",
"quoteId": "<string>",
"status": "ACTIVE",
"fromCurrency": "USD",
"toCurrency": "BRL",
"rate": "5.40000000",
"total": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"available": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"reserved": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"used": {
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "USD",
"amount": "1000.00"
}
},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"referenceRate": "5.43210000",
"spread": {
"percentage": "0.75",
"amount": {
"currency": "USD",
"amount": "7.50"
}
},
"pendingSettlement": {
"currency": "USD",
"amount": "1000.00"
},
"settlementId": "<string>",
"metadata": {}
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key to prevent duplicate creation or execution.
8 - 128Body
Response
Inventory Lot criado
Inventory Lot: câmbio contratado antecipadamente pela MSB e promessa de pagamento em USDC. Cada aceite de cotação INVENTORY cria um lote independente, com taxa, volume e validade próprios. total = available + reserved + used. A obrigação em USDC existe independentemente de withdrawals e se refere ao volume não utilizado; o evento e a data de apuração e cobrança serão comunicados antes da disponibilidade geral.
"inv_01JA2B"
Cotação INVENTORY que originou o lote.
ACTIVE: dentro da validade, com volume disponível. DEPLETED: sem volume disponível (todo reservado ou utilizado); volta a ACTIVE se uma reserva for liberada dentro da validade. EXPIRED: passou de expiresAt; não aceita novos withdrawals. O tratamento do volume remanescente após a expiração será comunicado antes da disponibilidade geral. Enum extensível.
ACTIVE, DEPLETED, EXPIRED USD BRL Taxa contratada entre a MSB e a LB Pay (BRL por USD), já com o spread. Aplicada a todas as remessas do lote.
^[0-9]+(\.[0-9]{1,8})?$"5.40000000"
Volume contratado.
Show child attributes
Show child attributes
Volume disponível para novos withdrawals.
Show child attributes
Show child attributes
Volume reservado por withdrawals em andamento.
Show child attributes
Show child attributes
Volume já utilizado por withdrawals.
Show child attributes
Show child attributes
Validade do lote.
BRL por USD, até 8 casas decimais.
^[0-9]+(\.[0-9]{1,8})?$"5.43210000"
Spread de câmbio: única tarifa da remessa.
Show child attributes
Show child attributes
Obrigação em USDC referente ao volume não utilizado. null até a apuração, cujo evento será comunicado antes da disponibilidade geral.
Show child attributes
Show child attributes
Lote de liquidação da obrigação, quando existir.

