SelPoint API Documentation

Try API SelPoint

Test endpoints in real-time

Select Endpoint

Billing

License

Coupon

Request Body (JSON)
Response
Time: Size:

Integrasikan Bisnis Anda

Dokumentasi REST API SelPoint untuk mengelola sistem kasir, billing, dan lisensi secara otomatis.

Base URL

https://api.selpoint.alul.tech/api/v1

Authentication Header

X-Subscription-Token: {your_api_token}

Butuh Token?

Dapatkan API Token melalui Dashboard Owner Anda.

Hubungi Support

Authentication

Semua request ke SelPoint API wajib menyertakan token autentikasi di dalam Header request Anda.

X-Subscription-Token: your_api_token
Content-Type: application/json

Billing API

GET

/billing/plans

Mengambil daftar paket langganan yang tersedia dan aktif.

// Response 200 OK
[
  {
    "slug": "basic-monthly",
    "name": "Basic",
    "price": 125000,
    "features": ["1 Device", "Offline 3 Days"]
  },
  {
    "slug": "pro-monthly",
    "name": "Pro",
    "price": 345000,
    "features": ["Multi Device", "Offline 7 Days", "Online Order"]
  }
]
POST

/billing/renew

Membuat invoice pembayaran baru untuk perpanjangan langganan.

// Request Body
{
  "plan": "pro-monthly",
  "coupon_code": "DISKON10"
}
// Response 201 Created
{
  "invoice_id": "INV-2026-001",
  "invoice_url": "https://checkout.xendit.co/xxxx",
  "expires_at": "2026-05-04T10:00:00Z"
}

License API

POST

/license/sync

Sinkronisasi status lisensi dan melakukan device binding pada perangkat keras fisik.

// Request Body
{
  "device_hash": "abc123456789xyz",
  "device_meta": {
    "os": "android",
    "app_version": "1.2.0",
    "model": "Samsung T295"
  }
}
// Response 200 OK
{
  "license_code": "SUB-PRO-9921",
  "status": "active",
  "expires_at": "2026-06-04",
  "signature": "base64-encrypted-rsa-signature",
  "max_offline_days": 7
}

Security & RSA Validation

Setiap response dari License API ditandatangani menggunakan RSA Private Key kami. Client wajib melakukan verifikasi menggunakan Public Key SelPoint.

Payload to Sign

{
  "license_code": "SUB-XXXXX",
  "expires_at": "2026-05-01",
  "device_hash": "abc123",
  "synced_at": "2026-05-03",
  "max_offline_days": 7
}

Verification Logic (PHP)

// Verify Signature
$is_valid = openssl_verify(
    $data,
    $signature,
    $public_key,
    "sha256WithRSAEncryption"
);

Coupon API

POST

/coupons/validate

// Request
{
  "code": "PROMO10",
  "amount": 345000
}
// Response
{
  "valid": true,
  "discount_amount": 34500,
  "final_amount": 310500
}

System Health Status

Endpoint

/api/health

DB Connected

RSA Ready

Xendit Link

Contoh Implementasi (JavaScript)

fetch('https://api.selpoint.alul.tech/api/v1/license/sync', {
  method: 'POST',
  headers: {
    'X-Subscription-Token': 'YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    device_hash: 'abc123456789xyz'
  })
})
.then(response => response.json())
.then(data => console.log(data));

Siap Integrasi?

Dapatkan API Token Anda dan mulai kembangkan aplikasi dalam hitungan menit.

Dapatkan API Token