Skip to main content

xrpl-x402-payer

CLI, HTTP proxy, and MCP payer for canonical XRPL x402 v2 resources.

xrpl-x402 pay https://merchant.example/premium \
  --asset XRP --max-spend 1000

Without explicit asset options, the upstream spend policy accepts recognized pegged assets only and caps each payment at USD 1. XRP, USDC, and custom IOUs require explicit issuer-aware XRPLAssetSpendLimit entries and caps.

Receipts persist the standard SettleResponse together with immutable accepted requirements. Signed payloads and payment identifiers are kept only in a locked attempt sidecar next to the receipt JSONL. The sidecar is atomically replaced before a paid HTTP request or MCP tool call is dispatched. Matching callers share one per-fingerprint claim, so concurrent processes reuse the exact payload. settlement_pending is stored as pending and never counted as paid; paid attempt payloads are pruned by subsequent journal activity after a short concurrent-caller reuse window.

Install xrpl-x402-payer[mcp] and run xrpl-x402 mcp for the local payer tool service. Direct MCP clients should wrap a raw initialized MCP session with wrap_mcp_client_with_xrpl_payment(..., recovery_scope=...). The required scope must be a stable, non-secret label for the endpoint and authenticated principal, for example https://mcp.example/sse|principal:user-42; only its SHA-256 digest is persisted. Never put a bearer token, API key, cookie, or wallet seed in the scope.

paid = wrap_mcp_client_with_xrpl_payment(
    raw_session,
    signer,
    recovery_scope="https://mcp.example/sse|principal:user-42",
)
result = await paid.call_tool("generate_report", {"topic": "XRPL"})

The upstream create_x402_mcp_client re-export remains available as a raw convenience, but it does not use this package's local receipt/attempt journal and therefore cannot provide the same crash or cross-process recovery guarantees.

Metadata

Release files for xrpl-x402-payer 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xrpl-x402-payer 0.2.0
File Size Uploaded Provenance Actions
xrpl_x402_payer-0.2.0.tar.gz 16.8 kB With provenance Details for xrpl_x402_payer-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xrpl-x402-payer 0.2.0
File Interpreter ABI Platform Actions
xrpl_x402_payer-0.2.0-py3-none-any.whl Python 3 none any Details for xrpl_x402_payer-0.2.0-py3-none-any.whl

Total release size: 38.4 kB

Release files / xrpl_x402_payer-0.2.0.tar.gz

Download URL xrpl_x402_payer-0.2.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c6ff9050901d02dc2ab22e29e31868d712f7dbd464a75bb7298d260a982b00e6
BLAKE2b-256 checksum
How to use checksums
6810a70c84b617f8d2f5ecea252dbe0da9b98ef095147c3b956513848a04546c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / xrpl_x402_payer-0.2.0-py3-none-any.whl

Download URL xrpl_x402_payer-0.2.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0255d2c2d44daee967f510076a46c17e004d641a0d743405c39f8f00ae40fd6d
BLAKE2b-256 checksum
How to use checksums
b75c152fef11932f2bcba1b50fc10fffd8149535afd5213887b27f9224d1b195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Security for xrpl-x402-payer 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xrpl_x402_payer-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page