x402 Payments
on Canton
Agent payments, made institutional.
FTP Tech LLC operates the payment infrastructure that lets an HTTP API charge per request and settle each payment on-ledger in Canton Coin, using the x402 standard. Every payment is a verifiable, non-custodial transfer on Canton MainNet.
What it provides
Four properties define the offering. Each payment is metered per request, settled in Canton Coin, verified on-ledger, and routed through a facilitator that controls no funds.
Charge per HTTP request
Gate any route behind a price using the standard 402 Payment Required flow. A client receives the price, pays, and retries with proof in a single extra round trip.
Settle in Canton Coin
Each payment settles natively in Canton Coin on Canton MainNet. No bridging and no wrapped assets. Amounts are exact 10-decimal Daml Decimal strings.
On-ledger verification
Settlement is an on-ledger transfer confirmed by the Global Synchronizer, not an off-ledger voucher. The resulting updateId is the proof, resolvable on any Scan API.
Non-custodial facilitator
The facilitator verifies and reports settlement but never holds buyer or seller funds. Per-party projection means it sees only the transfer it was asked to verify.
How it works
A payment is one extra round trip layered onto a normal HTTP request. The server prices the call, the client settles on-ledger and retries with proof, and the facilitator confirms settlement before the server delivers.
Request
The client calls the gated route with no payment attached.
402
The resource server answers 402 with its price and a PAYMENT-REQUIRED header describing the exact-canton requirements.
Settle
The client builds and signs the transfer with its own key, settles it on-ledger, and retries the request with proof.
Verify
The facilitator confirms the on-ledger transfer against the server's requirements, the server runs the handler, and returns 200 with the settlement updateId.
The wire format follows upstream x402 v2 carried in base64-encoded JSON headers, specialized into the Canton-native exact-canton scheme. For the full handshake, headers, and error reasons, see the documentation or the live demo.
The building blocks
The offering ships as three components: a facilitator that verifies and settles, a client SDK that pays, and middleware that gates a resource server. Each is independent and conforms to the x402 specification.
Facilitator
A stateless-to-the-merchant service that verifies a payment against the resource server's requirements and reports settlement. A hosted reference facilitator is live over HTTPS; teams can also run their own on their validator. Ships via Docker and source.
facilitator.ftptech.xyzClient SDK
Wraps fetch with a Canton signer. The wrapped fetch detects a 402, builds and signs the payment with the caller's party key, retries, and returns the final response with the settlement header.
@ftptech/x402-canton-clientResource-server middleware
Drop-in middleware for Express and a wrapper for the Next.js App Router. It runs the full handshake, pins every payment to the route's configured requirements, and runs the handler only after settlement succeeds.
@ftptech/x402-canton-express · -next# Charge for an API (resource server)
npm i @ftptech/x402-canton-core @ftptech/x402-canton-express
# Pay for an API (client)
npm i @ftptech/x402-canton-core @ftptech/x402-canton-client- Wire types, header encoding, requirements pinning.
@ftptech/x402-canton-core0.1.0 - Canton ledger and Scan clients, external-party signing.
@ftptech/x402-canton-ledger0.1.0 - Buyer SDK: wrapFetchWithCantonPayment, signers.
@ftptech/x402-canton-client0.1.4 - Express middleware cantonPaymentMiddleware.
@ftptech/x402-canton-express0.1.0 - Next.js wrapper withCantonPayment.
@ftptech/x402-canton-next0.1.0
The facilitator ships via Docker and source, not npm.
Who it is for
The same infrastructure serves the seller, the buyer, and the institution that needs settlement it can audit on the ledger.
API providers
Meter and monetize an HTTP API per request without managing subscriptions, keys, or invoices. Pricing is enforced server-side, per route.
AI-agent builders
Give an autonomous agent the ability to pay for a gated resource and retry, settling each call on-ledger from its own party.
Institutions
Settle agent and machine payments on Canton MainNet with on-ledger finality, per-party privacy, and a non-custodial settlement path that controls no funds.
Evaluating x402 for your institution
FTP Tech LLC runs the hosted facilitator and supports self-hosted deployments on your own validator. Reach out to discuss an integration.
The facilitator never controls buyer or seller funds. It verifies each payment against the resource server’s requirements and reports settlement; the funds move only as an on-ledger transfer the parties authorize themselves.
Settlement is verifiable on the ledger: every paid request resolves to an updateId on Canton MainNet that either party can confirm on any Scan API. Built on the Canton Network and the Canton Token Standard, the integration is open source under Apache-2.0.
Let’s build something
that stays online
Launching a network, need a battle-tested validator, or want a community that actually shows up? Talk to us.