Endpoint Finansial
Referensi lengkap untuk endpoint langganan, billing, dan manajemen kredit.
URL Dasar
https://api.govalid.org/api/v1/financial/
https://api.govalid.org/api/v1/credits/
Paket
Daftar Paket Tersedia
GET /api/v1/financial/plans/
Respons
{
"plans": [
{
"id": "free",
"name": "Free",
"price": 0,
"currency": "USD",
"billing_period": "monthly",
"features": ["Smart QR", "Analitik dasar"],
"limits": {
"qr_codes_per_month": 10,
"api_requests_per_hour": 100
}
},
{
"id": "pro",
"name": "Pro",
"price": 9.99,
"currency": "USD",
"billing_period": "monthly",
"features": ["Smart QR", "Secure QR", "Analitik lengkap", "Pembuatan massal"],
"limits": {
"qr_codes_per_month": 500,
"api_requests_per_hour": 1000
}
}
]
}
Langganan
Dapatkan Status Langganan
GET /api/v1/financial/subscription/
Respons
{
"plan": "pro",
"status": "active",
"billing_period": "monthly",
"next_billing_date": "2025-02-28",
"amount": 9.99,
"currency": "USD",
"usage": {
"qr_codes": {
"used": 150,
"limit": 500
},
"api_calls": {
"used": 4521,
"limit": 1000,
"reset_at": "2025-02-01T00:00:00Z"
}
}
}
Berlangganan Paket
POST /api/v1/financial/subscribe/
Body Request
{
"plan_id": "pro",
"payment_method": "stripe",
"billing_period": "monthly"
}
Invoice
Daftar Invoice
GET /api/v1/financial/invoices/
Respons
{
"count": 5,
"results": [
{
"id": "INV-2025-001",
"amount": 9.99,
"currency": "USD",
"status": "paid",
"date": "2025-01-28",
"pdf_url": "https://api.govalid.org/api/v1/financial/invoices/INV-2025-001/pdf/"
}
]
}
Download PDF Invoice
GET /api/v1/financial/invoices/{id}/pdf/
Kredit
Dapatkan Saldo Kredit
GET /api/v1/credits/balance/
Respons
{
"balance": 500,
"currency": "USD",
"last_topup": "2025-01-15T10:00:00Z"
}
Daftar Paket Kredit
GET /api/v1/credits/packages/
Top Up Kredit
POST /api/v1/credits/topup/
Body Request
{
"package_id": "business",
"payment_method": "stripe"
}
Verifikasi Kupon
POST /api/v1/credits/coupon/verify/
Body Request
{
"code": "SAVE20"
}
Transaksi
Daftar Transaksi
GET /api/v1/financial/transactions/
Respons
{
"count": 10,
"results": [
{
"id": "TXN-001",
"type": "subscription",
"amount": 9.99,
"currency": "USD",
"status": "completed",
"date": "2025-01-28T00:00:00Z",
"description": "Paket Pro - Bulanan"
},
{
"id": "TXN-002",
"type": "credit_topup",
"amount": 50.00,
"currency": "USD",
"status": "completed",
"date": "2025-01-15T10:00:00Z",
"description": "Top Up Kredit - Paket Business"
}
]
}
Harga
Dapatkan Info Harga
GET /api/v1/financial/pricing/
Respons
{
"qr_pricing": {
"smart": {"base_cost": 1, "currency": "credits"},
"verified": {"base_cost": 1.5, "currency": "credits"},
"secure": {"base_cost": 2, "currency": "credits"},
"enterprise": {"base_cost": 3, "currency": "credits"}
},
"bulk_discounts": [
{"min_quantity": 100, "discount": 0.10},
{"min_quantity": 500, "discount": 0.20},
{"min_quantity": 1000, "discount": 0.30}
]
}
Callback Pembayaran
Payment gateway mengirim callback untuk mengkonfirmasi transaksi:
- Stripe:
/api/v1/financial/stripe/callback/ - PayPal:
/api/v1/financial/paypal/callback/ - iPaymu:
/api/v1/financial/ipaymu/callback/
Terkait
- Paket & Harga - Perbandingan paket
- Akun & Billing - Panduan pengguna
- Autentikasi - Autentikasi API