/**
 * Test Billing API Endpoint
 * Verifies /api/user/package-status returns subscription data
 */

console.log('🧪 Testing /api/user/package-status endpoint...\n');
console.log('📋 Expected Result:');
console.log('  - packageStatus: "active"');
console.log('  - subscription object with:');
console.log('    - status: "trialing"');
console.log('    - tierId: "tier3"');
console.log('    - setupFeePaid: true');
console.log('    - trialEndsAt: "2025-11-29T..."');
console.log('\n⚠️  Note: This test requires:');
console.log('  1. App running on port 9000 (npm run dev)');
console.log('  2. Valid session cookie for guqo@mailinator.com');
console.log('  3. Database running (docker:infra:start)');
console.log('\n📝 Instructions to test manually:');
console.log('  1. Open browser: http://localhost:9000/en/login');
console.log('  2. Login with: guqo@mailinator.com');
console.log('  3. Get OTP from: http://localhost:8025/#');
console.log('  4. After login, open DevTools Console');
console.log('  5. Run: fetch("/api/user/package-status").then(r => r.json()).then(console.log)');
console.log('\n✅ Expected output should show subscription with status "trialing"');
console.log('\n🔗 Or test via curl after getting session cookie:');
console.log('   curl http://localhost:9000/api/user/package-status \\');
console.log('     -H "Cookie: next-auth.session-token=YOUR_SESSION_TOKEN"');
