Open-source, self-hosted payment infrastructure for DERO — private invoices, on-chain escrow, x402-style payment gates, and a full merchant stack. MIT licensed.
DeroPay lets you accept DERO without a third-party processor: you run the gateway, you hold the keys, payments settle peer-to-peer on a privacy-preserving chain. It ships an SDK, a self-hostable gateway, a hosted-checkout page, an embeddable widget, WooCommerce + Medusa plugins, and reference storefronts — plus first-class support for agent-native payments (autonomous AI agents paying per-request over x402).
Pick the primitive that fits the transaction — mix them freely in one app:
| Mode | Use it for | Where |
|---|---|---|
| Invoice | One-off checkout: create an invoice, watch the chain, fulfill on confirmation. | dero-pay/server |
| Escrow | Trust-minimized trades: funds locked on-chain, released on delivery, with dispute/arbitration and a buyer refund path. | dero-pay/escrow |
| x402 gate | Metered APIs and AI agents paying per-request via HTTP 402, with verifiable receipts. |
dero-pay/x402, dero-pay/agent |
x402 note: the x402 payer's address is public on-chain — x402 is not sender-anonymous. See SECURITY.md.
apps/
web/ — deropay.com marketing site (Next.js 15)
dashboard/ — merchant dashboard (Next.js 15)
gateway/ — self-hosted payment gateway (REST + webhooks)
checkout/ — hosted checkout page
facilitator/ — x402 receipt/settlement facilitator
demo/ — live demo storefront
x402-example/ — runnable x402 + agent-payer walkthrough
packages/
dero-pay/ — payment SDK (TypeScript, published as `dero-pay` on npm)
deropay-widget/— embeddable drop-in payment widget
templates/ — starter storefronts (hologram-store, marketplace)
plugins/ — WooCommerce + Medusa integrations
bun install # install the workspace
bun run build:sdk # build the SDK
bun run dev:gateway # run the self-hosted gateway (needs a DERO wallet + daemon RPC)The gateway is the fastest path to a first payment — its README walks clone → keygen → .env → invoice → paid. To integrate the SDK into your own app, see the SDK README. For the agent/x402 flow end to end, run apps/x402-example.
dero-pay is modular — import only what you need:
dero-pay— core types, payment-id + pricing utilitiesdero-pay/rpc— wallet + daemon RPC clientsdero-pay/server— invoice engine, stores, webhooks, receipt signingdero-pay/escrow— escrow manager, keeper, contract, inventory storedero-pay/x402(+/types/server/client/next) — x402 payment gatingdero-pay/agent— autonomous agent payer (spend policies, credentials)dero-pay/bridge— durable outbound-only webhook daemondero-pay/router— on-chain payment-router contractdero-pay/client— XSWD client for browser walletsdero-pay/react— components + hooks (PayWithDero,InvoiceView,EscrowInvoiceView, …)dero-pay/next— Next.js route handlers + middlewaredero-pay/gateway— gateway integration helpers
- Architecture — components, data flow, RPC dependencies
- Deployment — self-hosting, hardening, scaling, ops
- Security — threat model, key handling, disclosure
- Contributing · Development
- SDK: README · Agent payer · x402 receipts spec