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.04

The 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

MethodEndpointPurpose
POST/api/payment/extension/Create QRIS payment
GET/api/payment/extension/statusPoll payment status
POST/api/payment/extension/webhookDANA Finish Notify webhook
POST/api/payment/extension/verifyVerify subscription
GET/api/payment/extension/subscriptionRecovery by email_id
GET/api/payment/extension/ads/configAd configuration

Database Configuration

SettingValue
EngineMySQL 8.x
Charsetutf8mb4_unicode_ci
TimezoneUTC (+00:00)
Payment DBfought_payments
Ads DBfought_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 payment

Security

MeasureImplementation
CORSOnly whitelisted Extension IDs + Tauri origin
WebhookRSA-SHA256 signature verification
DB UserMinimal privileges (no DELETE/DROP/ALTER)
.envPermission 600, not committed to repo
§ 04

Subscription Management

Subscription Model

ParameterDefault Value
PriceIDR 100,000
Duration30 days
Identityemail_id (SHA-256 of normalized email)
ExpiryCron job runs hourly
FOUGHT — DARK PRECISION V6.0
SYSTEMS ONLINE