# `mix mpp.demo`
[🔗](https://github.com/ZenHive/mpp/blob/v0.10.0/lib/mix/tasks/mpp.demo.ex#L1)

Starts a local HTTP server demonstrating the full MPP 402 payment flow.

No real payment credentials needed — a magic `"demo-token"` payload succeeds.

    mix mpp.demo
    mix mpp.demo --port 8080

## Options

  * `--port` — port to listen on (default: 4402)

## What It Does

1. Starts a Bandit server with `MPP.Demo.Router`
2. `GET /resource` returns a 402 challenge with `WWW-Authenticate: Payment`
3. Retry with `Authorization: Payment <credential>` to get a 200 with `Payment-Receipt`
4. The startup banner includes copy-paste curl commands

## Requirements

Bandit must be available (it's a `:dev` dependency of mpp). If you're using
mpp as a library dependency, add `{:bandit, "~> 1.10", only: :dev}` to your deps.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
