Skip to content

Implementation Plan

Timeline (2 Minggu)

Hari:  1   2   3   4   5   6   7   8   9   10  11  12  13  14
      ├─ Rekening Korporat ─┤
      ├──── Brankas Onboarding ────────┤
      ├────────────── Development ────────────────┤
                                              ├─ Test ─┤
                                                  ├─ Buffer ─┤
                                                  ├─ Go Live ─┤

Critical Path

Minggu 1

HariBusinessDevelopment
1Daftar rekening korporat (BCA/Mandiri), daftar BrankasSetup project, scaffold backend
2Submit dokumen ke bankSetup DB schema, API routes skeleton
3Follow up bankImplement recipient CRUD, Google Forms webhook
4Bank processingImplement Brankas sandbox integration
5Bank processingDashboard UI (table + tombol transfer)
6Bank processingWebhook handler, status tracking
7Rekening aktifEnd-to-end test dengan sandbox

Minggu 2

HariBusinessDevelopment
8Link rekening ke BrankasProduction config, security hardening
9Brankas KYC completeFinal testing
10Brankas production liveBug fixes, polish
11Uang masuk rekeningFinal verification
12Ready to disburseBuffer day
13Disbursement startsMonitor
14

Dokumen yang Dibutuhkan

Untuk Bank (Rekening Korporat)

  • Akta Pendirian + Perubahan (terbaru)
  • SK Kemenkumham
  • NPWP perusahaan
  • KTP + NPWP direksi
  • NIB (Nomor Induk Berusaha)
  • Surat keterangan domisili

Untuk Brankas

  • Dokumen legal perusahaan (sama seperti bank)
  • KTP direksi
  • NPWP perusahaan
  • Surat kuasa (jika diperlukan)

Arsitektur

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│ Google Forms│────▶│ Apps Script │────▶│  Your API   │
└─────────────┘     └─────────────┘     └──────┬──────┘

                                      ┌─────────┴─────────┐
                                      │                   │
                                 ┌────▼────┐       ┌─────▼────┐
                                 │PostgreSQL│       │ Dashboard │
                                 └────┬────┘       └─────┬────┘
                                      │                   │
                                      │            ┌──────▼──────┐
                                      │            │   User      │
                                      │            │ (klik tombol)│
                                      │            └──────┬──────┘
                                      │                   │
                                      └─────────┬─────────┘

                                          ┌─────▼─────┐
                                          │  Brankas  │
                                          │ Disburse  │
                                          └─────┬─────┘

                                          ┌─────▼─────┐
                                          │  Rekening │
                                          │  Korporat │
                                          └───────────┘

Tech Stack

LayerPilihanAlasan
BackendHono.js atau ExpressRingan, cepat setup
DatabasePostgreSQL (Railway/Supabase)Reliable, gratis tier cukup
DeployRailway atau RenderSimple, auto-deploy dari Git
DashboardNext.js atau vanilla ReactFamiliar, cepat
AuthNextAuth atau ClerkJangan public tanpa auth

Database Schema (Minimal)

sql
CREATE TABLE recipients (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name TEXT NOT NULL,
  bank_code TEXT NOT NULL,
  account_number TEXT NOT NULL,
  account_name TEXT NOT NULL,
  amount BIGINT NOT NULL, -- dalam rupiah, tanpa desimal
  status TEXT NOT NULL DEFAULT 'pending', -- pending, processing, completed, failed
  external_id TEXT UNIQUE, -- untuk idempotency Brankas
  disbursement_id TEXT, -- ID dari Brankas
  failure_reason TEXT,
  created_at TIMESTAMPTZ DEFAULT NOW(),
  updated_at TIMESTAMPTZ DEFAULT NOW(),
  processed_at TIMESTAMPTZ
);

CREATE INDEX idx_recipients_status ON recipients(status);
CREATE INDEX idx_recipients_external_id ON recipients(external_id);

API Endpoints

Internal

MethodPathDescription
POST/api/recipientsCreate recipient (dari Google Forms)
GET/api/recipientsList all recipients
GET/api/recipients/:idGet recipient detail
POST/api/disburse/:idTrigger disbursement untuk 1 recipient
POST/api/disburse/batchTrigger disbursement batch

Webhooks

MethodPathDescription
POST/api/webhooks/brankasTerima status update dari Brankas

Security Checklist

  • [ ] API key Brankas di environment variable, jangan di client-side
  • [ ] Endpoint disburse wajib autentikasi
  • [ ] Rate limiting pada endpoint disburse
  • [ ] Idempotency key untuk setiap transaksi
  • [ ] Validate bank account sebelum disburse (gunakan Brankas account inquiry)
  • [ ] Audit log untuk setiap action
  • [ ] HTTPS only
  • [ ] Webhook signature verification

Backup Plan

Kalau Hari 10 API belum live:

  1. Uang tetap masuk ke rekening korporat yang sudah aktif
  2. Disbursement manual via KlikBCA Bisnis / Mandiri Online batch upload CSV
  3. Tracking system tetap jalan — input manual ke dashboard atau import CSV dari bank
  4. Brankas API di-switch begitu live

Monitoring

Setelah go live:

  • Log setiap API call ke Brankas
  • Monitor webhook delivery
  • Dashboard untuk lihat status real-time
  • Alert kalau ada failure rate tinggi

Reconciliation

  • Simpan response log dari Brankas
  • Bulanan cek saldo rekening vs total completed di DB
  • Download statement dari Brankas untuk matching

Research and documentation for disbursement system