fix(docs): Round 4 — correct deprecated APIs, field names, and CLI commands#106
fix(docs): Round 4 — correct deprecated APIs, field names, and CLI commands#106
Conversation
Fix 8 documentation issues found during Round 4 evaluation:
- Replace Payments({...}) with Payments.get_instance(PaymentOptions(...)) in MCP Python example
- Replace deprecated facilitator.settle()/verify() with settle_permissions()/verify_permissions()
- Fix query-agents.mdx: reference payment-signature header instead of Authorization
- Fix mcp.mdx: clarify payment token references (not Authorization tokens)
- Fix google-a2a.mdx: use canonical import from payments_py import Payments, PaymentOptions
- Fix CLI index: nvm plans get -> get-plan, nvm x402 get-token -> x402token get-x402-access-token
- Remove non-existent nvm agents list command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes 8 documentation issues related to deprecated APIs, incorrect header names, wrong import patterns, and outdated CLI command references across integration guides, development guides, and CLI reference documentation.
Changes:
- Replace deprecated
facilitator.verify()/facilitator.settle()withverify_permissions()/settle_permissions() - Update Python initialization pattern from
Payments({...})toPayments.get_instance(PaymentOptions(...)) - Consolidate Python imports to canonical pattern:
from payments_py import Payments, PaymentOptions - Correct x402 protocol header references from
Authorizationtopayment-signature - Update CLI commands to match actual command names (e.g.,
nvm plans get→nvm plans get-plan,nvm x402 get-token→nvm x402token get-x402-access-token) - Remove
nvm agents listcommand from CLI quick reference - Update Claude Code skill installation instructions
- Add documentation guidelines about not modifying API reference docs directly
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/products/x402-facilitator/payment-models.mdx | Updates Python dynamic pricing example to use settle_permissions() with correct parameters |
| docs/integrations/nevermined-x402-ap2.mdx | Updates facilitator verification and settlement to use new API methods |
| docs/integrations/mcp.mdx | Fixes Python initialization pattern and clarifies payment token references (not Authorization tokens) |
| docs/integrations/google-a2a.mdx | Consolidates Python imports to canonical pattern |
| docs/integrate/patterns/charge-credits.mdx | Updates variable credit charging example to use settle_permissions() |
| docs/development-guide/query-agents.mdx | Corrects header name from Authorization to payment-signature for x402 protocol |
| docs/development-guide/build-using-nvm-skill.mdx | Replaces simple claude /install-skill command with manual git sparse-checkout instructions |
| docs/api-reference/cli/index.md | Updates CLI command names and removes nvm agents list from quick reference |
| CLAUDE.md | Adds notes about API reference docs being sourced from external repos |
| payments.facilitator.settle_permissions( | ||
| payment_required=payment_required, | ||
| x402_access_token=access_token, | ||
| ) |
There was a problem hiding this comment.
The settle_permissions call is missing the required max_amount parameter. According to the x402 protocol documentation and the Nevermined Payments API, max_amount is a required parameter that specifies how many credits to burn during settlement. Add max_amount=str(credits_used) to the function call.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Summary
Payments({...})withPayments.get_instance(PaymentOptions(...))in MCP Python examplefacilitator.settle()/facilitator.verify()withsettle_permissions()/verify_permissions()query-agents.mdx: referencepayment-signatureheader instead ofAuthorizationheadermcp.mdx: clarify payment token references (notAuthorizationtokens)google-a2a.mdx: use canonical importfrom payments_py import Payments, PaymentOptionsnvm plans get→get-plan,nvm x402 get-token→nvm x402token get-x402-access-tokennvm agents listcommandTest plan
facilitator.verify(,facilitator.settle(,Payments({payments/cli/src/commands/mintlify buildto validate docs🤖 Generated with Claude Code