The pain
Orders go out every week, and paying each supplier still waits for someone.
Who uses it
The operations or purchasing agent, and the person who approves above the cap.
Who buys it
COO or head of operations of a company that buys from the same suppliers every month.
The gain
The purchase goes out under the per-transaction cap. Above it, a person decides with the rule in view; past the monthly cap, it is refused.
The flow, side by side
From a need to a signed receipt.
Your system raises the need and places the order; the agent pays it. A person steps in only above the per-transaction cap.
01Your system
Need and order
Your inventory flags the need and your purchasing flow places the order with a supplier you work with. The agent reads supplier, amount, due date and the boleto line.
PO-0418 · R$ 1,180.0002CodeSpar
Mandate
The per-transaction cap and the monthly cap are checked before anything is sent. A payment over the monthly cap is refused.
R$ 3,000.00 per transaction · R$ 20,000.00 a month03Payment method
Payment
Under the per-transaction cap the boleto is paid. Above it, the payment waits for a person in the Dashboard; on approval it runs the full cycle: reserved balance, debit, signed receipt.
−R$ 1,180.00 · boleto04CodeSpar · audit trail
Receipt
Each paid boleto gets a signed receipt and a ledger entry with the supplier category; the order reference rides in the description.
rcpt_demo_8a31 · signed
Behind it
Mandate, payment, approvals, receipt.
Three calls from the agent. Everything else is the platform: mandate, payment, approvals, receipt.
SDK example · demo data · not run on this page
Two ways to pay
Where the order comes from.
Two ways an order forms before the agent pays it. With your own suppliers, your purchasing flow places it. At the stores codespar_shop supports, the agent searches, compares and checks out itself.
Path A · your supplier
SandboxYour purchasing flow places the order
The order goes to a supplier you already work with; the agent pays the supplier's boleto under the mandate. Above the per-transaction cap a person approves in the Dashboard.
What the scene and the demo show. Choosing among your suppliers stays in your purchasing flow.
Path B · a supported store
SandboxThe agent shops itself
At the stores codespar_shop supports, the agent searches the live catalog, compares offers and starts the store's checkout; the order is paid by Pix under the mandate. Above the per-transaction cap that payment is refused, not held.
Only the stores codespar_shop supports, not a catalog of your suppliers. Runs in test mode with a test key.
What exists today
Exists, sandbox, pilot or direction: one label per control.
What you can run with a test key today, what runs in the sandbox, what depends on a pilot or an integration, and what is only a direction.
Cookbook
A supplier payment, end to end.
The consumer signs the mandate on the consent page; the agent makes three calls in code. A payment above the per-transaction cap waits for approval in the Dashboard; the agent reads the status.
- A test keyFrom the Dashboard. Test keys are free; nothing moves real money.
- A mandatePer-transaction cap and monthly cap. The Dashboard opens the consent page; the consumer signs it.
- A purchase orderAny reference the agent can quote: PO number, supplier, amount, the boleto line.
// 1 · the consumer signed the mandate on the consent page: R$ 3,000.00 per transaction, R$ 20,000.00 a monthimport { CodeSpar, isApprovalRequired } from "@codespar/sdk";const session = await new CodeSpar().create("user_0000", { preset: "brazilian" }); // 2 · the agent pays the boleto from the purchase orderconst run = await session.send("pay the packaging supplier's boleto for PO-0418");const pay = run.tool_calls.find((c) => c.tool_name === "codespar_pay"); // 3 · under the cap: paid · above it: waits for approval in the Dashboardif (pay && isApprovalRequired(pay.output)) console.log(pay.output.approval_id, pay.output.expires_at);else if (pay) console.log((await session.paymentStatus(pay.id)).payment_status); // "succeeded"SDK example · demo data · not run on this page
Related use cases