Skip to main content

Use case · Operate on behalf of a customer

Pilot · on your platform

The money layer under your customers' assistant.

You own the assistant and the app. Each business customer signs a mandate with payees, caps and expiry; the assistant pays and collects inside it, and your app shows the history.

Test keys are free.

Your app · the assistant of a business customerdemo

The mandate, as your customer sees it

Payees

landlord · accountant · parts supplier

Per transaction

R$ 8,000.00 · above it, approval

Per month

R$ 40,000.00 · above it, refused

Valid for

90 days · renewed explicitly

October, as the assistant executed it

Rent · boletoListed payee · under the caps−R$ 6,200.00paid
Accountant · boletoListed payee · under the caps−R$ 890.00paid
Equipment · boletoAbove the per-transaction cap of R$ 8,000.00 · waits for approval−R$ 9,500.00waiting for approval
New supplier · boletoNo mandate names this payee · nothing sent · the owner signs a new mandate naming itR$ 3,800.00refused
A client pays the business · Pix chargeMoney in · ledger entry, no signed receipt+R$ 2,400.00received
Monthly cap · OctoberR$ 7,090.00 of R$ 40,000.00
1 waiting for approval · R$ 9,500.00receipts rcpt_demo_0410 · rcpt_demo_0411 · signed

Pilot · demo data

The pain

Your platform wants to offer an assistant that moves money, but not to build governance, approvals and proof.

Who uses it

The business owner, inside your app.

Who buys it

An online accounting firm, a fintech or a bank with business customers.

The gain

The customer sets payees, caps and expiry; the assistant pays and collects inside them; your app shows the history.

The flow, side by side

Your assistant, their mandate, our checks.

This page sells what runs underneath. The assistant and the app are yours; distribution through your platform is a pilot.

  1. 01Customer

    Signs the mandate

    In your app the owner signs a mandate: listed payees, a per-transaction and a monthly cap, 90 days. The consent page is CodeSpar's.

    mnd_demo_pj · 90 days
  2. 02Your assistant

    Pays the month

    Your assistant opens a session for that customer and pays the month's boletos through codespar_pay.

    codespar_pay · boleto
  3. 03CodeSpar

    Checks every payment

    The payee must be in the signed list and the caps apply. Outside the list it is refused; above the per-transaction cap it waits for a person.

    payees · caps · receipts
  4. 04Your platform

    Shows the history

    Payments, receipts and charges received appear in your app. Distribution through your platform is a pilot.

    Pilot · integration

Behind it

Mandate, payees, approvals, receipts.

The customer's rules live in a mandate they sign. CodeSpar checks every payment against it; your platform owns the assistant and the screens.

Mandate · mnd_demo_pj demo
Signed byThe business owner, on the consent page
Payeeslandlord · accountant · parts supplier
Per-transaction capR$ 8,000.00 · above it a person approves (boleto the agent pays)
Monthly capR$ 40,000.00 / month · above it, refused
Validity90 days · renewed explicitly
Three paths under the same mandate demo
Happy pathRent · R$ 6,200 · listed payee, under the caps → paid by boleto, receipt signed.
ExceptionEquipment · R$ 9,500 · above the per-transaction cap of R$ 8,000 → waits for approval in the Dashboard. Bringing that decision to the owner in your app is your integration.
RefusalA new supplier no mandate names → refused, nothing sent. The owner signs a new mandate naming it; then the assistant pays.
TypeScript · @codespar/sdk 0.16.11SDK example
const session = await new CodeSpar().create("cust_pj_0412", { preset: "brazilian" });const run = await session.send("pay this month's rent boleto for the workshop");const pay = run.tool_calls.find((c) => c.tool_name === "codespar_pay");// listed payee: paid, rcpt_demo_0410 · above the cap: approval_required · not in the mandate: refused

SDK example · demo data · not run on this page

What runs it demo
Mandate and rulesExistsSigned payee list, per-transaction and monthly caps, validity.Open
PaySandboxPays the boleto under the customer's mandate.Open
ApprovalsExistsAbove the per-transaction cap the payment waits in the Dashboard; approvals expire in 24 h.Open
CollectSandboxCharges your customer's own clients by Pix; money in is a ledger entry.Open
Your appPilot / integrationThe assistant, the screens and the distribution are yours.

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.

Mandate: signed payees, per-transaction and monthly capsChecked on every payment; above the monthly cap it is refused.Exists
A payee the mandate does not nameRefused, nothing sent. The path is a new mandate naming the payee; nothing holds it for a person.Exists
Boleto test paymentsSettle in the sandbox with a test key.Sandbox
Approval above the per-transaction capIn the Dashboard, by an organization admin; approvals expire in 24 h.Exists
Charge receivedA Pix charge paid by your customer's client is a ledger entry; money in gets no signed receipt.Sandbox
The approval in your app, for the ownerBringing the decision to the business owner is your integration.Pilot / integration
Distribution via your platformYour customers reach the assistant through your app: a pilot.Pilot / integration

Cookbook

One session per customer, under their mandate.

Each business customer signs a mandate on the consent page; your assistant opens a session for that customer and pays in plain language. Above the per-transaction cap the payment waits in the Dashboard; a payee outside the mandate is refused.

  1. A test keyFrom the Dashboard. Test keys are free; nothing moves real money.
  2. A mandate per customerPayees, per-transaction and monthly caps, validity. The Dashboard opens the consent page; your customer signs it.
  3. Your customer's idThe session's user id: one session per business customer.
@codespar/sdk 0.16.11SDK example
// 1 · your customer signed mnd_demo_pj on the consent page: listed payees, R$ 8,000.00 per transaction, R$ 40,000.00 a monthimport { CodeSpar, isApprovalRequired } from "@codespar/sdk";const session = await new CodeSpar().create("cust_pj_0412", { preset: "brazilian" }); // 2 · your assistant pays for that customer, in a session under their user idconst run = await session.send("pay this month's rent boleto for the workshop");const pay = run.tool_calls.find((c) => c.tool_name === "codespar_pay"); // 3 · under the caps: paid · above the per-transaction cap: waits for approval · payee not in the mandate: refusedif (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

Use caseConcept

Personal assistants

The month's obligations under a mandate; exceptions wait for you.

Use caseSandbox

CFO copilot

Pay approved invoices under your approval policy.

Use caseSandbox

WhatsApp: Pix payment request in chat

A Pix charge inside the conversation, paid in the bank app.

Give your agents a way to pay and get paid.

Build is free: hosted MCP, SDK and sandbox.

Test keys are free.

terminal · test modedemo
$ claude mcp add --transport http codespar https://connect.codespar.dev/mcp \    --header "Authorization: Bearer <test key>"> "pay this month's boletos for customer cust_pj_0412"  rent and accountant paid · equipment above the per-transaction cap waits · new supplier not in the mandate: refused  2 paid · 1 waiting for approval · 1 refused · recorded

Illustrative · demo data

Business assistant for your customers · CodeSpar