Metadata-Version: 2.4
Name: xrpl-x402-facilitator
Version: 0.2.0
Summary: FastAPI facilitator service for XRPL-backed x402 payments
Project-URL: Homepage, https://github.com/lgcarrier/xrpl-x402-stack
Project-URL: Documentation, https://lgcarrier.github.io/xrpl-x402-stack/packages/facilitator/
Project-URL: Repository, https://github.com/lgcarrier/xrpl-x402-stack
Project-URL: Issues, https://github.com/lgcarrier/xrpl-x402-stack/issues
Project-URL: Changelog, https://github.com/lgcarrier/xrpl-x402-stack/blob/main/CHANGELOG.md
Author-email: Louis-Guillaume Carrier-Bedard <lgcarrier@gmail.com>
License-Expression: MIT
Keywords: facilitator,fastapi,payments,x402,xrpl
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: fastapi==0.115.0
Requires-Dist: pydantic-settings==2.6.1
Requires-Dist: python-dotenv<2,>=1.0.1
Requires-Dist: redis==5.2.1
Requires-Dist: slowapi==0.1.9
Requires-Dist: structlog==24.4.0
Requires-Dist: uvicorn<1,>=0.30.6
Requires-Dist: x402[extensions]==2.21.0
Requires-Dist: xrpl-py==4.5.0
Requires-Dist: xrpl-x402-core==0.2.0
Description-Content-Type: text/markdown

# xrpl-x402-facilitator

Non-custodial x402 v2 facilitator for exact XRPL payments.

```bash
export MY_DESTINATION_ADDRESS=rMerchant
export FACILITATOR_BEARER_TOKEN=replace-me
export REDIS_URL=redis://127.0.0.1:6379/0
export NETWORK_ID=xrpl:1
xrpl-x402-facilitator
```

The service exposes `/supported`, `/verify`, `/settle`,
`/discovery/resources`, and `/discovery/search`. Protocol-valid verification or
settlement failures return HTTP 200 with `isValid: false` or `success: false`;
malformed/auth failures use 4xx and infrastructure failures use 5xx.

Verification enforces signature authorization, sequence/ticket state, ledger
expiry, fee cap, destination, asset/issuer/amount, invoice, tag, NetworkID,
forbidden fields, simulation or targeted balance checks, and exact accepted
requirements.

Settlement succeeds only for validated `tesSUCCESS`. Redis atomically reserves
the canonical signed transaction hash and retains uncertain submissions until
ledger expiry. Identical retries reconcile without rebroadcasting.

`SETTLEMENT_MODE` was removed; configuring it fails startup.
