Skip to content

docs: add auto-order guide for x402 flow#154

Open
clriesco wants to merge 6 commits into
mainfrom
docs/auto-order-x402
Open

docs: add auto-order guide for x402 flow#154
clriesco wants to merge 6 commits into
mainfrom
docs/auto-order-x402

Conversation

@clriesco
Copy link
Copy Markdown
Contributor

@clriesco clriesco commented Apr 22, 2026

Summary

  • Adds a new dedicated page docs/integrate/patterns/auto-order.mdx documenting the auto-order behavior in the x402 flow: when get_x402_access_token is called with a delegation and the subscriber has no credits, the system automatically purchases credits for the plan — no manual order_plan() + balance check needed
  • Replaces the thin Auto-Ordering section in stablecoin-payments.mdx with a link to the new canonical guide (avoids duplication)
  • Adds Tips linking to the guide in the main quickstart, Python quickstart, TypeScript quickstart, and nevermined-x402.mdx
  • Extends the fiat-payments note to clarify auto-order is built into card delegations
  • Updates skills/nevermined-payments/references/client-integration.md with correct current SDK patterns

Context

Addresses the documentation gap raised in nevermined-io/payments-py#164: users were writing manual balance-check loops because the auto-order behavior was undocumented.

Note: orderLimit mentioned in the issue does not exist in the current SDK versions. The page documents the actual current behavior using DelegationConfig with spendingLimitCents and durationSecs, both verified against the live SDK source.

clriesco and others added 6 commits October 15, 2025 11:35
Documents the auto-order behavior in the x402 payment flow: when
get_x402_access_token is called with a delegation and the subscriber
has no credits, the system automatically purchases credits for the plan.

- Add docs/integrate/patterns/auto-order.mdx as the canonical guide
- Add auto-order to docs.json navigation (Payment Patterns group)
- Replace stablecoin-payments Auto-Ordering section with link to guide
- Add Tip to nevermined-x402.mdx subscriber flow linking to guide
- Add Tip to main quickstart and integrate quickstarts (python, typescript)
- Extend fiat-payments note to mention built-in auto-order for card delegations
- Update skills/client-integration.md with correct current SDK patterns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@clriesco clriesco requested a review from a team as a code owner April 22, 2026 13:24
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 22, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Nevermined 🟢 Ready View Preview Apr 22, 2026, 1:29 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Member

@aaitor aaitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adapt to "top-up" language instead of "auto-order" please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants