Guides
Configure Seller Resources
Register sellers, resources, payment methods, and onchain defaults.
Seller resources define the paid surface that buyer agents request. A resource should describe the seller, route, allowed payment methods, canonical pricing, and payment-specific configuration.
Typical setup:
- Create a seller.
- Create one or more resources under that seller from the dashboard, API, SDK, or a deploy manifest.
- Configure accepted methods such as
x402,mpp, orevmStablecoin. - Store onchain defaults when using
evmStablecoin. - Use middleware with the returned
sellerIdandresourceId.
Relevant client methods:
const seller = await openpermit.createSeller({
name: 'Example Data API',
});
const resource = await openpermit.createSellerResource({
sellerId: seller.sellerId,
method: 'GET',
pathTemplate: '/paid/data',
acceptedPaymentMethods: ['x402'],
configurationSource: 'api',
pricing: { type: 'fixed', amount: '0.04', asset: 'USDC' },
});Use dynamic pricing when the middleware must calculate the amount from request parameters or seller-side state:
await openpermit.upsertSellerResource('quotes:dynamic', {
sellerId: seller.sellerId,
resourceId: 'quotes:dynamic',
method: 'GET',
pathTemplate: '/v1/quotes/{symbol}',
acceptedPaymentMethods: ['x402'],
configurationSource: 'manifest',
pricing: {
type: 'dynamic',
asset: 'USDC',
minAmount: '0.01',
maxAmount: '0.25',
displayAmount: '0.05',
quoteTtlSeconds: 30,
},
});Dynamic challenges require a runtime quote:
await openpermit.createSellerChallenge({
sellerId: seller.sellerId,
resourceId: 'quotes:dynamic',
paymentMethod: 'x402',
quote: {
amount: '0.08',
quoteId: 'quote_123',
expiresAt: new Date(Date.now() + 30_000).toISOString(),
metadata: { symbol: 'ETH' },
},
});For onchain resources, configure a CAIP-2 chain and payee address so seller challenges do not need to pass those fields on every request.