Use the following guide and repository to be able to:
- Create a Facilitator.
- Execute machine-to-machine x402 payments for a privileged data response.
- Execute human-to-api frontend interaction and trigger x402 payment for a privileged data response.
git clone https://github.com/peaqnetwork/x402-peaq.git
cd x402-peaq
The repository is setup in the following way:
x402-peaq/
facilitator/
resource-server/
The facilitator allows you to run an optional verifier, and the resource-server gives examples of machine-to-machine and human-to-api x402 flows.
In the following examples we assume all participating wallets has native peaq token for gas and USDC/USDT for payment.