diff --git a/src/app.js b/src/app.js index 805c319..049136d 100644 --- a/src/app.js +++ b/src/app.js @@ -137,6 +137,13 @@ app.all('/mcp', async (c) => { return handleMcp(c.req.raw); }); +// The day-pass sales page and x402 settle endpoint (only with the paid tier on). +app.all('/crawl', async (c) => (gateway && (await gateway.handle(c.req.raw))) || c.text('not found', 404)); + +// CoinPay business webhook. Day passes settle synchronously over x402 or the +// gateway checkout return page, so events are only acknowledged here. +app.post('/hooks/coinpay', (c) => c.body(null, 204)); + app.get('/health', (c) => c.json({ ok: true, version: VERSION })); app.get('/', async (c) => c.html(await homePage())); app.get('/docs', async (c) => c.html(await docsPage()));