⚡ API v1 ✓ Production Ready REST • JSON

HITUNGKU API

API kalkulator online untuk aplikasi, website, dan sistem bisnis. Integrasikan modul perhitungan gaji, cicilan, pajak, persentase, dan utilitas ke dalam infrastruktur Anda secara instan.

Base URL: https://hitungku.cloud/api/v1
Mulai Menggunakan API

Pengenalan & Arsitektur API

HITUNGKU API adalah antarmuka pemrograman aplikasi berbasis RESTful HTTPS yang menerima input dan mengembalikan keluaran berformat JSON standar. Seluruh endpoint kalkulator dirancang dengan presisi matematis tinggi, penanganan desimal akurat, serta sanitasi otomatis untuk format mata uang Rupiah Indonesia.

🔒

Protokol Aman

Hanya melayani request melalui HTTPS dengan autentikasi API Key terenkripsi SHA-256.

⚡

Respon Ringan & Cepat

Payload JSON standar dengan pelacakan latensi rata-rata sub-100ms.

🇮🇩

Sesuai Regulasi ID

Formula pajak TER PP 58/2023, standar Kemenkes RI, dan perbankan nasional.

Quick Start (4 Langkah Cepat)

1

Buat Akun HITUNGKU

Daftarkan akun gratis melalui halaman registrasi resmi untuk mengaktifkan akses API dan kuota bulanan.

Buka Halaman Daftar →
2

Buat API Key di Dashboard

Masuk ke menu Dashboard > API, beri label nama aplikasi, dan klik Generate Key. Simpan key yang dihasilkan.

Menuju Dashboard API →
3

Sertakan Header Autentikasi

Pasang header X-Api-Key: YOUR_API_KEY pada setiap HTTP request Anda.

4

Kirim Request & Ambil Hasil

Kirim request POST berformat JSON ke endpoint kalkulator yang diinginkan dan konsumsi data hasil perhitungan.

Authentication

Setiap pemanggilan endpoint kalkulator wajib menyertakan API Key. Sistem mendukung dua metode passing key melalui HTTP Request Header:

Metode 1 (Rekomendasi)

X-Api-Key: YOUR_API_KEY

Metode 2 (Bearer Token)

Authorization: Bearer YOUR_API_KEY
⚠️
Catatan Keamanan Penting: Jangan letakkan API Key di frontend publik, JavaScript browser, repository GitHub publik, atau aplikasi client-side yang dapat diakses langsung oleh pengguna akhir. Selalu panggil HITUNGKU API melalui backend server Anda sendiri (reverse proxy / server-side controller).

Contoh Respon 401 (Key Tidak Valid atau Belum Disertakan):

{
  "success": false,
  "message": "API Key wajib disertakan pada header X-Api-Key atau Authorization Bearer.",
  "errors": {}
}

Rate Limits & Kuota Penggunaan

Setiap akun memiliki kuota panggilan API bulanan yang dihitung otomatis berdasarkan paket langganan aktif. Kuota di-reset kembali ke nilai penuh pada tanggal 1 setiap bulannya.

Paket Layanan Batas Kuota Bulanan Status Rate Limiting
Free 100 request / bulan Aktif
Pro 10.000 request / bulan Aktif
Business 100.000 request / bulan Aktif

Contoh Respon 429 (Kuota Bulanan Habis):

{
  "success": false,
  "message": "API monthly quota exceeded.",
  "quota": 100,
  "used": 100,
  "remaining": 0
}

Format Response & Error Handling

Semua endpoint HITUNGKU API mengembalikan struktur envelope JSON yang konsisten.

200 OK (Envelope Sukses)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "result": 150000,
    ...
  }
}
422 Unprocessable Content (Validasi)
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "basic_salary": [
      "Gaji pokok wajib diisi."
    ]
  }
}

Daftar Status HTTP yang Digunakan:

