Skip to main content
The @x402/hedera package implements the scheme for both client and resource server. This page covers the resource-server side: gating an API and settling payments.

Register the resource server

Register the scheme and declare the asset you accept:
server.ts
The facilitatorClient points at a facilitator that supports Hedera (see Facilitators). The resource server uses it to /verify and /settle payments without holding funds or running its own node.

Further reading

Hedera's exact scheme

Message shapes, assets, and safety checks.

Pay with x402 on Hedera

Client setup for AI agents and other payers.

x402 facilitators

Hosted options and how to run your own.