By default, subscribers purchase a plan first and then generate an access token. Auto-order removes the manual purchase step: when you callDocumentation Index
Fetch the complete documentation index at: https://neverminedag-docs-auto-order-x402.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
getX402AccessToken / get_x402_access_token with a delegation and the subscriber has no credits, the system purchases credits for the plan automatically before returning the token.
Manual flow vs. auto-order
- TypeScript
- Python
The code is identical — the difference is that with a delegation in place you can skip the explicit
order_plan / orderPlan call. If the subscriber already has credits the token is returned immediately; if not, the purchase happens first.Setting up the delegation
The delegation authorizes the system to spend on the subscriber’s behalf. The two required fields when creating a new delegation are:| Field | Description |
|---|---|
spendingLimitCents | Total spending cap for this delegation’s lifetime, in cents. 10000 = $100. |
durationSecs | How long the delegation is valid in seconds. 604800 = 7 days. |
- TypeScript
- Python
Fiat plans (nvm:card-delegation)
Auto-order works the same way for card-delegation plans. If the subscriber has no credits, the system creates a Stripe charge automatically when get_x402_access_token is called. The spendingLimitCents in the delegation controls the total charge ceiling.
See Fiat Payments and Nevermined Pay for how to enroll a card.
When auto-order stops
| Condition | What happens |
|---|---|
Delegation spendingLimitCents exhausted | Purchase is rejected. Token generation fails with a payment error. |
Delegation expired (durationSecs elapsed) | Delegation is invalid. Token generation fails. |
| Subscriber wallet has insufficient token balance (crypto) | On-chain purchase fails. Token generation fails. |
Next steps
Stablecoin Payments
Understand the crypto payment model and how delegations work on-chain
Fiat Payments
Accept cards via Stripe or Visa with per-request auto-charging
Nevermined x402
Deep dive into the x402 protocol, session keys, and settlement flow
A2A Monetization
Build autonomous agent pipelines with built-in payment rails