Status Keterangan
200 OK Kalkulasi berhasil diproses dan hasil tersedia di objek data.
401 Unauthorized API Key tidak disertakan, tidak valid, atau telah dicabut.
404 Not Found Endpoint atau resource tool tidak ditemukan.
422 Unprocessable Parameter request tidak lolos aturan validasi (tipe data, nilai negatif, batas batas).
429 Too Many Requests Kuota pemanggilan bulanan akun telah terlampaui.
500 Server Error Kesalahan internal server yang tidak terduga.
POST /api/v1/calculators/salary

1. Kalkulator Gaji

Simulasi gaji komprehensif mendukung 9 operasi: gaji pokok & tunjangan (`basic`), gaji bersih (`net_salary`), prorata hari kerja (`prorated_salary`), upah harian (`daily_wage`), upah per jam (`hourly_wage`), kenaikan gaji (`salary_increase`), perbandingan gaji (`salary_comparison`), lembur (`overtime`), dan target take home pay (`target_take_home`).

Request Parameters

Parameter Tipe Status Keterangan
operation string Opsional (default: basic) Pilihan: basic, net_salary, prorated_salary, daily_wage, hourly_wage, salary_increase, salary_comparison, overtime, target_take_home.
basic_salary numeric Wajib (basic) Gaji pokok (Rupiah, min: 0). Menerima angka murni atau format string "Rp 7.500.000".
fixed_allowance numeric Opsional Tunjangan tetap (Rupiah, min: 0).
variable_allowance numeric Opsional Tunjangan tidak tetap (Rupiah, min: 0).
overtime numeric Opsional Uang lembur (Rupiah, min: 0).
bonus numeric Opsional Bonus / insentif (Rupiah, min: 0).
other_deductions numeric Opsional Potongan lainnya (Rupiah, min: 0).
curl -X POST "https://hitungku.cloud/api/v1/calculators/salary" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"basic\",
  \"basic_salary\": 8500000,
  \"fixed_allowance\": 1500000,
  \"variable_allowance\": 500000,
  \"other_deductions\": 250000
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Salary calculated successfully",
  "data": {
    "operation": "basic",
    "gross_salary": 10500000,
    "total_deductions": 250000,
    "net_salary": 10250000,
    "formatted_gross": "Rp 10.500.000",
    "formatted_net": "Rp 10.250.000"
  }
}
POST /api/v1/calculators/thr

2. Kalkulator THR

Perhitungan Tunjangan Hari Raya Keagamaan berdasarkan Permenaker No. 6 Tahun 2016 (Masa kerja ≥ 12 bulan dapat 1 bulan upah penuh, masa kerja 1–11 bulan dihitung prorata).

Request Parameters

Parameter Tipe Status Keterangan
basic_salary numeric Wajib Gaji pokok (Rupiah, min: 0).
fixed_allowance numeric Opsional Tunjangan tetap bulanan (Rupiah, min: 0).
service_months integer Wajib Lama masa kerja dalam satuan bulan (min: 0, max: 600).
curl -X POST "https://hitungku.cloud/api/v1/calculators/thr" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"basic_salary\": 6000000,
  \"fixed_allowance\": 1000000,
  \"service_months\": 6
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "THR calculated successfully",
  "data": {
    "monthly_wage": 7000000,
    "service_months": 6,
    "is_prorated": true,
    "thr_amount": 3500000,
    "formatted_thr": "Rp 3.500.000",
    "note": "Masa kerja 6 bulan mendapatkan THR prorata (6/12)"
  }
}
POST /api/v1/calculators/installment

3. Kalkulator Cicilan & Pinjaman

Simulasi kredit multiguna, KTA, kendaraan, atau pinjaman usaha dengan pilihan metode bunga Flat atau Bunga Efektif menurun.

Request Parameters

