exact: a fixed price
- The service asks for a fixed amount.
- The buyer signs exactly that amount.
- Periplo verifies it and settles that same amount.
For requests with a known price, like one API call at a flat rate.
x402 · Stellar testnet
Periplo is an open-source, non-custodial x402 facilitator: in x402, the facilitator is the service that verifies and sends the payment the buyer signs. With upto, the buyer signs a spending ceiling once and only the real usage settles; the contract enforces the ceiling and its balance is zero after every settlement.
We're proposing upto for Stellar inside the x402 standard, so any facilitator can use it the same way (open PR, x402-foundation/x402#3098)
Testnet only. Periplo does not operate on mainnet yet.
01
A service answers HTTP 402 with its price. The buyer signs a payment; Periplo checks it and submits it to Stellar. Two schemes cover two ways of charging.
exact: a fixed priceFor requests with a known price, like one API call at a flat rate.
upto: pay for real usageFor usage you only know afterwards: tokens generated, seconds of access, rows returned.
The buyer signs each payment with their own key. The facilitator only pays network fees, refuses to start with a key that can move user funds, and is never the source or signer of a buyer's payment.
Read the threat modelResources settled through Periplo can be cataloged so agents can find them by searching, not by knowing the URL in advance.
upto settles against the UptoSettlement contract on testnet. The public facilitator only advertises the schemes listed in its live status below.
02
Real stellar:testnet transactions, each one linked to the block explorer so you can check it yourself.
Periplo's first full pipeline: a payment signed with @x402/stellar, verified and settled by Periplo's facilitator core.
View transaction: 83d2aa3b60…d89f33Partial settlement: the buyer signed a 0.1 PTEST ceiling and the facilitator settled 0.04 PTEST.
View transaction: cc46374e34…c5d218Zero settlement: a 0.05 PTEST ceiling settled at 0, the full ceiling returned to the buyer; a replay with the same nonce was rejected.
View transaction: 2138c0418a…03d358Periplo's first payment between an external seller and an independent buyer, neither of them this project, in testnet USDC.
View transaction: 4befe51d2c…7904fdInteroperability: a payment built with the same client code, verified and settled through x402.org's independent reference facilitator.
View transaction: 43bd169873…dc7c8fFour concurrent settlements in the same ledger, each from a different account of the channel-account pool.
View transaction: 33a6791890…0b3764Metered API: a 0.1 PTEST ceiling for up to 20 rows; 10 rows were returned, so 0.05 PTEST was settled and the rest refunded.
View transaction: cf33b51350…533823The same contract, in testnet USDC: a 0.10 USDC ceiling and 0.05 USDC settled, the rest refunded. The asset travels inside each signed authorization, so the contract was not redeployed.
View transaction: d554adfb8f…c5cafb06
periplo is the npm package behind these examples: sign an upto ceiling as a buyer, or advertise one and settle real usage as a seller.
npm i periplo
import { createUptoStellarPayer, payAndFetch } from "periplo";
const payer = createUptoStellarPayer(buyerSecret, "stellar:testnet", {
facilitatorBaseUrl: "https://periplo-testnet.fly.dev",
maxSpendPerAuthorization: 1_000_000n, // 0.1 USDC, 7 decimals
});
const response = await payAndFetch(resourceUrl, payer);03
Read from the public deployment's /supported and /status endpoints when you open this page. periplo-testnet.fly.dev
Contacting the facilitator…
04
Bugs Periplo found and fixes it proposed in the libraries it builds on. The state of each one comes from the GitHub API, not from memory.
State checked against the GitHub API on .
05
All of Periplo is public under Apache-2.0: the facilitator, the discovery catalog, the contracts and this site.