Ecommerce Profitability Unit Economics
by Unit Contribution Margin in Markets & finance
Compute landed cost, total cost per unit, contribution margin, ROI, break-even price and break-even ACoS from caller-supplied product costs and marketplace fees or fee rates. Docs: https://www.brainiac.software/api/ecommerce-profitability/unit-economics
https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics- Price
- $0.03
- per call in USDC
- Uptime
- 87.5%
- last 30 days
- Response time
- 220 ms
- 326 ms slowest 5%
- Last check
- Passed
- 12 min ago, next in 19 min
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics
Each call costs $0.03 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics
content-type: application/json
{
"costs": {
"duty": 60,
"fulfilmentFees": 420,
"inboundFreight": 120,
"marketplaceFees": 750,
"other": 0,
"packaging": 30,
"product": 800,
"storage": 25
},
"currency": "USD",
"pricePerUnit": 2999,
"returnLossPerUnit": 1200,
"returnRate": 0.05,
"salesTaxIncluded": false
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
costs | object | Yes | costs supplied by the caller for this operation. |
currency | string | Yes | Optional ISO currency code for a single-quote request. |
marketplaceFeeRate | number | No | marketplace Fee Rate supplied by the caller for this operation. |
pricePerUnit | integer | Yes | price Per Unit supplied by the caller for this operation. |
returnLossPerUnit | integer | Yes | return Loss Per Unit supplied by the caller for this operation. |
returnRate | number | Yes | return Rate supplied by the caller for this operation. |
salesTaxIncluded | boolean | No | sales Tax Included supplied by the caller for this operation. |
Example response
The provider's example. We can't check it without paying.
{
"breakEvenAcos": 0.2447,
"breakEvenPrice": 2265,
"contributionMargin": 734,
"currency": "USD",
"landedCost": 1010,
"limitations": [
"landedCost = product + inboundFreight + duty + packaging. Returns allowance = returnRate × returnLossPerUnit.",
"When marketplaceFeeRate is set, marketplace fees = price × rate and break-even price = ceil((total without fees) / (1 − rate)). Otherwise break-even price"
],
"marginPct": 0.2447,
"marketplaceFees": 750,
"returnsAllowance": 60,
"roi": 0.7267,
"salesTaxIncluded": false,
"sources": [
{
"retrievedAt": "2026-11-14",
"source": "Caller-supplied marketplace fees, costs, ads rows and listing text processed locally",
"status": "ok",
"url": "https://www.brainiac.software/api/v1/ecommerce-profitability"
}
],
"totalCostPerUnit": 2265
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.03.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics' \
-H 'content-type: application/json' \
--data-raw '{"costs":{"duty":60,"fulfilmentFees":420,"inboundFreight":120,"marketplaceFees":750,"other":0,"packaging":30,"product":800,"storage":25},"currency":"USD","pricePerUnit":2999,"returnLossPerUnit":1200,"returnRate":0.05,"salesTaxIncluded":false}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics' \
-H 'content-type: application/json' \
--data-raw '{"costs":{"duty":60,"fulfilmentFees":420,"inboundFreight":120,"marketplaceFees":750,"other":0,"packaging":30,"product":800,"storage":25},"currency":"USD","pricePerUnit":2999,"returnLossPerUnit":1200,"returnRate":0.05,"salesTaxIncluded":false}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.03 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.03" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.03 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.brainiac.software%2Fapi%2Fv1%2Fecommerce-profitability%2Funit-economics&method=POST
const res = await pay("https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"costs": {
"duty": 60,
"fulfilmentFees": 420,
"inboundFreight": 120,
"marketplaceFees": 750,
"other": 0,
"packaging": 30,
"product": 800,
"storage": 25
},
"currency": "USD",
"pricePerUnit": 2999,
"returnLossPerUnit": 1200,
"returnRate": 0.05,
"salesTaxIncluded": false
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.03 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.03"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://www.brainiac.software/api/v1/ecommerce-profitability/unit-economics",
json={
"costs": {
"duty": 60,
"fulfilmentFees": 420,
"inboundFreight": 120,
"marketplaceFees": 750,
"other": 0,
"packaging": 30,
"product": 800,
"storage": 25,
},
"currency": "USD",
"pricePerUnit": 2999,
"returnLossPerUnit": 1200,
"returnRate": 0.05,
"salesTaxIncluded": False,
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 12 min ago | Passed | 402 | 259 ms | $0.03 |
| 11 h ago | Passed | 402 | 326 ms | $0.03 |
| 21 h ago | Passed | 402 | 242 ms | $0.03 |
| 32 h ago | Passed | 402 | 238 ms | $0.03 |
| 42 h ago | Passed | 402 | 183 ms | $0.03 |
Show 10 older checks
| 2 days ago | Passed | 402 | 220 ms | $0.03 |
| 3 days ago | Passed | 402 | 254 ms | $0.03 |
| 3 days ago | Timed out | - | - | - |
| 6 days ago | Timed out | - | - | - |
| 6 days ago | Passed | 402 | 250 ms | $0.03 |
| 7 days ago | Passed | 402 | 217 ms | $0.03 |
| 7 days ago | Passed | 402 | 210 ms | $0.03 |
| 8 days ago | Passed | 402 | 193 ms | $0.03 |
| 8 days ago | Passed | 402 | 316 ms | $0.03 |
| 8 days ago | Passed | 402 | 216 ms | $0.03 |