MCPA2AACPx402AP2UCPMPP

Your API. Their agents.
Every transaction controlled.

Agent Commerce Gateway turns your existing API into a service agents can request and pay for — while your backend, pricing and settlement controls stay yours.

v1.4.04,386 DownloadsUpdated

01Request receivedExample flow · sample data

The agent requests a paid capability. The Gateway resolves the resource, validates the input and locks the configured price.

Scout Analytics → company.enrich1 / 6
Step 1 of 6. Request received.
Acme Data/ GatewaySandbox

Commerce Activity 6

Every request. Every payment. Every outcome.

Sep 16, 2026
Settled volume0.660 USDC
Delivered3 / 6
Paid · not delivered1
Settlement uncertain0
Caller / ResourceCategoryChannelAmountOutcomeTime
BusinessHTTP0.080 USDCReceivednow
FinanceMCP0.250 USDCDelivered14:30:58
LanguageMCP0.040 USDCDelivered14:30:35
MediaHTTP0.020 USDCDelivered14:30:04
BusinessMCP0.060 USDCReplay blocked14:29:58
ResearchHTTP0.350 USDCPaid · not delivered14:29:12
Demo · Base Sepolia · x402 v2
START WITH WHAT YOU ALREADY HAVE

What can an agent buy
from your business?

Start with one capability your business already provides. Make it discoverable, callable and payable by agents without rebuilding the service behind it.

Data

The insight you already have.

  • Market intelligence
  • Company enrichment
  • Proprietary datasets
Example purchaseA market report

The requested dataset, ready to use.

Pricing unitper result

APIs

The service you already run.

  • Search & verification
  • Document processing
  • Business intelligence
Example purchaseA verified company profile

Structured data returned by your API.

Pricing unitper request

Compute

The work your systems can do.

  • Model inference
  • Image transformations
  • Bounded calculations
Example purchaseA transformed image

The output of a completed compute job.

Pricing unitper execution

Transactions

The action your business enables.

  • Availability checks
  • Quotes & reservations
  • Checkout capabilities
Example purchaseA reservation quote

Availability and terms for a booking.

Pricing unitper operation
ONE INTEGRATION

One integration.
Many agent channels.

Connect your backend once and keep that integration stable. New agent channels can plug into the same commerce layer as the ecosystem changes around it.

Commerce Gateway

Same resource. Same commercial rules.

PriceProtectReceipt
Your existing APIcompany.enrichOne backend integration
MCP x402

An MCP tool call becomes a canonical request. Your business logic stays in the backend you already run.

AP2 policy
ONE COMMERCE CORE

One commerce core.
Every channel.

Different channels can enter in different ways. Pricing, authorization, payment, execution and receipts still follow the same transaction rules on each.

Validated against resource schema

A request your backend can trust.

Resolve the resource, check channel exposure and validate the input before any business action.

WHY IT MATTERS

Malformed input and requests for an unpublished capability stop at the edge. Your backend receives a canonical request only after these checks pass.

STEP OUTPUTCanonical request

A schema-valid resource call is ready for pricing.

request / req_demo_001Illustrative
{
  "request_id": "req_demo_001",
  "channel": "MCP",
  "resource": "company.enrich",
  "input": {
    "company": "Acme",
    "region": "EU"
  },
  "schema": "company.lookup.v1",
  "channel_exposure": "allowed",
  "validation": "passed",
  "backend_invoked": false
}
For a paid resource: proof verified → replay reserved → settlement confirmed → backend invoked.
KEEP PROTOCOLS AT THE EDGE

Why wire protocols
into your backend?

A direct integration rarely stays small. Each new protocol can bring request mapping, payment logic, replay rules, state and tests into your application.

A new protocol arrives. Add an illustrative UCP adapter (planned) and see what changes on each side.

Direct integration

One new protocol touches the application.

Merchant applicationyour codebase
MCPcoreACPexperimentalx402core+ UCPplanned
Protocol routingadapter logic
Request mappingschema
Authorization mappingpolicy
Payment handlingrail logic
Replay protectionstate
Transaction statelifecycle
Error mappingtransport
Receipts & auditoutput
ConfigTestsDocsDeploymentMonitoring
New protocol → changes across the application boundary

Routing is only the first change. Request mapping, payment handling, replay rules, state, errors, receipts and operations all become part of the app.

Gateway architecture

