Skip to main content

Unified multi-protocol payment middleware for Python web frameworks

Project description

okxweb3-app-paymentrouter

Dual-protocol payment middleware that routes a single HTTP endpoint to both x402 and MPP clients. The seller writes one route; the router negotiates which protocol the caller speaks and emits the matching challenge/response headers.

Install

pip install okxweb3-app-paymentrouter[fastapi]

What it provides

  • paymentrouter.router — request inspector that detects protocol (x402/mpp) from headers and dispatches to the right adapter.
  • paymentrouter.adapter — pluggable adapters for okxweb3-app-x402 and okxweb3-app-mpp.
  • paymentrouter.fastapi — drop-in FastAPI Depends() integration.

Why

Two payment protocols, one URL. Lets you accept payment from any client without forcing a protocol choice or duplicating endpoints. The challenge response carries both WWW-Authenticate (MPP) and payment-required (x402) headers — the client picks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

okxweb3_app_paymentrouter-0.1.0.tar.gz (146.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

okxweb3_app_paymentrouter-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file okxweb3_app_paymentrouter-0.1.0.tar.gz.

File metadata

  • Download URL: okxweb3_app_paymentrouter-0.1.0.tar.gz
  • Upload date:
  • Size: 146.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for okxweb3_app_paymentrouter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e56feb13b27be379fbab30b7b70a02483e7f5b7c45b9ef7ebd6be60885db6093
MD5 2afa07c92a67ede71c3cc36710dd304e
BLAKE2b-256 f89f28a58e92d65a20b725e0af65ed1f7438d2238cae89cec743030fdc03b0a5

See more details on using hashes here.

File details

Details for the file okxweb3_app_paymentrouter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: okxweb3_app_paymentrouter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for okxweb3_app_paymentrouter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b12623f8b4882443c3e17c6af3795f4e9a944206b5d7efda2425cef393e738
MD5 a80eee0cb9363e713c19d62688c6728d
BLAKE2b-256 961676a34be6cc7e2ec649198426736abf4f542b8f19561ce90ea76b86825cc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page