Instantly add crypto payments to any website or API using the x402 protocol.
- β‘ Plug & play β add x402 payments to existing websites & APIs in minutes
- π Fully x402 compliant β built on the Coinbase standard
- π οΈ Easy to deploy & configure β no complex setup
- π Ultra-high performance asynchronous HTTP server β scales to 1M+ concurrent connections
- π Multi-chain support β works with both Base and SKALE
- πΈ Flexible payment models β subscriptions, pay-per-request, metered access
- π Deep logging & monitoring β full visibility of payment traffic
- π― Open source & free β community-driven
Think of MachinePay as a toll booth for the internet.
Instead of reaching a website directly, requests first pass through the proxy:
- π You send a request β try to access a resource
- π¦ MachinePay proxy intercepts β checks if payment is included
- π³ Payment verified β confirmed via the x402 protocol
- π‘ MachinePay proxy forwards request β to the real website
- π₯οΈ Website responds β returns content
- π¬ MachinePay proxy delivers to you β completing the paid access loop
β Result: Websites instantly monetize access while staying secure and compliant.
flowchart LR
subgraph External_World["External Users & AI Agents"]
U1["Consumers"]
A1["AI Agents"]
end
%% Corporate Network 1
subgraph Corporate_Network["Corporate Network 1"]
direction TB
MP["MachinePay x402 payment gateway"]
AI1["AI Services"]
AI2["Products"]
AI3["Data"]
HU1["Employees"]
HA1["AI Agents"]
end
%% Corporate Network 2
subgraph Corporate_Network_2["Corporate Network 2"]
direction TB
MP2["MachinePay x402 payment gateway"]
AI1B["AI Services"]
AI2B["Products"]
AI3B["Data"]
HU2["Employees"]
HA2["AI Agents"]
end
%% External access to Network 1
U1 -->|Requests / Payments via x402| MP
A1 -->|Autonomous Access via x402| MP
%% Authorized access (Network 1)
MP -->|Authorized Access| AI1
MP -->|Authorized Access| AI2
MP -->|Authorized Access| AI3
%% Internal users (Network 1)
HU1 -->|Internal Requests / Payments via x402| MP
HA1 -->|Internal Autonomous Access via x402| MP
%% Internal users (Network 2)
HU2 -->|Internal Requests / Payments via x402| MP2
HA2 -->|Internal Autonomous Access via x402| MP2
%% Authorized access (Network 2)
MP2 -->|Authorized Access| AI1B
MP2 -->|Authorized Access| AI2B
MP2 -->|Authorized Access| AI3B
%% Aggregated cross-network paid resource exchange (bidirectional)
MP <-->|Cross-Network Paid Resource Access| MP2
%% Styling
classDef users fill:#4caf50,stroke:#1b5e20,color:#ffffff,font-weight:600;
classDef agents fill:#1976d2,stroke:#0d47a1,color:#ffffff,font-weight:600;
classDef gateway fill:#ff9800,stroke:#e65100,color:#000000,font-weight:600;
classDef services fill:#9c27b0,stroke:#4a148c,color:#ffffff,font-weight:600;
classDef docs fill:#3f51b5,stroke:#1a237e,color:#ffffff,font-weight:600;
classDef streams fill:#009688,stroke:#004d40,color:#ffffff,font-weight:600;
U1:::users
A1:::agents
HU1:::users
HA1:::agents
HU2:::users
HA2:::agents
MP:::gateway
MP2:::gateway
AI1:::services
AI2:::docs
AI3:::streams
AI1B:::services
AI2B:::docs
AI3B:::streams
style Corporate_Network fill:#e3f2fd,stroke:#90caf9,color:#0d47a1;
style Corporate_Network_2 fill:#fce4ec,stroke:#f06292,color:#880e4f;
style External_World fill:#f1f8e9,stroke:#c5e1a5,color:#2e7d32;
%% Link styling (external + aggregated cross-network)
linkStyle 0 stroke:#4caf50,color:#4caf50,stroke-width:2px;
linkStyle 1 stroke:#1976d2,color:#1976d2,stroke-width:2px;
%% Cross-network edge index (after preceding edges) is 12
linkStyle 12 stroke:#ff9800,color:#ff9800,stroke-width:3px,stroke-dasharray:4 2;
# Clone with dependencies
git clone --recursive https://github.com/skalenetwork/machinepay.git
cd machinepay
# Bootstrap vcpkg
./external/vcpkg/bootstrap-vcpkg.sh
./external/vcpkg/vcpkg install
# Build
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_FEATURE_FLAGS=manifests -DVCPKG_TARGET_TRIPLET=x64-linux
cmake --build build -j