Solution brief · MPP

Let agents pay for your API with MPP

Use the Machine Payments Protocol to charge for API calls, tools, or content with your Phoenixd node. Our MPP SDK connects your backend's mppx handlers to your node for Lightning payments.

An agent calling a paid API needs a way to discover the price, pay, and receive the result. MPP gives your service a payment flow that software clients can follow through the request itself.

A practical approach

Configure phoenixd-mpp-sdk with your node's URL and limited-access password. Register it as a receiving method in mppx to create payment challenges, verify proofs and attach receipts.

Connect your node. Copy your node's HTTPS URL from the dashboard and configure its limited-access Phoenixd password in your backend.

Create a challenge. Install phoenixd-mpp-sdk and mppx, generate an application signing secret and set the price. Save the issued challenge before returning HTTP 402.

Return the paid response. Verify the paid retry and redeem the saved challenge once in your database. Serve the result with the receipt supplied by mppx.

Save issued challenges and redeem payments once using your application's database. Deliver the result after verification and redemption succeed, and record delivery for recovery.

Read the setup guide

Ready to explore mpp with your Phoenixd node?

Get Started