Parameter Tipe Status Keterangan
principal_amount integer Wajib Total plafon pinjaman / harga barang (min: 1).
down_payment integer Wajib Uang muka / DP (Rupiah, min: 0, harus < principal_amount).
tenor integer Wajib Durasi cicilan (min: 1).
tenor_unit string Wajib Satuan tenor: months atau years.
interest_rate numeric Wajib Suku bunga per tahun dalam persen (0 - 100).
interest_method string Wajib Metode perhitungan: flat atau effective.
curl -X POST "https://hitungku.cloud/api/v1/calculators/installment" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"principal_amount\": 50000000,
  \"down_payment\": 10000000,
  \"tenor\": 12,
  \"tenor_unit\": \"months\",
  \"interest_rate\": 9.5,
  \"interest_method\": \"flat\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Installment calculated successfully",
  "data": {
    "loan_amount": 40000000,
    "monthly_installment": 3650000,
    "total_interest": 3800000,
    "total_payment": 43800000,
    "tenor_months": 12,
    "formatted_monthly": "Rp 3.650.000"
  }
}
POST /api/v1/calculators/kpr

4. Kalkulator KPR

Simulasi Kredit Pemilikan Rumah lengkap dengan estimasi angsuran anuitas/efektif, biaya provisi, administrasi, asuransi, notaris, dan rasio kemampuan angsuran (DSR).

Request Parameters

Parameter Tipe Status Keterangan
property_price integer Wajib Harga properti / rumah (Rupiah, min: 1).
down_payment numeric Wajib Nominal DP (amount) atau persentase (percentage, < 100%).
down_payment_type string Wajib Pilihan: amount (Rupiah) atau percentage (%).
tenor integer Wajib Tenor (total 12 - 600 bulan / 1 - 50 tahun).
tenor_unit string Wajib Satuan: months atau years.
interest_rate numeric Wajib Suku bunga per tahun (0 - 100%).
interest_method string Wajib Metode: annuity (anuitas tetap) atau effective.
monthly_income numeric Opsional Penghasilan bulanan untuk simulasi kelayakan cicilan.
curl -X POST "https://hitungku.cloud/api/v1/calculators/kpr" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"property_price\": 650000000,
  \"down_payment\": 20,
  \"down_payment_type\": \"percentage\",
  \"tenor\": 15,
  \"tenor_unit\": \"years\",
  \"interest_rate\": 7.25,
  \"interest_method\": \"annuity\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "KPR calculated successfully",
  "data": {
    "loan_principal": 520000000,
    "down_payment_amount": 130000000,
    "monthly_installment": 4746376,
    "total_payment": 854347680,
    "total_interest": 334347680,
    "tenor_months": 180,
    "formatted_monthly": "Rp 4.746.376"
  }
}
POST /api/v1/calculators/percentage

5. Kalkulator Persentase

Operasi persentase komprehensif: nilai persentase (`percentage_of`), rasio bagian terhadap total (`percentage_ratio`), kenaikan persentase (`percentage_increase`), penurunan (`percentage_decrease`), selisih relatif (`percentage_difference`), tambah persentase (`add_percentage`), dan kurang persentase (`subtract_percentage`).

Request Parameters

Parameter Tipe Status Keterangan
operation string Wajib percentage_of, percentage_ratio, percentage_increase, percentage_decrease, percentage_difference, add_percentage, subtract_percentage.
percentage numeric Sesuai mode Nilai persentase (min: 0). Wajib pada percentage_of, add_percentage, subtract_percentage.
base_value numeric Sesuai mode Nilai angka dasar. Wajib pada percentage_of, add_percentage, subtract_percentage.
part_value / whole_value numeric Sesuai mode Wajib pada mode percentage_ratio (whole_value != 0).
old_value / new_value numeric Sesuai mode Wajib pada mode percentage_increase dan percentage_decrease (old_value > 0).
curl -X POST "https://hitungku.cloud/api/v1/calculators/percentage" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"percentage_of\",
  \"percentage\": 15,
  \"base_value\": 2500000
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Percentage calculated successfully",
  "data": {
    "operation": "percentage_of",
    "result": 375000,
    "percentage": 15,
    "base_value": 2500000,
    "sentence": "15% dari 2.500.000 adalah 375.000"
  }
}
POST /api/v1/calculators/discount

