Docs/API & Server
FOUGHT DOCUMENTATION
API & Server
VPS deployment on fecttral.com — payment processing, subscription management, QRIS integration, and ads API.
§ 01
VPS Deployment
Server Architecture
UBUNTU 24.04The VPS deployment runs on fecttral.com with Apache + MySQL + PHP 8.3. It handles payment processing, subscription management, ads, and auto-updates for the desktop app.
Server Structure
fecttral.com (Apache + MySQL + PHP 8.3) │ ├── /api/ ← Single .env for all APIs │ ├── .env ← Centralized config (not committed) │ ├── payment/extension/ ← Payment API (Chrome Ext + Desktop) │ └── ads/ ← Ads API (impression, revenue, sponsor) │ ├── /AKP2I/ ← Certificate handler + update server │ └── /extension/docs/ ← Public documents (privacy, terms)
§ 02
PHP API Endpoints
Payment API Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/payment/extension/ | Create QRIS payment |
| GET | /api/payment/extension/status | Poll payment status |
| POST | /api/payment/extension/webhook | DANA Finish Notify webhook |
| POST | /api/payment/extension/verify | Verify subscription |
| GET | /api/payment/extension/subscription | Recovery by email_id |
| GET | /api/payment/extension/ads/config | Ad configuration |
Database Configuration
| Setting | Value |
|---|---|
| Engine | MySQL 8.x |
| Charset | utf8mb4_unicode_ci |
| Timezone | UTC (+00:00) |
| Payment DB | fought_payments |
| Ads DB | fought_ads |
§ 03
Payment System
QRIS Payment Flow
1. Extension creates payment request
POST /api/payment/extension/
2. Server calls DANA Payment Gateway API → generate QR code
3. Extension displays QR code → user scans → pays
4. DANA sends Finish Notify webhook → server verifies RSA-SHA256
5. Extension polls status → { status: "paid" | "pending" | "expired" }
6. Subscription activated automatically on paymentSecurity
| Measure | Implementation |
|---|---|
| CORS | Only whitelisted Extension IDs + Tauri origin |
| Webhook | RSA-SHA256 signature verification |
| DB User | Minimal privileges (no DELETE/DROP/ALTER) |
| .env | Permission 600, not committed to repo |
§ 04
Subscription Management
Subscription Model
| Parameter | Default Value |
|---|---|
| Price | IDR 100,000 |
| Duration | 30 days |
| Identity | email_id (SHA-256 of normalized email) |
| Expiry | Cron job runs hourly |
FOUGHT — DARK PRECISION V6.0
SYSTEMS ONLINE