Agents are a new buyer of your API, and they don’t onboard the way humans do. They don’t sit at a browser, fill out a Stripe Checkout, or remember to top up a credit balance. Today they either stall at your paywall or hardcode a human’s API key. Nevermined turns that failure mode into revenue with a small server-side integration. Agents holding a delegated card mint an x402 access token, send it to your endpoint, and you provision or top up access in response. You verify and settle through Nevermined’s x402 facilitator; the buyer’s card is charged on Stripe or Visa Intelligent Commerce rails, depending on how it was enrolled.Documentation Index
Fetch the complete documentation index at: https://docs.nevermined.app/llms.txt
Use this file to discover all available pages before exploring further.
Featured provider
Exa is the live reference. Agents pay Exa $7 via a Nevermined-delegated card and receive an Exa API key with $7 of credits. When the key runs out, the agent tops up through the same endpoint. Same key, more credits, no human touched it.- Exa integration mirror: exa.ai/docs/integrations/nevermined.md
What you build, in five steps
Create a pay-as-you-go plan
On the Nevermined App, choose pay-as-you-go pricing (one charge per purchase), set your price (e.g. $7), and grant 1 credit per purchase. The 1-credit grant means each call to your purchase endpoint maps cleanly to one card charge of your plan price. See Manage Plans.
Expose one endpoint
Accept a
payment-signature header on a new route or an existing one. Existing customers keep their flow unchanged.Verify with the facilitator
Call
payments.facilitator.verifyPermissions(...). Missing or invalid token returns 402 Payment Required with the payment requirements body.Run your business logic
Provision an API key, top up credits, unlock a resource, whatever your product is.
Server-side handler
Your handler does three things: read thepayment-signature header, verify the token with the Nevermined facilitator, and settle after running your business logic. Examples below for TypeScript, Python, and raw HTTP.
- TypeScript
- Python
- HTTP (any language)
The handlers above set the
payment-required (on 402) and payment-response
(on 200) response headers per the
card-delegation spec §4.3. The optional
middleware below handles this for you automatically.Optional: middleware (recommended)
If you’re on Express or FastAPI, the SDK ships a payment middleware that handles the verify/settle dance and the spec-correct response headers for you. One config line gates your endpoint, your handler stays focused on business logic.- TypeScript (Express)
- Python (FastAPI)
payment-signature header, calls verifyPermissions, runs your handler, then calls settlePermissions and attaches the payment-response header before sending the response. See the Express and FastAPI integration pages for middleware options (dynamic credits, hooks, custom error handlers).
Two things to remember
402 on your regular endpoints. When the agent’s credits run dry, return
402 with a top-up hint on the resource endpoints (not just the purchase
endpoint). The agent loops back, mints a fresh token, and pays again on the
same purchase route.Vend-the-key vs full metering
Two patterns are supported. Pick whichever matches how you already meter usage.Vend-the-key
A Nevermined purchase returns a credential (e.g. an API key with $X of
credits). You meter ongoing usage internally with your existing
infrastructure. Exa works this way. Best when you already have per-key
billing.
Full metering
Nevermined settles each underlying API call. Best when you don’t have
internal billing infra or prefer per-request settlement. Use the
validate-requests and
charge-credits patterns directly
on your resource endpoints.
Make it agent-discoverable
Agents don’t read your HTML. They read yourllms.txt and the .md mirrors next to your docs pages. Two small additions get you listed.
1. Add a line to your llms.txt
Drop an entry into your root llms.txt (under an ## Integrations heading or similar):
2. Publish an integration .md mirror
Put a markdown file at /integrations/nevermined.md (or wherever your integration docs live). Cover the plan ID, the purchase endpoint, the response shapes, and the agent-side snippet. A starter skeleton with placeholders is hosted here:
- api-provider-template.md - copy and fill in
- Live example: Exa’s
/docs/integrations/nevermined.md
Agent-side call (for context)
What the agent runs to mint a token and call your endpoint:- TypeScript
- Python
Why Nevermined vs DIY
The DIY way
- Stripe Checkout needs a browser and a human, useless mid-task
- Roll your own x402 means months building card enrollment, delegation lifecycle, KYC, dispute handling, and a buyer-side SDK
- You own PCI scope on the buyer side
The Nevermined way
- Drop in
verifyPermissionsandsettlePermissions - Card acquisition via Stripe or Visa Intelligent Commerce, payouts via Stripe Connect today (PayPal Braintree coming soon)
- PCI scope stays with Nevermined and the PSP
- Standard x402 protocol, no proprietary buyer SDK
FAQ
When do I get paid out?
When do I get paid out?
Settled funds are paid out via your connected Stripe Connect account on
Stripe’s standard schedule. PayPal Braintree as a second payout rail is
coming soon.
Do my existing customers see any change?
Do my existing customers see any change?
No. Your existing API and billing surface stay as-is. Agent-payable signup
is a parallel path you opt into with a new endpoint.
Can I keep my current pricing model?
Can I keep my current pricing model?
Yes. Per-call, top-ups, and credit bundles map cleanly to Nevermined plans.
For subscriptions, talk to us, recurring billing is supported case-by-case.
What card rails are supported?
What card rails are supported?
Stripe (for direct card enrollment) and
Visa Intelligent Commerce (VIC). The x402 token your endpoint verifies is
the same regardless of rail; Nevermined handles the rail-specific details.
See the card-delegation spec for the
underlying flow.
Is there a sandbox?
Is there a sandbox?
Yes, on the Stripe rail. Integrate, run end-to-end test transactions, and
validate your handler before flipping to live. VIC doesn’t have a sandbox
today, so VIC delegations are tested with small amounts in live.
What languages and frameworks are supported?
What languages and frameworks are supported?
TypeScript and Python SDKs ship today, with framework helpers for
Express.js and
FastAPI. The facilitator API
is plain HTTP, so any language can call verify/settle directly. See the
Generic HTTP guide.
Do I need a Stripe account?
Do I need a Stripe account?
Today, yes: you connect a Stripe Connect account as your payout
destination. PayPal Braintree as a second payout option is coming soon
(see Braintree onboarding
for the planned flow). Nevermined handles card acquisition and PCI scope
on the buyer side; you just bring your payout destination.
How are chargebacks and refunds handled?
How are chargebacks and refunds handled?
On Stripe destination charges, Nevermined is the merchant of record:
Stripe routes disputes and refunds through Nevermined, and we surface the
chargeback or charge reference so you can match it to specific agent
transactions.
Multi-currency?
Multi-currency?
Stripe Connect handles currency conversion to your destination account,
so non-USD payouts work today. VIC currently supports predominantly
US-based issuers.
Related
- x402 Card Delegation Spec - full verify/settle protocol with JWT claims, error codes, and the four-phase flow
- x402 Facilitator: How it works
- end-to-end walk-through of the facilitator API
- Validate Requests and Charge Credits - copy-paste patterns for the verify and settle steps
- Manage Plans - set up a pay-as-you-go plan
- Nevermined Pay overview - how buyers enroll cards and create delegations