6. Kalkulator Diskon

Perhitungan potongan harga tunggal, diskon bertingkat (e.g. 50%+20%), pencarian persentase diskon, dan harga awal sebelum diskon.

Request Parameters

Parameter Tipe Status Keterangan
operation string Wajib after_discount, discount_amount, discount_percentage, original_price, stacked_discount, price_comparison.
original_price numeric Sesuai mode Harga awal (Rupiah, min: 0).
discount_percentage numeric Sesuai mode Besaran diskon (0 - 99.99%).
discounts array Wajib (stacked_discount) Array persentase diskon bertingkat (contoh: [50, 20]).
curl -X POST "https://hitungku.cloud/api/v1/calculators/discount" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"after_discount\",
  \"original_price\": 500000,
  \"discount_percentage\": 25
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Discount calculated successfully",
  "data": {
    "original_price": 500000,
    "discount_percentage": 25,
    "discount_amount": 125000,
    "final_price": 375000,
    "formatted_final_price": "Rp 375.000",
    "formatted_savings": "Rp 125.000"
  }
}
POST /api/v1/calculators/profit

7. Kalkulator Keuntungan & Margin

Kalkulasi profit bersih, persentase profit margin, markup dari modal, penentuan harga jual target margin, dan analisis keuntungan diskon.

Request Parameters

Parameter Tipe Status Keterangan
operation string Wajib profit, margin, markup, price_from_margin, price_from_markup, profit_after_discount, target_profit.
cost_price numeric Wajib Harga modal / HPP barang (Rupiah, min: 0).
selling_price numeric Sesuai mode Harga jual barang (Rupiah).
target_margin numeric Sesuai mode Target profit margin (0 - < 100%). Alias: target_margin_percentage.
curl -X POST "https://hitungku.cloud/api/v1/calculators/profit" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"price_from_margin\",
  \"cost_price\": 120000,
  \"target_margin\": 35
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "cost_price": 120000,
    "target_margin": 35,
    "selling_price": 184615,
    "profit_amount": 64615,
    "markup_percentage": 53.85,
    "formatted_selling_price": "Rp 184.615"
  }
}
POST /api/v1/calculators/hpp

8. Kalkulator HPP (Harga Pokok Penjualan)

Perhitungan biaya produksi unit (`basic`, `production`), biaya operasional, kemasan, penetapan harga jual HPP, serta komparasi skenario biaya.

Request Parameters

Parameter Tipe Status Keterangan
operation string Wajib basic, production, operating_cost, unit_cost, hpp_with_packaging, selling_price_from_hpp_margin, selling_price_from_hpp_markup, compare_hpp.
raw_material_cost numeric Sesuai mode Biaya bahan baku (Rupiah, min: 0).
labor_cost numeric Sesuai mode Biaya tenaga kerja langsung (Rupiah, min: 0).
overhead_cost numeric Sesuai mode Biaya overhead pabrik / operasional (Rupiah, min: 0).
quantity numeric Sesuai mode Jumlah unit yang diproduksi (gt: 0).
curl -X POST "https://hitungku.cloud/api/v1/calculators/hpp" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"production\",
  \"raw_material_cost\": 5000000,
  \"labor_cost\": 2500000,
  \"overhead_cost\": 1500000,
  \"quantity\": 500
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "total_production_cost": 9000000,
    "quantity": 500,
    "hpp_per_unit": 18000,
    "formatted_total_cost": "Rp 9.000.000",
    "formatted_hpp_per_unit": "Rp 18.000"
  }
}
POST /api/v1/calculators/bep

9. Kalkulator BEP (Break Even Point)

Analisis titik impas unit & nominal Rupiah (`basic`), target laba operasional (`target_profit`), batas keamanan (`margin_of_safety`), dan margin kontribusi.

Request Parameters