Add one adapter. Keep the backend.

Agent Commerce Gatewaycommerce edge
MCPcoreACPexperimentalx402core+ UCPplanned
Payment enforcementTransaction stateReplay protectionReceiptsAuthorizationError outcomes

Existing backend

Your business logic

unchanged
New protocol → one adapter at the edge

The adapter maps the protocol to the same capability contract. The commerce core and the merchant backend keep the same responsibilities.

OPERATIONAL READINESS

Know if the Gateway
is actually ready.

Check the deployment before paid traffic reaches it. One command verifies configuration, backend reachability, protocols, payments, storage and live runtime state.

$ agent-commerce doctor
human-readable resultIllustrative
passConfiguration valid3 resources · 2 protocol surfaces
passGateway healthy127.0.0.1:8402
passGateway ready
passMerchant backend reachablecompany.enrich
passProtocol surfaces enablednative HTTP · MCP
passProtocol descriptors consistent
passx402 configuredbase-sepolia · USDC
passSettlement destination validmerchant-controlled
passFacilitator reachable
passStorage healthyschema current · writes ok
infoA2A experimental
infoMPP planned
10 / 10 required checks passedReady · exit 0
WHAT IT CHECKS
  • ConfigurationRequired sections, resources and the effective deployment
  • Gateway healthReachable, healthy and reporting itself ready
  • Merchant backendThe service behind the Gateway actually answers
  • Protocol exposureEnabled, experimental, planned or unavailable
  • Protocol descriptorsRevision and capability profile the runtime advertises
  • Payment railsNetwork, asset and provider status
  • Settlement destinationWhere funds are expected to land
  • FacilitatorRemote payment dependency is reachable
  • StorageSchema, writes, replay reservations and events
  • ReceiptsOperational records can be read back
  • Runtime vs configLive Gateway reports what the local file claims

A failed required check exits non-zero, so the same diagnostic contract can gate a deployment instead of a first failed agent transaction.

Initial setupBefore a demoBefore testnet trafficAfter a config changeTroubleshootingCI/CD
FAILURE STATES MATTER

Built for the cases
that don’t go well.

Not every transaction ends cleanly. Payment, execution and delivery stay separate, so uncertain and failed outcomes stay visible instead of one blunt status.

Settlement uncertainIllustrative
One request · two independent facts
GatewayConfirmation missingRail response unresolved
Payment railUnknownReconcile externally
Merchant APIHeldNo API call
Why this state matters

Unknown is its own payment state.

The settlement request may have reached the rail, but its final result is unknown. Treating that as a failure could charge twice; treating it as success could deliver without confirmed payment.

Gateway response

Hold execution and reconcile against the external payment rail.

RUN IT YOUR WAY

Open source.
Choose how you run it.

Inspect the architecture, tests and transaction flow before you deploy. Run the Gateway in your own environment or work with DEVLAB on the operational side.

YOUR ENVIRONMENT

Self-hosted

Run the gateway alongside your existing API, with infrastructure and configuration under your control.

  • Deploy in your infrastructure
  • Control configuration and operational data
  • Control your settlement destination
npx @devlab.group/agent-commerce --help
Explore on GitHub
WITH OUR TEAM

Managed by DEVLAB

A managed deployment and integration service. DEVLAB helps your team deploy, configure and run the gateway around your existing business.

  • Backend integration and configuration
  • Deployment in an agreed environment
  • Operations and support, scoped with your team
Discuss requirements, availability and support with us.
Talk about managed deployment
THE ECOSYSTEM IS MOVING

Agent commerce is
being built now.

Protocols, authorization models and payment rails keep evolving. Absorb those changes in one integration layer instead of rebuilding your backend each time.

SOFTWARE ARCHITECTURE

Every decision,
written down.

See the system boundaries, runtime model, security assumptions and delivery decisions in one place.

The architecture document shows how the Gateway is designed to work before you trust it with transactions.

  • Why every protocol goes through one pipeline
  • The system as C4 diagrams
  • Quality attributes, SLOs and a STRIDE threat model
  • How it deploys, recovers and stays compliant
Read the architecture PDF · v1.3 · 34 pages
AGENT COMMERCE GATEWAY

Build the layer before
the channel arrives.

Start with one real capability you already operate. Keep your backend, pricing and settlement under your control while the agent ecosystem grows around it.

View on GitHub

Architecture and development by DevLab.group