Enterprise Subscription Demo

Monthly bot subscriptions with platform-level access control

Back to Home

Platform Configuration

Platform Edge Rule: Before serving content, check bot authorization via AgentPay API (usage tracked for billing)

Bot Traffic Simulator

Enterprise Platform Integration Example

// Cloudflare Worker Example
addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
  const userAgent = request.headers.get('User-Agent')
  
  // Check bot authorization with AgentPay
  const authResponse = await fetch('https://agentpay.app/api/bot-auth/verify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ user_agent: userAgent })
  })
  
  const authData = await authResponse.json()
  
  if (authData.authorized) {
    // Serve the content
    return fetch(request)
  } else {
    // Return 402 Payment Required
    return new Response('Payment Required', { status: 402 })
  }
}