Billing
Get Plans (Public)
No authentication required.
GET /api/v1/billing/plansResponse: 200
[
{
"id": "free",
"name": "Free",
"price": 0,
"currency": "DZD",
"limits": {
"projects": 3,
"domains_per_project": 1,
"deploys_per_day": 10,
"storage_mb": 500
}
},
{
"id": "pro",
"name": "Pro",
"price": 2000,
"currency": "DZD",
"limits": {
"projects": 10,
"domains_per_project": 5,
"deploys_per_day": 50,
"storage_mb": 5120
}
}
]Upgrade Plan
Initiate an upgrade to Pro via Chargily Pay (supports EDAHABIA and CIB).
POST /api/v1/billing/upgrade
Authorization: Bearer TOKENBody:
{
"plan": "pro"
}Response: 200
{
"checkout_url": "https://pay.chargily.com/...",
"payment_id": "pay_abc123"
}Redirect the user to checkout_url to complete payment.
Get Billing Status
GET /api/v1/billing/status
Authorization: Bearer TOKENResponse: 200
{
"plan": "pro",
"status": "active",
"current_period_end": "2025-02-15T10:30:00Z",
"payment_method": "edahabia"
}Payment History
GET /api/v1/billing/payments
Authorization: Bearer TOKENWebhook (Internal)
Chargily Pay sends payment confirmations to this endpoint. Verified via HMAC SHA256 signature.
POST /api/v1/billing/webhook