Which agent payments API does your application need?
Start with the actor and the effect. A research agent buying a report needs a controlled funding source and a compatible payment client. The report publisher needs a priced resource and a payment check tied to delivery. An assistant analyzing the publisher’s revenue needs account data, which gives it a different reason to use an API.
Stripe’s current commerce overview makes a useful role distinction: it separates building an agent from selling products, services and APIs to agents. Its administrative agent tools separately cover developer guidance and live account data. These are documented provider routes, rather than proof that any Stripe credential authorizes every action. [1] [2]
For a concrete design exercise, a research agent must buy one supplier report for no more than $0.25 from an approved seller. The report must identify SUPPLIER-42 and include a source date. All amounts and identifiers in this walkthrough are synthetic. No payment was executed to write this guide.
Use the role table to choose the first integration boundary. If the task is retail checkout, the merchant checkout API guide covers carts, tax, shipping and order completion. If the task is selling this report through x402, use the API acceptance guide for server integration.
Choose by actor and financial effect
Scroll the table to compare all columns.
| Role | Input and effect | Documentation boundary |
|---|---|---|
| Buyer | Approved purchase; request a credential or use a permitted signer | Link spend requests or a compatible wallet/client [3] [4] |
| Seller | Priced resource/order; check payment and provide delivery | Stripe seller routes or the x402 API acceptance guide [1] |
| Administrator | Scoped account request; inspect or manage business resources | Stripe Agents and AI; no purchase consent inferred [2] |
Define the purchase before preparing a payment
The buyer needs a stable description of what it is allowed to obtain. Record the seller, requested resource, accepted price and currency, payment route, expiry and expected output. These are recommended application records. Map them to the selected provider’s real schema rather than sending invented field names to an SDK.
For the supplier report, the approved ceiling is $0.25, but a seller may offer it for $0.20. The payment decision should bind that actual offer. If the seller later asks for $0.30, the existing ceiling does not cover the revised purchase. If the recipient changes while the price stays $0.20, reevaluate the counterparty as well.
A quote is useful only when its status is clear. Say whether obtaining it creates any commitment, when its terms expire and what evidence must be refreshed. Do not label a tool result paid when it merely prepared an instruction. The model’s confidence that a quote looks reasonable is separate from owner authority.
Keep the report request and its financial terms connected. Otherwise a payment component could correctly send $0.20 while the resource handler returns a report for another supplier. Approval, payment and delivery should refer to the same logical purchase.
Put approval at the commitment boundary
An agent payments API should expose an understandable point at which a proposed action becomes a financial commitment. Decide whether the owner approves every purchase or delegates a bounded policy. Enforce the permitted recipient, amount, purpose and time window outside the model’s interpretation of seller text.
Link Agent Wallet is one documented customer-present example. An agent creates a spend request for a specific purchase; the customer approves it and Link returns a one-time-use payment credential. Its financial-insights capability uses separate requested scopes. This is a specific integration pattern, not evidence of unattended standing authority for every buyer workflow. [3]
For our report, an approval must still match the terms at submission. A material change should invalidate the old decision or follow an explicitly permitted change rule. The same applies when several processes work on one task: reserve the shared budget before they each commit funds.
Keep limit changes, new recipients and credential administration out of the ordinary purchase permission. A research task may need to buy a report without having authority to increase its own budget. The authorization guide explains permission scope; the spending-limits guide develops the reservation ledger.
One purchase, explicit authority and evidence
- Request
Bind supplier report, seller, price and expected output.
- Approve
Owner or bounded policy authorizes the exact commitment.
- Prepare and submit
Persist one logical attempt and provider reference.
- Resolve
Inspect authoritative status; recover an uncertain attempt.
- Validate delivery
Check SUPPLIER-42 and source date separately from payment.
- Retain evidence
Connect approval, financial outcome and report reference.
Send one durable attempt and resolve its outcome
Treat one logical purchase as a record that can outlive a process restart. Give the local attempt a stable identifier, retain the provider’s operation reference and reuse the documented retry mechanism. A newly generated request is not necessarily a retry; it may be a second authorized payment.
After submitting the report purchase, imagine the network response disappears. The application knows it sent an instruction, but does not know whether payment completed. Keep the attempt unresolved, preserve its reserved budget and use the provider’s status or recovery route. If no such route is documented, that is a material integration gap to resolve before allowing unattended purchasing.
Inspect the scope of idempotency carefully. Determine which operation it covers, what inputs are bound to it, how conflicts are reported and how long the implementation retains state. An application identifier alone does not force a remote service to deduplicate. Reusing a reference for changed terms should not silently retrieve an unrelated outcome.
Recovery also needs an owner. Show the unresolved amount, purchase and last authoritative evidence to an operator who can investigate. Define when an attempt can be retried, abandoned or escalated. A transport timeout should not independently release a financial commitment.
Keep payment evidence and the purchased result separate
The report task has two outcomes to validate. First, determine the financial state from the selected payment system. Then inspect the delivered report for SUPPLIER-42, the requested structure and source date. A payment receipt does not establish the quality or correctness of the purchased data.
An x402 buyer receives payment requirements with the resource request, supplies a supported payment payload and inspects the resulting payment response and resource. Its HTTP V2 documentation names PAYMENT-REQUIRED, PAYMENT-SIGNATURE and PAYMENT-RESPONSE. These are transport elements; they do not define your internal purchase database or a universal merchant order schema. [5]
The financial sequence also depends on the selected scheme. The x402 scheme reference distinguishes authorization, upfront and escrow-style flows. Choose failure handling that matches the implementation instead of assuming every protocol settles before executing a handler. [6]
If payment completes but the report is missing, preserve both findings. Use the seller’s documented retrieval or support process before a new charge. A refund request has its own outcome and does not mean the original purchase never happened. Keep the evidence available to the person reviewing the task.
How do I add payments to an AI agent?
To add payments to an AI agent, first select the purchase interface and signer, then define approval, durable attempts and result validation. Adding a transfer command without these boundaries leaves the agent unable to distinguish an authorized purchase from a duplicate or an unresolved operation.
Compare the actual interface rather than just the provider name. Coinbase Agentic Wallet’s overview lists x402 payments for CLI and MCP, with general sending and trading on the CLI. An MCP-compatible agent therefore still needs to check whether the selected interface supports its intended payment task. [4]
Agent Payment Node, the publisher’s own open-source project, is a concrete agent payments API alternative delivered through the apn CLI or local stdio MCP rather than a hosted HTTP endpoint. The owner allowlists assets, rails and mechanisms and sets per-operation and daily caps. Direct transfers wait for the owner’s typed approval in a foreground terminal, and x402 purchases run unattended only inside the x402 policy and caps the owner created there. MCP hands off the exact approval command; it never approves a payment. [7]
APN keeps payments as durable operations with idempotency keys and a prepare, approve and recover lifecycle. For a compatible x402 report purchase, those records give the agent and owner a defined recovery path. This documented runtime scope does not validate the seller’s data or replace your application’s report acceptance checks. [7]
Specify the agent payments API contract in a reviewable record
Write the expected transitions before integrating more providers. The conceptual record below uses human-readable labels deliberately. It is an application design aid, not an official API request, a runnable payload or a claim that every vendor supports the same status names.
For each transition, name the system that supplies the evidence. Your policy service supplies approval; the payment integration supplies financial status; the seller supplies delivery. A combined user-facing result should follow those records rather than treating the agent’s final narrative as the source of truth.
Limit the operational record to what recovery needs. Keep reusable credentials, signing material and unrelated customer data out of prompts and ordinary logs. Store safe references that an authorized operator can use in the appropriate system. Access to the record should follow the sensitivity of the underlying purchase.
When a provider cannot expose the needed status or recovery evidence, retain the gap in the decision. Another interface, a human review step or a narrower task may fit better. A broad feature list cannot compensate for an unresolvable payment outcome.
A conceptual agent payments API decision record
- Purchase
- One SUPPLIER-42 report; approved seller; maximum $0.25.
- Current offer
- $0.20 for one report; verify actual asset/network and validity.
- Authority
- Approval bound to this seller and offer; reserve $0.20.
- Attempt
- Persist the local and provider references before retry decisions.
- Unknown result
- Keep $0.20 committed and inspect the original operation.
- Completion
- Record financial outcome and separately validate report delivery.
Evaluate failures before expanding the integration
Test the reader’s actual purchase promise in the intended environment: correct seller, permitted total, one understood financial outcome and a usable report. Include changed terms, denied approval, concurrent requests, a lost response after submission and payment success without delivery. Record observations separately from this teaching scenario.
Then make the next task-specific choice. Use the implementation hub for rollout steps, the seller guide for paid API acceptance, the merchant checkout guide for retail orders, and provider pages for exact credentials and access. Keep the agent payments API contract stable around those integrations while mapping each provider’s real operations explicitly.