← Back to Playbooks
Payments

Agent Payments & Spend-Policy Control Plane

Enroll a card, cap the mandate, hand the agent a payment capability — not the PAN

Operator recipe for letting an agent buy mid-task without giving it a raw unbounded card. Enroll and tokenize the card once, attach a spend policy (cap, clock, merchant/API scope), issue a scoped payment capability, allow x402-style mid-task purchases inside that mandate, then revoke. Pair the payment plane with Know-Your-Agent identity (Ant International, Mastercard, and Visa interoperability work is in progress as of 2026-09-10 — not a finished shared standard; see /playbooks/agent-identity-kya/ — distinct from this spend-policy plane) and with credential Connections that distinguish agent-owned vs caller-owned secrets. A spend rail can also sit inside login: Sign in with ChatGPT plan-usage scope `chatgpt.tokens.use.direct` (Plus/Pro). Model it as a session attribute with health states granted / capped_or_exhausted / not_eligible / revoked; revoke refresh tokens on logout; never treat it as the sole billing source. Primaries: Nevermined Pay; LangChain “Agents That Pay”; PR Newswire KYA collaboration; LangChain Connections; https://workos.com/blog/sign-in-with-chatgpt-plan-usage-scope. Related catalog tools: Nevermined, LangChain Managed Deep Agents, Stripe Link (Wallet for Agents).

Core Workflows (7)

Each workflow represents a critical business function. Click any workflow to see detailed automation architecture.

01

Enroll and tokenize the card

Led by: Enrollment Operator

Human enrolls a credit or debit card once. The PAN is tokenized in a PCI-compliant vault (Nevermined documents Stripe, Braintree, or Visa Intelligent Commerce). The operator never hands the raw card number to the agent.

Sub-Agents
Tokenization Vault
Skills Required
Nevermined PayPCI card tokenization
Human TouchpointCard enrollment and identity check
02

Attach a capped spend mandate

Led by: Spend-Policy Operator

Set the policy before any buy: total budget, time window that auto-stops, optional per-purchase cap, optional transaction count, optional merchant/API-key restriction. Enforcement is server-side before settlement. A raw unbounded payment method makes the spend answer “everything”; a delegation makes it a cap, a clock, and an off switch.

Sub-Agents
Mandate Store
Skills Required
Nevermined PaySpend mandates
Human TouchpointApprove the mandate (budget, window, merchant/API scope)
03

Issue a payment capability, not the card

Led by: Capability Issuer

The agent receives a scoped credential — a payment capability / virtual-card credential encoding identity, limits, and restrictions — not the enrolled PAN. One capability can be reused across sessions, tools, and frameworks until the mandate expires or is revoked.

Sub-Agents
Paying Agent
Skills Required
Nevermined PayScoped credentials
Human TouchpointConfirm the agent gets a capability, not card credentials
04

Mid-task buy (x402-style)

Led by: Paying Agent

When the agent hits a paid API or tool, it presents the payment token (x402 / payment header) and settles inside the mandate. LangChain’s Nevermined cookbook shows mid-task purchase and top-up of search credits without a human in the loop for each in-mandate buy; out-of-policy amounts pause. This is the same pattern Stripe Link uses for a one-time card or shared payment token after a spend request — different vendor, same “capability not PAN” rule.

Sub-Agents
x402 Facilitator
Skills Required
x402Nevermined PayLangChainStripe Link
Human TouchpointOnly if the buy exceeds the mandate or the rail requires per-spend approval
05

Pair KYA identity and credential Connections

Led by: Identity Operator

KYA: Ant International, Mastercard, and Visa announced collaboration on a Know-Your-Agent interoperability framework (2026-09-10) so networks can recognize agents across ecosystems while keeping their own verification. Treat that as interop in progress, not a live shared cert. Connections: LangChain Managed Deep Agents stores named credentials as agent-owned (shared by every caller) or caller/user-owned (resolved per person at runtime). Decide ownership when creating the connection; it does not change later. Pair the spend mandate with the matching identity and credential owner.

Sub-Agents
KYA Interop (in progress)Connections Store
Skills Required
KYA (Visa / Mastercard / Ant)LangChain Connections
Human TouchpointChoose agent-owned vs caller-owned credentials; do not assume KYA interop is finished
06

Revoke the mandate

Led by: Spend-Policy Operator

Revoke or let the clock expire. After revoke, the agent still exists but the payment capability stops. Rotate or revoke Connections in the workspace without shipping a new PAN to the agent.

Sub-Agents
Revocation Control
Skills Required
Nevermined PayLangChain Connections
Human TouchpointRevoke on compromise, task end, or policy change
07

Treat plan-usage login as a spend rail

Led by: Spend-Policy Operator

A spend rail can sit inside login. OpenAI DevDay (29 Sep 2026) added plan usage for third-party apps via the OAuth scope `chatgpt.tokens.use.direct` (ChatGPT Plus/Pro only), as documented by WorkOS (1 Oct 2026). Consent mixes identity scopes with draw-down on a personal subscription balance; per-app weekly percent caps apply; Plus shares a five-hour window across apps. OpenAI does not notify apps on disconnect — the app learns via a failed refresh or request. HTTP 429 `subscription_sharing_usage_limit_exceeded` does not say which limit was hit. Credits after included usage need a separate user opt-in and a 100% app cap. Docs are aimed at open-source and locally hosted apps; remote paid SaaS is pointed to an interest form. Host ID (`ext_agent_host_id`) identifies a host but does not prove key possession. Model plan-funded inference as a session attribute with health states `granted`, `capped_or_exhausted`, `not_eligible`, and `revoked`. Revoke refresh tokens on logout. Never treat the grant as the sole billing source. Employers cannot see personal-Plus funding of work agents.

Sub-Agents
Paying AgentSession Health
Skills Required
Sign in with ChatGPTchatgpt.tokens.use.directOAuth revocation
Human TouchpointDo not ship plan-usage as the only billing path; confirm logout revokes the refresh token