Parameter Tipe Status Keterangan
operation string Wajib basic, target_profit, margin_of_safety, contribution_margin, selling_price_analysis, compare_scenarios, target_units.
fixed_cost numeric Wajib Biaya tetap operasional (Rupiah, min: 0).
selling_price numeric Wajib Harga jual per unit produk (gt: 0).
variable_cost_per_unit numeric Wajib Biaya variabel per unit (< selling_price). Alias: variable_cost.
curl -X POST "https://hitungku.cloud/api/v1/calculators/bep" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"basic\",
  \"fixed_cost\": 25000000,
  \"selling_price\": 75000,
  \"variable_cost_per_unit\": 45000
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "bep_units": 834,
    "bep_revenue": 62550000,
    "contribution_margin_per_unit": 30000,
    "contribution_margin_ratio": 40,
    "formatted_bep_revenue": "Rp 62.550.000"
  }
}
POST /api/v1/calculators/tax

10. Kalkulator Pajak PPh 21 (TER 2024 & Pasal 17)

Perhitungan Pajak Penghasilan Pasal 21 Pegawai Tetap resmi mengacu pada Tarif Efektif Rata-Rata (TER) PP No. 58 Tahun 2023, PMK No. 168 Tahun 2023, serta tarif progresif UU HPP.

Request Parameters

Parameter Tipe Status Keterangan
gross_income numeric Wajib Penghasilan bruto (Rupiah, min: 0).
ptkp_status string Wajib Pilihan: TK/0, TK/1, TK/2, TK/3, K/0, K/1, K/2, K/3.
period string Opsional (default: monthly) monthly (TER masa), annual, atau december (Masa Pajak Terakhir).
method string Opsional (default: gross) Pilihan: gross (potong gaji) atau gross_up (tunjangan pajak ditanggung).
curl -X POST "https://hitungku.cloud/api/v1/calculators/tax" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"gross_income\": 12500000,
  \"ptkp_status\": \"TK/0\",
  \"period\": \"monthly\",
  \"method\": \"gross\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "gross_income": 12500000,
    "ter_category": "A",
    "ter_rate": 4,
    "monthly_tax": 500000,
    "net_income": 12000000,
    "formatted_monthly_tax": "Rp 500.000",
    "formatted_net_income": "Rp 12.000.000"
  }
}
POST /api/v1/calculators/bmi

11. Kalkulator BMI (Indeks Massa Tubuh)

Perhitungan indeks massa tubuh, kategori berat badan, rentang berat badan sehat ideal, dan rekomendasi berdasarkan klasifikasi Kemenkes RI atau WHO Internasional.

Request Parameters

Parameter Tipe Status Keterangan
weight numeric Wajib Berat badan dalam kg (10 - 350). Alias: berat.
height numeric Wajib Tinggi badan dalam cm (50 - 250). Alias: tinggi. Jika input ≤ 2.5 otomatis dianggap meter.
gender string Opsional male (pria) atau female (wanita). Alias: jenis_kelamin.
standard string Opsional (default: kemenkes) Standar batas: kemenkes (Asia-Pasifik) atau who (Global).
curl -X POST "https://hitungku.cloud/api/v1/calculators/bmi" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"weight\": 68,
  \"height\": 172,
  \"gender\": \"male\",
  \"standard\": \"kemenkes\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "BMI calculated successfully",
  "data": {
    "bmi": 22.99,
    "category": "Normal / Ideal",
    "category_badge_color": "green",
    "standard": "kemenkes",
    "standard_label": "Kemenkes RI (Standar Asia-Pasifik)",
    "healthy_weight_range": {
      "min": 54.7,
      "max": 67.8,
      "unit": "kg"
    }
  }
}
POST /api/v1/calculators/umur

12. Kalkulator Umur

Perhitungan usia kronologis presisi (tahun, bulan, hari), konversi total hari/jam hidup, hari kelahiran, hitung mundur ulang tahun berikutnya, serta shio dan zodiak.

Request Parameters

