On this page
Paid Functions with x402
Write an API. Set a price. Publish it. x402-compatible agents can pay and call it.
Choose Public, API Key, or Site Members for access, then optionally enable x402 payments. x402 is a monetization fallback, independent of authentication. Valid API keys and Site Members call normally without payment; external callers can use x402. Public + x402 requires payment on positive-priced routes. $0 routes are genuinely free: no HTTP 402, payment proof, or settlement.
Create a paid API
- Create a normal MiniUp Function and write its request handler.
- In API → Access, choose your authentication setting. Under x402 Monetization, select Enable x402 payments.
- Enter the Price per successful request (USD), with the default $0.001, an amount from $0.001 to $1.00, or $0 for free requests. Use a decimal value with up to six decimal places, such as
0.01. - Enter a valid Payout wallet that you control and that can receive the payment described in your endpoint’s payment requirement.
- Optionally select List in MiniUp Function Explorer.
- Independently, optionally select Enable external x402 discovery.
- Select Save access. Add a clear description, tags, documentation, and safe request and response examples under Documentation.
- Use Test to preview, then Save & Publish to publish your handler.
- Copy the endpoint and call it with an x402-compatible client.
The endpoint follows the same stable Function URL pattern. Changing access on an already published Function updates its live access requirement when you save. Verify the price and recipient before sharing the endpoint.
Optional route pricing
In API, expand Advanced route pricing to override the default for specific methods and paths. For example:
| Method | Path | Price |
|---|---|---|
| GET | /summary | $0 (free) |
| POST | /items | $0.005 |
| POST | /items/:id/adjust | $0.002 |
Paths begin after your Function slug. /items/abc123/adjust matches /items/:id/adjust. GET and POST are different routes. A literal segment takes priority over a parameter at the first differing segment. Trailing slashes match the same route. Query strings do not affect pricing.
Routes without an override inherit the default. Remove an override and select Save access to restore that behavior. Saving access updates pricing for an already live Function. Setting either the default or an override to $0 allows calls without a wallet or payment. Free requests still use the normal Function request allowance.
View usage
The Functions page shows Calls this month and Last call. Search by name, slug, or endpoint, filter by status, access, or listing, and sort by activity. Open Manage → Usage for total recorded calls, paid calls, revenue, and the last paid call.
Per-Function tracking starts on the date shown in the dashboard. Earlier account usage cannot be assigned to individual Functions. Calls count production requests admitted to run, including requests that return errors; previews are excluded. Paid calls count only completed positive payments for successful requests. Revenue keeps the actual amount paid, even after prices change. Free requests do not add paid calls or revenue.
Call a paid Function
An unpaid request to a positive-price route receives HTTP 402 with a payment requirement. An x402-compatible client can satisfy that requirement and call the Function. An ordinary curl or browser fetch request does not automatically make a payment. With API Key access, a valid Function API key bypasses payment. With Site Members access, verified members bypass payment and keep their normal identity; external payment callers do not receive a member identity.
Payment is verified before the Function runs. Successful payments settle directly to the configured payout wallet; MiniUp does not hold a creator balance or require withdrawals. The caller receives the Function’s response with payment confirmation headers. Functions can return text, JSON, or other supported response content.
Understand successful and failed requests
Responses with a 2xx or 3xx status are eligible for settlement. Responses with a 4xx or 5xx status, thrown errors, runtime failures, and quota rejections are not settled. On positive-price routes, an invalid or missing payment cannot execute the Function. Paid calls still use the owner’s normal Function request allowance and remain subject to request limits.
A Function may perform an external operation before it fails; a failed request does not undo that operation. If settlement cannot be confirmed, MiniUp returns an error rather than a payment success. Do not repeat a pending operation with a new payment. Reuse the original payment and request when retrying; changed input or payment settings can cause a conflict.
Preview without payment
Preview bypasses payment and does not create an x402 transaction. It uses your authenticated owner preview access and creates no paid receipt. Preview may still call external services, so use test data for operations with side effects. Unauthenticated production calls require payment only when the matching route price is greater than $0.
Set prices and documentation for each route
Open Advanced route pricing to review routes detected from your saved source. MiniUp scans when you create, save, publish, or enable payments. Rescan routes scans the saved draft again. Detection is best effort: review the method and path, and add a manual route when needed.
Detected routes use the default price until you choose Override. For example, with a $0.05 default, you can price POST /extract at $0.005 while POST /company stays at $0.05. Changing the default to $0.08 updates /company; /extract stays at $0.005. Return to default removes the explicit price. Save access & monetization to apply your changes.
MiniUp may suggest GET /, /health, /status, and /ping as free routes. Apply suggestions selects $0 overrides; nothing becomes free until you apply and save them. An override for a route missing from a later scan stays visible as No longer detected until you remove it.
Under Public documentation, edit each route’s description, JSON request and response examples, and input/output schemas. These are public descriptions of your API, so never include credentials. Saving or rescanning source preserves your edits. Function-wide documentation remains the overview.
Public docs and Function Explorer show effective route prices. With external discovery enabled, a payment requirement uses the documentation matching the requested method and path, so two POST routes can describe different inputs. Older Functions without route documentation continue using their Function-wide examples.
Choose discovery separately
These settings are independent:
| Setting | Effect |
|---|---|
| Enable x402 payments | Applies the default or matching route price to callers using the payment fallback. |
| List in MiniUp Function Explorer | Shows the Function’s description, methods, endpoint, tags, and exact price in MiniUp’s directory. |
| Enable external x402 discovery | Adds compatible discovery metadata to the unpaid payment requirement. |
A paid API can be unlisted, listed only in MiniUp, or eligible for compatible external x402 discovery. Enabling paid access does not automatically enable either listing option. An unlisted paid Function can still share its documentation link.
For external discovery, describe the API and keep its example request and response accurate. For GET requests, use an object with example query parameters. For JSON request bodies, use an example object. Examples help describe input fields; they do not replace validation in your handler.
After publishing with external discovery enabled, select Validate external discovery. A passed result means the endpoint and its discovery metadata passed the current eligibility check. It does not confirm listing on Coinbase, Agentic.Market, or another directory. If the result needs attention, check the published endpoint, description, and examples and try again.
Related guides
- Choose Function access
- Test and publish a Function
- Document and share a Function API
- Function Secrets
Check Coinbase Bazaar manually
These are four independent settings or observations:
- Enable x402 payments adds payment fallback to the selected access setting.
- List in MiniUp Function Explorer controls MiniUp’s own directory listing.
- Enable external x402 discovery publishes compatible discovery metadata. Validate external discovery checks protocol eligibility, not indexing.
- Check Coinbase Bazaar looks for the exact Function endpoint in Coinbase’s catalog. Another Function using the same payout wallet does not count.
Enable external discovery, publish, and complete a compatible successful paid request. External indexing may take time. Press Check Coinbase Bazaar when ready; listing and timing are not guaranteed. Coinbase describes this process in its discovery guide .
MiniUp never continuously queries Coinbase. Opening or reloading the editor only displays the last saved observation and its Last checked time. Check again makes a new manual lookup.
Indexed means Coinbase returned this exact endpoint. Not found yet is a neutral result: allow time after a recent payment and check again. Check unavailable means the lookup could not establish a reliable result; it does not mean the resource is absent. Configuration changes make the previous observation historical. Disabling discovery does not remove an external listing.
Coinbase also makes discovery available to people browsing Agentic.Market. MiniUp does not independently verify that marketplace. Coinbase’s current discovery response does not provide a public API detail-page link, so MiniUp shows the observed status without inventing an external link.
When Bazaar reports Indexed, select View Bazaar details to inspect the saved resource information inside MiniUp. The viewer uses a modal on desktop and a bottom sheet on mobile. It shows available service and payment details, copy actions, and a collapsed Bazaar extension section. Amounts are shown in the asset’s base units.
Details come from the latest manual check. Opening, closing, or reopening them makes no Coinbase request. Check again refreshes the saved observation and the open viewer. Older observations may have no detailed metadata until you run another manual check.
Usage and payments
Normal Function Usage counts authorized production executions across Public, API Key, Site Members, and x402 access, including free routes and executions that return errors. Payment challenges and rejected payments do not run the Function and do not count. A saved response replay does not count again. Preview bypasses production usage.
Paid calls and revenue remain separate: they count successful settled payments. A free execution adds one normal call and no paid call or revenue. Failed Function responses are not settled.
x402 · Paid Functions · price · payout wallet · HTTP 402 · discovery