Skip to main content
All use cases
MarketplaceMarketplaces

Every order, fulfilled end to end.

The agent watches the order stream, charges the buyer on the cheapest local rail, issues the fiscal document, prints a shipping label, and notifies on WhatsApp. One mandate, one sealed ledger entry per order.

BeforeFive tools, five tabs, manual handoffs
AfterOne agent, order to sealed ledger
58s
from order to sealed ledger
Try it in the Sandbox
58s
Order to ledger
Charge, doc, label, notify, seal
Pix
Cheapest rail
Buyer charged on a live Pix rail
NF-e
Fiscal doc
Issued per order (homologation today)
Sealed
Per order
Hash-chained to the mandate
What the agent does

One order, charged, invoiced, shipped.

The agent picks up order #4821, charges the buyer on Pix, issues the NF-e, buys the shipping label, and pings the buyer on WhatsApp. Each step seals to the same mandate and the same order.

  • Charges the buyer on the cheapest local rail
  • Issues the fiscal document for the destination
  • Buys the shipping label and notifies on WhatsApp
  • Every step sealed to one order and one mandate
Order #4821
Marketplace · fulfillment
Agent
Order #4821. Charging the buyer on Pix.
via codespar_charge · Pix rail
Paid. Issuing the NF-e and buying the label.
Order#4821
RailPix
AmountR$ 219,80
Receiptrcpt_OF
Got it. Label and WhatsApp confirmation sent.
charged · invoiced · shippedrcpt_OF01
The pain

The conversation is the easy part.

Fulfillment lives in five tools that do not talk to each other. Charge here, invoice there, ship somewhere else, notify by hand.

Charge in one tool, invoice in another

The agent charges and invoices in one flow

Buy the label in a third tab

The agent buys the shipping label under the same mandate

Notify the buyer by hand

The agent notifies on WhatsApp automatically

Reconcile five systems at month end

Each order is one sealed ledger entry

How the agent does it

Fulfillment as one governed flow.

The agent charges the buyer on the cheapest local rail, issues the fiscal document, ships, and notifies, all under one mandate. Pix-in is prod-capable; the fiscal document runs in homologation. Every order becomes one sealed ledger entry.

01
Order
Marketplace

Agent picks up the order

02
Charge
codespar_charge

Buyer paid on Pix

Pix rail
03
Invoice
codespar_invoice

Fiscal doc for the destination

Fiscal rail
04
Ship
Melhor Envio

Label bought and printed

05
Notify
Z-API

Buyer pinged on WhatsApp

Architecture

The agent reads the order stream and charges the buyer via codespar_charge on Pix, then codespar_invoice issues the fiscal document for the destination, a shipping label is bought, and the buyer is notified on WhatsApp. Every step seals to one mandate and one order for a reconstructable trail.

In code

A few lines. The whole loop.

autonomous-fulfillment.ts
const session = await codespar.sessions.create();

// charge, invoice, ship, notify - one order, one mandate
const res = await session.execute("codespar_charge", {
  order: "4821",
  rail: "pix",
  amount: 21980, // minor units, inside the mandate cap
});

await session.verificationStatus(res.toolCallId);
58s · sealedreceipt · rcp_autono
Featured tools
codespar_charge

Charges the buyer on the cheapest local rail, inside the mandate.

codespar_invoice

Issues the fiscal document for the destination country.

Audit ledger

Seals every order to one mandate for a reconstructable trail.

See the meta-tool reference

Ship it this afternoon.

Open the sandbox, point a session at your providers, and run the whole loop against real rails in minutes — not the quarter it takes to build it by hand.

Autonomous fulfillment agent — CodeSpar | CodeSpar