Skip to main content
All use cases
Treasury / CardOperations

Real-time authorization, bound to the mandate.

The agent holds a card scoped to its own spend mandate, for the ad-hoc purchases operations always ends up routing to someone's personal card: a subscription renewal, a travel booking, a one-off vendor charge. Every attempt to use it is evaluated in real time by CodeSpar's own authorizer, running live inside a PCI-scoped cardholder data environment on AWS — checking the merchant, the amount and the mandate's cap the instant the charge is tried.

BeforeShared corporate card, no real-time governance
AfterMandate-bound card, decision made live — enforcement is next
Preview
authorization decision, bound to the mandate
Try it in the Sandbox
Live
PCI-scoped CDE
CodeSpar's own cardholder data environment, running today on AWS
Real-time
Authorizer decision
Every attempted charge evaluated against the signed mandate as it happens
Observe
Current mode
Approve or decline computed the instant a charge is tried
$0
One mandate
Governs the card exactly like every other spend the agent makes
What the authorizer sees

Every attempt gets a real decision. No attempt moves a real dollar — yet.

One card authorization attempt, end to end: the authorizer checks the merchant, the amount and the mandate's cap the instant the charge is tried, inside CodeSpar's own PCI-scoped cardholder data environment on AWS. It records what it would do. Observe mode stops there — the decision is logged, not executed, and no money moves.

  • The mandate's cap, merchant category and validity window are checked in real time, on AWS, inside CodeSpar's PCI-scoped environment
  • The authorizer records what it would have done — approve or decline — against the mandate
  • Observe mode never moves money; the decision is logged, not executed

Renew the analytics subscription under the ops mandate.

Attempting a $340 charge to SubscriptionCo. The authorizer is evaluating it against the mandate now — in observe mode, it will decide but will not execute the charge.

Card authorization attempt · observe mode
AUTH-6631 · Northlyne Ops
Observed · not executed
MerchantSubscriptionCo · SaaS renewal
Amount$340.00 · attempted
Mandatecm_ops…4F2 · cap $2,000/mo
DecisionWould approve · within cap and MCC
ExecutedNo — authorizer is in observe mode
authorization-trace.json
observed · logged · not settledtrc_auth6631
The pain

The conversation is the easy part.

"Governance" on a corporate card today means a shared number, a spreadsheet of who's allowed to use it, and a statement review three weeks after the damage is done. An agent making ad-hoc purchases makes that worse, not better — there is no human in the loop to notice a bad charge before it clears.

One shared card number, handed to whichever agent needs to buy something

Each purchase attempt runs against the agent's own signed mandate, cap and merchant rules

Approvals happen after the statement arrives, weeks later

The authorizer evaluates the charge in real time, the moment it's attempted

No record of why a charge was allowed, only that it happened

Every attempt is logged with the mandate, the decision and the reasoning behind it

"Governance" means hoping nobody swipes past the limit

The decision logic runs live, in the open, checked against the mandate every time

How the agent does it

A real authorizer, running in observe mode, on purpose.

codespar_card_authorize evaluates every attempted charge against the signed mandate — cap, merchant category, validity window — in real time, inside CodeSpar's own PCI-scoped cardholder data environment on AWS. codespar_ledger seals the attempt and the decision to the mandate that governed it, the same governance primitive that gates every other rail the agent touches.

01
Attempt
Ops mandate

Agent tries to charge the mandate's card

02
Evaluate
codespar_card_authorize

Mandate, cap and MCC checked live

CodeSpar CDE · AWS
03
Decide
Authorizer

Approve or decline computed

04
Authorize
Authorizer

Decision sealed in real time

05
Record
codespar_ledger

Attempt + decision sealed to mandate

Audit ledger
Architecture

The card lives inside CodeSpar's own PCI-scoped cardholder data environment on AWS, not a third-party issuer's black box. When the agent attempts a charge, the authorizer evaluates it in real time against the tenant's signed mandate — the spend cap, merchant category and validity window — the same governance primitive that gates every other rail the agent touches. Full settlement follows as the authorizer moves from deciding to executing.

In code

A few lines. The whole loop.

governed-agent-card.ts
const session = await codespar.sessions.create();

const attempt = await session.execute("codespar_card_authorize", {
  merchant: "SubscriptionCo",
  mcc: "5817",
  amount: 340.00,
  currency: "USD",
  mandate: "cm_ops",
});

// attempt.decision: "approve" | "decline"
// attempt.executed: false — observe mode never moves money
console.log(attempt.decision, attempt.reason);

await session.execute("codespar_ledger", {
  record: "card_authorization",
  attempt,
});
Preview · sealedreceipt · rcp_govern
Featured tools
codespar_card_authorize

Evaluates a card charge attempt against the mandate in real time, inside CodeSpar's PCI-scoped cardholder data environment. Runs in observe mode today — it decides, it does not execute.

codespar_ledger

Logs every authorization attempt and its decision, sealed to the mandate that governed it.

codespar_mandate

Defines the spend cap, merchant rules and validity window the authorizer checks every attempt against.

See the meta-tool reference
MCP servers wired

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.

Governed agent card — CodeSpar | CodeSpar