Skip to main content

Add MPP to an endpoint

payMiddleware generates MPP challenges by default as part of dual-protocol. No additional configuration is needed for basic MPP support. The configuration below shows the full middleware chain with notes on MPP-specific behaviour.
Dashboard support for managing paid endpoints is coming soon. Use the SDK to configure MPP on your routes.

What the 402 response includes

When a request arrives without payment, the MPP challenge appears in the WWW-Authenticate header:
Both headers are always present. The agent parses the WWW-Authenticate header to get the MPP challenge parameters.

What the 200 response includes

After successful MPP payment:
If session payments are enabled (acceptSessions: true) and the agent is starting a new session, the response also includes the X-PRUDRA-SESSION-ID header and sessionId in the body.

payMiddleware options for MPP

Error handling

Next steps