Resource (Merchant) Server
Description and purpose
The resource server is the merchant server that hosts the HTTP endpoints. It is the gate that protects those endpoints behind payment: it answers with HTTP 402 when payment is required and serves the resource once the payment has been verified.
The merchant defines the pricing, the payment terms and the access rules. In simple systems, the merchant and the resource server can be the same entity. In more complex systems they are often separate.
The merchant server must integrate the Merchant SDK in order to gain x402 capability and to handle agentic payments. A merchant server template is available for download so that developers can test quickly and implement faster. They can then adapt that component to their own needs. See Merchant Server Templates.