Parameter Tipe Status Keterangan
birth_date string (date) Wajib Format tanggal: YYYY-MM-DD (tidak boleh di masa depan). Alias: tanggal_lahir.
target_date string (date) Opsional (default: hari ini) Tanggal patokan perhitungan: YYYY-MM-DD (≥ birth_date). Alias: tanggal_patokan.
curl -X POST "https://hitungku.cloud/api/v1/calculators/umur" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"birth_date\": \"1998-05-15\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Calculation successful",
  "data": {
    "exact_age": {
      "years": 28,
      "months": 4,
      "days": 13
    },
    "summary_sentence": "28 tahun, 4 bulan, 13 hari",
    "total_days_lived": 10363,
    "birth_day_name": "Jumat",
    "western_zodiac": "Taurus",
    "chinese_zodiac": "Harimau"
  }
}
POST /api/v1/calculators/interest

13. Kalkulator Bunga

Perhitungan bunga tunggal (simple) dan bunga majemuk (compound), Annual Percentage Yield (APY), rincian pokok vs bunga, dan jadwal akumulasi tahunan.

Request Parameters

Parameter Tipe Status Keterangan
principal numeric Wajib Nominal pokok pinjaman atau investasi awal (≥ 0).
rate numeric Wajib Suku bunga tahunan dalam persen (contoh: 6.5).
term integer Wajib Jangka waktu pinjaman/investasi (≥ 1).
operation string Opsional (default: compound) Pilihan: compound (bunga majemuk) atau simple (bunga tunggal).
term_unit string Opsional (default: years) Satuan durasi: years atau months.
compounding_frequency string Opsional (default: annually) Frekuensi pemajemukan: annually, semi-annually, quarterly, monthly, daily.
curl -X POST "https://hitungku.cloud/api/v1/calculators/interest" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"principal\": 10000000,
  \"rate\": 6.5,
  \"term\": 3,
  \"term_unit\": \"years\",
  \"operation\": \"compound\",
  \"compounding_frequency\": \"annually\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Perhitungan bunga berhasil dilakukan.",
  "data": {
    "principal": 10000000,
    "rate": 6.5,
    "term_years": 3,
    "term_months": 36,
    "operation": "compound",
    "compounding_frequency": "annually",
    "total_interest": 2079496,
    "final_amount": 12079496,
    "apy": 6.5,
    "breakdown": [
      {"year": 1, "beginning_balance": 10000000, "interest_earned": 650000, "ending_balance": 10650000}
    ],
    "disclaimer": "Hasil perhitungan bunga ini bersifat estimasi independen..."
  }
}
POST /api/v1/calculators/savings

14. Kalkulator Tabungan

Simulasi akumulasi saldo masa depan dari setoran tabungan rutin atau kalkulasi nominal setoran yang dibutuhkan untuk meraih target dana impian.

Request Parameters

Parameter Tipe Status Keterangan
term integer Wajib Durasi waktu menabung (≥ 1).
operation string Opsional (default: future_value) future_value (hitung nilai akhir) atau periodic_deposit (hitung setoran target).
periodic_deposit numeric Wajib jika future_value Nominal setoran berkala setiap bulan atau tahun.
target_amount numeric Wajib jika periodic_deposit Target total dana yang ingin dicapai.
initial_deposit numeric Opsional (default: 0) Saldo tabungan awal yang sudah dimiliki saat ini.
interest_rate numeric Opsional (default: 0) Estimasi bunga / imbal hasil investasi tahunan dalam persen.
deposit_frequency string Opsional (default: monthly) Frekuensi setoran: monthly atau annually.
curl -X POST "https://hitungku.cloud/api/v1/calculators/savings" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"future_value\",
  \"initial_deposit\": 5000000,
  \"periodic_deposit\": 1000000,
  \"interest_rate\": 5.0,
  \"term\": 3,
  \"term_unit\": \"years\",
  \"deposit_frequency\": \"monthly\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Perhitungan rencana tabungan berhasil dilakukan.",
  "data": {
    "operation": "future_value",
    "initial_deposit": 5000000,
    "periodic_deposit": 1000000,
    "interest_rate": 5.0,
    "term_months": 36,
    "total_principal_invested": 41000000,
    "total_interest_earned": 3747120,
    "future_value": 44747120,
    "breakdown": [
      {"year": 1, "total_deposits": 17000000, "ending_balance": 17402518}
    ],
    "disclaimer": "Hasil rencana tabungan ini bersifat simulasi edukatif..."
  }
}
POST /api/v1/calculators/zakat

