Skip to main content

Overview & Concepts

What problem does the IXOPAY Payment Agent solve?​

AI shopping agents browse stores and buy on behalf of people. Three things get in the way:

  1. Checkout is built for humans. Forms, CAPTCHAs and redirects don't work for software.
  2. Prompt injection can become payment injection (PI2PI). A hostile page or message can trick an agent into paying a different amount or for different items than its owner approved.
  3. Card data is a liability. Merchants who touch raw card numbers take on PCI-DSS audit scope.

The IXOPAY Payment Agent sits between the agent, the merchant and the card networks to address all three:

ProblemHow the Payment Agent handles it
No machine checkoutMerchants publish a discovery manifest; agents call /v1/negotiate and /v1/transact.
PI2PI cart tamperingThe cart is canonicalized (RFC 8785 JCS) and hashed with SHA-256 into an Invoice Hash. The agent's signed mandate carries that hash. Any change to amount, currency, merchant or line items changes the hash and the payment is refused.
Card data exposureCredentials are network tokens (Visa TAP, Mastercard Agent Pay) or IXOPAY tokens. Where a human must enter a card, the TokenEx iFrame collects it inside TokenEx's secure environment.

The cast​

RoleWhoWhat they do
Buyer / userA personApproves the order and sets the spending rules used by the agent.
AgentSoftware acting for the buyerBrowses, builds a cart, signs a mandate, calls the Payment Agent.
MerchantThe storePublishes the manifest and catalog, locks carts, receives settlement notifications.
IXOPAY Payment AgentThis productLocks carts, verifies mandates, enforces spending rules, maps tokens through the vault, and records an audit trail.
VaultIXOPAYHolds the card data. The Payment Agent only ever handles tokens.

Two ways to pay​

  1. TokenEx iFrame (customer enters a card). Your server locks the cart, your page shows the TokenEx iFrame, and the card goes straight to the vault. You receive a token and complete the payment. Start with the Quickstart.
  2. Agent mandate (an AI agent pays). The agent signs a Mastercard Agent Pay or Visa TAP mandate bound to the cart's hash. Described below and in the Agent Developer Guide.

How an agent payment flows​

Either party can request the lock. Before signing, the agent must verify that the locked cart matches the buyer-approved order held in trusted state. After handover, the merchant waits for the processor confirmation required for fulfillment.

Key concepts​

Discovery manifest. A JSON file at /.well-known/ai-payments.json that tells an agent which protocols a store supports and where the Payment Agent endpoints are.

Session. Created by /v1/negotiate. It holds the cart's Invoice Hash and expires after 300 seconds. The session moves through a strict state machine (PARAMETER_NEGOTIATION, SIGNATURE_VERIFICATION, PPCB_VALIDATION, VAULT_MAPPING, SETTLEMENT_HANDOVER, or FAILED_TERMINATE). A session can settle once.

Invoice Hash (PPCB). "Protocol Parameter Cryptographic Binding." A SHA-256 hash of the canonical cart. See How the Invoice Hash is computed.

Mandate. A signed statement of what the buyer authorized. The Payment Agent accepts:

  • Mastercard Agent Pay (AP4M): a four-layer SD-JWT chain signed with ES256.
  • Visa Trusted Agent Protocol (TAP): an RFC 9421 HTTP Message Signature using Ed25519 or RSA-PSS.

L2 mandate (spending rules). Check the buyer’s cap, allowed merchants and SKUs, currency and expiry before signing. The gateway can reject a purchase or issue a pilot challenge for a request-level budget cap. A signed AP4M cap denial may end the attempt.

TokenEx iFrame. For a guest buyer with no pre-delegated card, the TokenEx iFrame on the merchant's page collects the card inside TokenEx's environment. The page receives a token and a tokenHMAC, not a card number.

Audit proof. A gateway-generated record of transaction details and the cart hash. Preserve the original authorization and processor records separately for disputes.

WebMCP tools. Model Context Protocol tools a storefront can expose so agents can search, add to cart, and (with human consent) pay.

Supported protocols and rails​

Protocolprotocol value accepted by /v1/transactSignature
Mastercard Agent PayAP4M, MASTERCARD_AP4MES256 (SD-JWT chain)
Visa Trusted Agent ProtocolVISA_TAP, VISAEd25519, RSA-PSS-SHA256
TokenEx Direct RESTTOKENEX_REST, TOKENEXPPCB Invoice Hash + CustomData1–4
TokenEx iFramevia /v1/checkout/completen/a (human-entered, tokenized)

The discovery manifest (/.well-known/ai-payments.json) advertises only enabled, active rails. It lists the TokenEx iFrame as TOKENEX_IFRAME_HPP. To finish an iFrame payment, call /v1/checkout/complete with protocol: "TOKENEX_DIRECT".

Performance​

The Payment Agent's own routing work (verify, bind, map) is designed to stay under 10 ms at p95/p99. This excludes network round trips to card-network sandboxes, which typically add 150–300 ms. Set agent HTTP timeouts to about 5 seconds.

Glossary​

See the Glossary for the terms and acronyms used in these docs.