HostPioneers - AI Agent Hiring Platform
Features: - AI Agent Hiring API (/api/hire) - Agent Discovery (/api/agents.json) - Stripe Checkout Integration - Webhooks for payment notifications - Telegram + Email alerts - Mobile responsive design - SEO optimized - AI-to-AI commerce ready Built: March 2026
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"api_version": "1.0",
|
||||
"provider": {
|
||||
"name": "HostPioneers",
|
||||
"url": "https://hostpioneers.com",
|
||||
"description": "AI Agent Agency - Hire AI workers that work while you sleep",
|
||||
"contact": "sales@hostpioneers.com",
|
||||
"stripe_enabled": true
|
||||
},
|
||||
"endpoints": {
|
||||
"list_agents": "GET /api/agents.json",
|
||||
"single_agent": "GET /api/agents/{agent-id}.json",
|
||||
"hire_agent": "POST /api/hire",
|
||||
"documentation": "https://hostpioneers.com/hire-ai-agents.html"
|
||||
},
|
||||
"agents": [
|
||||
{
|
||||
"id": "single-agent",
|
||||
"name": "Voice AI Agent",
|
||||
"description": "One agent handling voice calls AND chat",
|
||||
"monthly_price": 797,
|
||||
"setup_price": 1997,
|
||||
"currency": "USD",
|
||||
"url": "/api/agents/single-agent.json"
|
||||
},
|
||||
{
|
||||
"id": "multi-agent",
|
||||
"name": "AI Agent Team",
|
||||
"description": "3+ agents with advanced workflows",
|
||||
"monthly_price": 1797,
|
||||
"setup_price": 4997,
|
||||
"currency": "USD",
|
||||
"url": "/api/agents/multi-agent.json"
|
||||
}
|
||||
],
|
||||
"addons": [
|
||||
{
|
||||
"id": "competitor-intelligence",
|
||||
"name": "Competitor Intelligence",
|
||||
"monthly_price": 297
|
||||
},
|
||||
{
|
||||
"id": "reputation-manager",
|
||||
"name": "Reputation Manager",
|
||||
"monthly_price": 197
|
||||
},
|
||||
{
|
||||
"id": "sales-onboarding",
|
||||
"name": "Sales & Onboarding",
|
||||
"monthly_price": 397
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"agents": [
|
||||
{
|
||||
"id": "single-agent",
|
||||
"name": "Voice AI Agent",
|
||||
"price": 797,
|
||||
"type": "single",
|
||||
"url": "/api/agents/single-agent.json"
|
||||
},
|
||||
{
|
||||
"id": "multi-agent",
|
||||
"name": "AI Agent Team",
|
||||
"price": 1797,
|
||||
"type": "team",
|
||||
"url": "/api/agents/multi-agent.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"id": "multi-agent",
|
||||
"name": "AI Agent Team",
|
||||
"type": "team",
|
||||
"description": "3+ intelligent agents with advanced workflows. Competitor intelligence, reputation management, and full sales automation.",
|
||||
"setup_price": 4997,
|
||||
"monthly_price": 1797,
|
||||
"currency": "USD",
|
||||
"capabilities": [
|
||||
"voice_calls",
|
||||
"chat",
|
||||
"lead_qualification",
|
||||
"competitor_monitoring",
|
||||
"reputation_management",
|
||||
"sales_automation",
|
||||
"customer_onboarding",
|
||||
"advanced_workflows",
|
||||
"custom_integrations"
|
||||
],
|
||||
"features": [
|
||||
"3+ AI Agents working together",
|
||||
"Competitor Intelligence - monitor 5 competitors",
|
||||
"Reputation Manager (FREE bonus - $297/mo value)",
|
||||
"Sales & Onboarding automation",
|
||||
"Advanced workflow design",
|
||||
"Custom CRM integrations",
|
||||
"Priority support",
|
||||
"White-label ready"
|
||||
],
|
||||
"included_addons": [
|
||||
{
|
||||
"id": "reputation-manager",
|
||||
"name": "Reputation Manager",
|
||||
"value": 297,
|
||||
"frequency": "monthly"
|
||||
}
|
||||
],
|
||||
"category": "enterprise",
|
||||
"stripe_checkout": "https://hostpioneers.com/checkout-multi.html",
|
||||
"documentation_url": "https://hostpioneers.com/#services",
|
||||
"hiring_endpoint": "POST /api/hire",
|
||||
"query_params": {
|
||||
"email": "your@email.com (required)",
|
||||
"name": "business name (optional)"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"id": "single-agent",
|
||||
"name": "Voice AI Agent",
|
||||
"type": "single",
|
||||
"description": "One intelligent agent handling voice calls AND website chat. Works 24/7, qualifies leads, multi-language support.",
|
||||
"setup_price": 1997,
|
||||
"monthly_price": 797,
|
||||
"currency": "USD",
|
||||
"capabilities": [
|
||||
"voice_calls",
|
||||
"chat",
|
||||
"lead_qualification",
|
||||
"multi_language",
|
||||
"24_7_available",
|
||||
"calendar_integration",
|
||||
"crm_integration"
|
||||
],
|
||||
"features": [
|
||||
"Voice + Chat combined in one agent",
|
||||
"Qualifies leads automatically",
|
||||
"24/7 availability - never misses a call",
|
||||
"Multi-language support (50+ languages)",
|
||||
"CRM integration ready",
|
||||
"Calendar booking integration"
|
||||
],
|
||||
"included_addons": [
|
||||
{
|
||||
"id": "reputation-manager",
|
||||
"name": "Reputation Manager",
|
||||
"value": 297,
|
||||
"frequency": "monthly"
|
||||
}
|
||||
],
|
||||
"category": "sales",
|
||||
"stripe_checkout": "https://hostpioneers.com/checkout-single.html",
|
||||
"documentation_url": "https://hostpioneers.com/#services",
|
||||
"hiring_endpoint": "POST /api/hire",
|
||||
"query_params": {
|
||||
"email": "your@email.com (required)",
|
||||
"name": "business name (optional)"
|
||||
}
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Allow-Methods: POST, OPTIONS');
|
||||
header('Access-Control-Allow-Headers: Content-Type');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
||||
http_response_code(200);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
http_response_code(405);
|
||||
echo json_encode(['error' => 'Method not allowed. Use POST.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$input = json_decode(file_get_contents('php://input'), true);
|
||||
|
||||
if (empty($input['agent']) || empty($input['email'])) {
|
||||
http_response_code(400);
|
||||
echo json_encode([
|
||||
'error' => 'Missing required fields',
|
||||
'required' => ['agent', 'email'],
|
||||
'example' => [
|
||||
'agent' => 'single-agent',
|
||||
'email' => 'your@email.com'
|
||||
]
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$agent = $input['agent'];
|
||||
$email = filter_var($input['email'], FILTER_VALIDATE_EMAIL);
|
||||
$name = $input['name'] ?? '';
|
||||
|
||||
$agents = [
|
||||
'single-agent' => [
|
||||
'name' => 'Single AI Agent',
|
||||
'setup_price' => 199700,
|
||||
'monthly_price' => 79700,
|
||||
'checkout_url' => 'https://hostpioneers.com/checkout-single.html'
|
||||
],
|
||||
'multi-agent' => [
|
||||
'name' => 'Multi AI Agent Team',
|
||||
'setup_price' => 499700,
|
||||
'monthly_price' => 179700,
|
||||
'checkout_url' => 'https://hostpioneers.com/checkout-multi.html'
|
||||
]
|
||||
];
|
||||
|
||||
if (!isset($agents[$agent])) {
|
||||
http_response_code(400);
|
||||
echo json_encode([
|
||||
'error' => 'Invalid agent type',
|
||||
'valid_agents' => array_keys($agents)
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$agentConfig = $agents[$agent];
|
||||
|
||||
$stripeSecretKey = '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';
|
||||
|
||||
$stripeUrl = 'https://api.stripe.com/v1/checkout/sessions';
|
||||
|
||||
$data = [
|
||||
'payment_method_types[]' => 'card',
|
||||
'line_items[0][price_data][product_data][name]' => $agentConfig['name'] . ' - Setup',
|
||||
'line_items[0][price_data][unit_amount]' => $agentConfig['setup_price'],
|
||||
'line_items[0][price_data][currency]' => 'usd',
|
||||
'line_items[0][quantity]' => 1,
|
||||
'mode' => 'payment',
|
||||
'success_url' => 'https://hostpioneers.com/success.html?agent=' . urlencode($agent),
|
||||
'cancel_url' => $agentConfig['checkout_url'],
|
||||
'customer_email' => $email,
|
||||
'metadata' => [
|
||||
'agent_type' => $agent,
|
||||
'customer_name' => $name
|
||||
]
|
||||
];
|
||||
|
||||
$ch = curl_init($stripeUrl);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
'Authorization: Bearer ' . $stripeSecretKey,
|
||||
'Content-Type: application/x-www-form-urlencoded'
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
$responseData = json_decode($response, true);
|
||||
|
||||
if ($httpCode === 200 && isset($responseData['url'])) {
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'checkout_url' => $responseData['url'],
|
||||
'session_id' => $responseData['id'],
|
||||
'agent' => $agentConfig['name'],
|
||||
'email' => $email,
|
||||
'notification' => 'Telegram + Email on payment'
|
||||
]);
|
||||
} else {
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'error' => 'Failed to create checkout session',
|
||||
'details' => $responseData['error'] ?? 'Unknown error'
|
||||
]);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Allow-Methods: POST, OPTIONS');
|
||||
header('Access-Control-Allow-Headers: Content-Type');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
||||
http_response_code(200);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
http_response_code(405);
|
||||
echo json_encode(['error' => 'Method not allowed. Use POST.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$input = json_decode(file_get_contents('php://input'), true);
|
||||
|
||||
if (empty($input['agent']) || empty($input['email'])) {
|
||||
http_response_code(400);
|
||||
echo json_encode([
|
||||
'error' => 'Missing required fields',
|
||||
'required' => ['agent', 'email'],
|
||||
'example' => [
|
||||
'agent' => 'single-agent',
|
||||
'email' => 'your@email.com'
|
||||
]
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$agent = $input['agent'];
|
||||
$email = filter_var($input['email'], FILTER_VALIDATE_EMAIL);
|
||||
$name = $input['name'] ?? '';
|
||||
|
||||
$agents = [
|
||||
'single-agent' => [
|
||||
'name' => 'Single AI Agent',
|
||||
'setup_price' => 199700,
|
||||
'monthly_price' => 79700,
|
||||
'checkout_url' => 'https://hostpioneers.com/checkout-single.html'
|
||||
],
|
||||
'multi-agent' => [
|
||||
'name' => 'Multi AI Agent Team',
|
||||
'setup_price' => 499700,
|
||||
'monthly_price' => 179700,
|
||||
'checkout_url' => 'https://hostpioneers.com/checkout-multi.html'
|
||||
]
|
||||
];
|
||||
|
||||
if (!isset($agents[$agent])) {
|
||||
http_response_code(400);
|
||||
echo json_encode([
|
||||
'error' => 'Invalid agent type',
|
||||
'valid_agents' => array_keys($agents)
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$agentConfig = $agents[$agent];
|
||||
|
||||
$stripeSecretKey = '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';
|
||||
|
||||
$stripeUrl = 'https://api.stripe.com/v1/checkout/sessions';
|
||||
|
||||
$data = [
|
||||
'payment_method_types[]' => 'card',
|
||||
'line_items[0][price_data][product_data][name]' => $agentConfig['name'] . ' - Setup',
|
||||
'line_items[0][price_data][unit_amount]' => $agentConfig['setup_price'],
|
||||
'line_items[0][price_data][currency]' => 'usd',
|
||||
'line_items[0][quantity]' => 1,
|
||||
'mode' => 'payment',
|
||||
'success_url' => 'https://hostpioneers.com/success.html?agent=' . urlencode($agent),
|
||||
'cancel_url' => $agentConfig['checkout_url'],
|
||||
'customer_email' => $email,
|
||||
'metadata' => [
|
||||
'agent_type' => $agent,
|
||||
'customer_name' => $name
|
||||
]
|
||||
];
|
||||
|
||||
$ch = curl_init($stripeUrl);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
'Authorization: Bearer ' . $stripeSecretKey,
|
||||
'Content-Type: application/x-www-form-urlencoded'
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
$responseData = json_decode($response, true);
|
||||
|
||||
if ($httpCode === 200 && isset($responseData['url'])) {
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'checkout_url' => $responseData['url'],
|
||||
'session_id' => $responseData['id'],
|
||||
'agent' => $agentConfig['name'],
|
||||
'email' => $email,
|
||||
'notification' => 'Telegram + Email on payment'
|
||||
]);
|
||||
} else {
|
||||
http_response_code(500);
|
||||
echo json_encode([
|
||||
'error' => 'Failed to create checkout session',
|
||||
'details' => $responseData['error'] ?? 'Unknown error'
|
||||
]);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// Stripe webhook secret
|
||||
$webhookSecret = 'whsec_yoursecret'; // TODO: Get from Stripe Dashboard
|
||||
|
||||
// Get payload
|
||||
$payload = file_get_contents('php://input');
|
||||
$sig = $_SERVER['HTTP_STRIPE_SIGNATURE'] ?? '';
|
||||
|
||||
// Validate webhook (simplified - in production use webhook secret)
|
||||
$data = json_decode($payload, true);
|
||||
|
||||
if (!$data || !isset($data['type'])) {
|
||||
http_response_code(400);
|
||||
exit;
|
||||
}
|
||||
|
||||
$eventType = $data['type'];
|
||||
$session = $data['data']['object'] ?? [];
|
||||
|
||||
if ($eventType === 'checkout.session.completed') {
|
||||
// Payment successful - AI agent hired us!
|
||||
$agentType = $session['metadata']['agent_type'] ?? 'unknown';
|
||||
$email = $session['customer_email'] ?? '';
|
||||
$sessionId = $session['id'] ?? '';
|
||||
$amount = isset($session['amount_total']) ? $session['amount_total'] / 100 : 0;
|
||||
|
||||
// Log the hire
|
||||
$log = [
|
||||
'timestamp' => date('Y-m-d H:i:s'),
|
||||
'event' => 'ai_agent_hired',
|
||||
'agent' => $agentType,
|
||||
'email' => $email,
|
||||
'session_id' => $sessionId,
|
||||
'amount' => $amount
|
||||
];
|
||||
|
||||
// Save to hires log
|
||||
$logFile = '/var/www/hostpioneers.com/public_html/api/hires.log';
|
||||
$existing = file_exists($logFile) ? json_decode(file_get_contents($logFile), true) : [];
|
||||
$existing[] = $log;
|
||||
file_put_contents($logFile, json_encode($existing, JSON_PRETTY_PRINT));
|
||||
|
||||
// Send Telegram notification
|
||||
$telegramToken = '8644418426:AAEL8GvHwohNDkxaru5yCZFPgh5Gsc-yAhA';
|
||||
$chatId = '382315644';
|
||||
$text = "🤖 *AI AGENT HIRED!*
|
||||
|
||||
*Agent:* $agentType
|
||||
*Email:* $email
|
||||
*Amount:* $" . number_format($amount, 2) . "
|
||||
*Session:* $sessionId";
|
||||
|
||||
$ch = curl_init("https://api.telegram.org/bot$telegramToken/sendMessage?chat_id=$chatId&text=" . urlencode($text) . "&parse_mode=Markdown");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
// Send email
|
||||
$to = 'sales@hostpioneers.com';
|
||||
$subject = "🤖 AI Agent Hired: $agentType - $" . number_format($amount, 2);
|
||||
$body = "AI Agent hired!
|
||||
|
||||
Agent: $agentType
|
||||
Customer: $email
|
||||
Amount: $" . number_format($amount, 2) . "
|
||||
Session: $sessionId
|
||||
|
||||
---
|
||||
This was an automated notification from HostPioneers API.";
|
||||
|
||||
@mail($to, $subject, $body);
|
||||
|
||||
echo json_encode(['success' => true, 'message' => 'Hire logged and notifications sent']);
|
||||
} else {
|
||||
echo json_encode(['success' => true, 'message' => 'Event ignored']);
|
||||
}
|
||||
Reference in New Issue
Block a user