Skip to content

Comments

Add missing max_amount parameter to settle_permissions in AP2 integration docs#107

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/sub-pr-106
Draft

Add missing max_amount parameter to settle_permissions in AP2 integration docs#107
Copilot wants to merge 4 commits intomainfrom
copilot/sub-pr-106

Conversation

Copy link

Copilot AI commented Feb 12, 2026

The settle_permissions call in the AP2/A2A integration example was missing the required max_amount parameter, which would cause runtime errors.

Changes:

  • Added max_amount="2" to match the NVM_PAYMENT_AMOUNT config value shown in the same document
  • Added clarifying comment linking the parameter to the demo configuration

Before:

payments.facilitator.settle_permissions(
    payment_required=payment_required,
    x402_access_token=access_token,
)

After:

payments.facilitator.settle_permissions(
    payment_required=payment_required,
    x402_access_token=access_token,
    max_amount="2"  # Credits to burn (matches NVM_PAYMENT_AMOUNT from config)
)

This aligns with the pattern used throughout the rest of the Python SDK documentation where max_amount is a required string parameter specifying credits to burn during settlement.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

aaitor and others added 3 commits February 12, 2026 16:05
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>
Co-authored-by: aaitor <1726644+aaitor@users.noreply.github.com>
Base automatically changed from fix/round4-docs to main February 12, 2026 15:41
Copilot AI changed the title [WIP] Fix deprecated APIs and CLI commands in documentation Add missing max_amount parameter to settle_permissions in AP2 integration docs Feb 12, 2026
Copilot AI requested a review from aaitor February 12, 2026 15:42
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