15. Kalkulator Zakat

Perhitungan kewajiban zakat penghasilan (profesi) dan zakat harta (maal) berdasarkan nisab 85 gram emas sesuai fatwa MUI dan BAZNAS.

Request Parameters

Parameter Tipe Status Keterangan
operation string Opsional (default: income) income (zakat profesi) atau maal (zakat harta simpanan).
monthly_income numeric Kondisional (income) Penghasilan bruto bulanan (gaji pokok / omzet).
other_monthly_income numeric Opsional Penghasilan tambahan bulanan (bonus/tunjangan).
monthly_debt_or_basic_need numeric Opsional Pengeluaran kebutuhan pokok bulanan / cicilan hutang.
cash_and_savings numeric Kondisional (maal) Saldo uang tunai, tabungan, dan deposito bank.
gold_silver_value numeric Opsional (maal) Nilai emas, perak, dan logam mulia yang disimpan.
gold_price_per_gram numeric Opsional (default: 1.400.000) Harga emas murni per gram untuk patokan nisab syariah.
curl -X POST "https://hitungku.cloud/api/v1/calculators/zakat" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"operation\": \"income\",
  \"monthly_income\": 12000000,
  \"other_monthly_income\": 0,
  \"monthly_debt_or_basic_need\": 0,
  \"gold_price_per_gram\": 1400000,
  \"period\": \"monthly\"
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Perhitungan zakat berhasil dilakukan.",
  "data": {
    "operation": "income",
    "net_amount": 12000000,
    "nisab_threshold": 9916667,
    "gold_price_per_gram": 1400000,
    "is_nishab_reached": true,
    "rate_percent": 2.5,
    "zakat_due": 300000,
    "calculation_period": "monthly",
    "status": "wajib_zakat",
    "disclaimer": "Kalkulator zakat ini bersifat simulasi edukatif mandiri..."
  }
}
POST /api/v1/calculators/unit-conversion

16. Kalkulator Konversi Satuan

Konversi presisi antar satuan metrik dan imperial untuk kategori panjang (length), berat (weight), luas (area), volume (volume), dan suhu (temperature).

Request Parameters

Parameter Tipe Status Keterangan
category string Wajib Kategori: length, weight, area, volume, temperature.
from_unit string Wajib Kode satuan asal (contoh: m, kg, c, ha, l).
to_unit string Wajib Kode satuan tujuan (contoh: cm, lb, f, sqft, gal).
value numeric Wajib Nilai numerik yang ingin dikonversi.
curl -X POST "https://hitungku.cloud/api/v1/calculators/unit-conversion" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  \"category\": \"length\",
  \"from_unit\": \"m\",
  \"to_unit\": \"cm\",
  \"value\": 10
}'
Contoh Respon (200 OK)
{
  "success": true,
  "message": "Konversi satuan berhasil dilakukan.",
  "data": {
    "category": "length",
    "from_unit": "m",
    "to_unit": "cm",
    "input_value": 10,
    "converted_value": 1000,
    "formatted_value": "1,000",
    "conversion_formula": "1 m = 100 cm",
    "disclaimer": "Faktor konversi didasarkan pada standar Sistem Satuan Internasional (SI)..."
  }
}
Dashboard Pengembang

Kelola & Monitor API Key Anda

Anda dapat membuat beberapa API key untuk membedakan lingkungan staging dan production, memantau riwayat latensi penggunaan, serta mencabut (revoke) kunci kapan saja melalui antarmuka dashboard developer HITUNGKU.

Tersalin ke clipboard!