Billing
Plans, the rial wallet, top-ups, usage, invoices and tax details. Amounts in rials.
/v1/pricingThe public price list#
Plans, per-meter rials and the limits the platform enforces, from the dated price book. Cache-Control: public, max-age=300, with an ETag (If-None-Match gives 304). CORS: Access-Control-Allow-Origin * for GET. Pro is per developer seat (owner, admin, developer) per month, each seat's fee back as usage credit; a seat added mid-month pays the days left.
- Credential
- None
Response
200Pricing
effective_fromstring (date)requiredcurrencystringrequiredone of
IRRvat_percentnumbergrace_hoursnumberplansPublicPlan[]requiredidstringrequiredone of
hobby,pro,enterpriseseat_fee_per_monthintegerrials per seat per month
usage_creditintegerrials per seat per month
per_seatbooleantrue for Pro
max_seatsinteger | null1 for Hobby; null for Pro
seat_rolesstring[]Pro: the roles that take a seat
free_rolesstring[]Pro: the roles that do not
prorationstringPro: daily, a seat added mid-month pays the days left
one of
dailyoveragebooleanfalse: the plan stops at its included amounts
spend_budget_defaultinteger | nullrials (1 toman = 10 rials)
limitsPlanLimitsdb_history_hoursintegerdb_branches_per_databaseintegerdb_backups_per_databaseintegercrons_per_projectintegercache_max_memory_mbintegerdeploy_static_filesintegerstatic files in a deployment
deploy_file_bytesintegerone static file, bytes
deploy_static_bytesintegerall static files of a deployment, bytes
deploy_function_bytesintegerthe function's code, compressed, bytes
run_function_copiesintegercopies of one function a server runs at once (D117); past them a request queues about 1 s, then 429 with Retry-After 1
custombooleanenterprise: priced by contract
metersobject[]requiredmeterstringrequiredlabelstringunitstringrequiredlabel_fastring | nullunit_fastring | nullrialsintegerrequiredper unit, rounded as an invoice's unit price
includedobjecthobbynumberpronumber
Errors
| Status | Description |
|---|---|
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/pricing"/v1/billingPlan, state and wallet#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200Billing
planstringrequiredone of
hobby,prostatestringrequiredgrace_untilstring (date-time) | nullcurrencystringrequiredone of
IRRbalanceintegerrequiredrials (1 toman = 10 rials)
periodstringrequireda Jalali month, YYYY-MM, e.g. 1405-08
pattern
^\d{4}-\d{2}$usage_this_periodintegerrials (1 toman = 10 rials)
seatsintegermembers that take a developer seat (owner, admin, developer)
seatobjectrolesstring[]maxinteger | null1 on Hobby; null on Pro
paid_this_periodintegerseats paid this month; removed and demoted ones stay paid to its end
free_nowintegerpaid seats no member uses: the next one added is free
next_seatobject | nullPro: what one more seat costs now when none is free
amountintegerrials (1 toman = 10 rials)
vatintegerrials (1 toman = 10 rials)
totalintegerrials (1 toman = 10 rials)
daysintegerperiod_daysintegerfull_monthboolean
usage_creditobject | nullPro: the month's seats' credit
totalintegerrials (1 toman = 10 rials)
leftintegerrials (1 toman = 10 rials)
spendobject | nulllimitintegerrials (1 toman = 10 rials)
pausebooleanusedintegerrials (1 toman = 10 rials)
burn_per_dayintegerrials (1 toman = 10 rials)
days_leftinteger | nullplansobjectproobjectper seat
per_seatbooleanseat_per_monthintegerrials (1 toman = 10 rials)
usage_creditintegerrials (1 toman = 10 rials)
payment_methodsobject[]the ways a top-up can be paid
idstringrequiredgoes in a top-up's method
labelstringrequiredfor people, e.g. card payment
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing" \
-H "Authorization: Bearer $KEY"/v1/billing/pricesThe price book#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200Prices
toman_per_usdnumbervat_percentnumberpricesPrice[]requiredmeterstringrequiredlabelstringunitstringrequiredlabel_fastring | nullPersian
unit_fastring | nullPersian
usdnumberrialsintegerrequiredper unit
includedobjecthobbynumberpronumber
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/prices" \
-H "Authorization: Bearer $KEY"/v1/billing/usageUsage and cost per meter for a month#
Database compute is sold by the compute-hour.
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
periodstringqueryJalali month; default this month
pattern
^\d{4}-\d{2}$
Response
200BillingUsage
periodstringrequireda Jalali month, YYYY-MM, e.g. 1405-08
pattern
^\d{4}-\d{2}$metersMeterUsage[]requiredmeterstringrequiredlabelstringunitstringlabel_fastring | nullPersian
unit_fastring | nullPersian
quantitynumberincludednumberbillablenumberamountintegerrequiredrials (1 toman = 10 rials)
notestring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_period |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/usage" \
-H "Authorization: Bearer $KEY"/v1/billing/usage/historyUsage over time, for charts#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
granularitystringqueryday (default): each day of a month up to today; month: each of the last months
one of
day,monthperiodstringqueryday: the Jalali month, default this one
pattern
^\d{4}-\d{2}$monthsintegerquerymonth: how many, 1-24, default 12
1–24
meterstringquerymeters to keep (comma list)
Response
200UsageHistory
granularitystringrequiredone of
day,monthperiodstringa Jalali month, YYYY-MM, e.g. 1405-08
pattern
^\d{4}-\d{2}$metersobject[]requiredmeterstringrequiredlabelstringrequiredunitstringrequiredlabel_fastring | nullunit_fastring | null
pointsobject[]requiredatstringrequireda Tehran date (YYYY-MM-DD) or a Jalali month (YYYY-MM)
totalintegerrequiredrials (1 toman = 10 rials)
metersobjectrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_param, bad_period |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/usage/history" \
-H "Authorization: Bearer $KEY"/v1/billing/transactionsThe wallet ledger (newest 200)#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
transactionsTransaction[]requiredidintegerrequiredamountintegerrequiredrials (1 toman = 10 rials)
kindstringrequiredone of
topup,usage,plan_fee,vat,credit,refund,adjustmentrefstring | nullmemostring | nullcreated_atstring (date-time)balanceintegerrials (1 toman = 10 rials)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/transactions" \
-H "Authorization: Bearer $KEY"/v1/billing/paymentsTop-up payments (newest 100)#
Masked card numbers are the payer's: billing roles only.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
Response
200object
paymentsPayment[]requiredidstring (uuid)requiredmethodstringthe payment method's label
amountintegerrequiredrials (1 toman = 10 rials)
statusstringrequiredone of
created,paid,failedref_idstring | nullcard_panstring | nullmasked
errorstring | nullone of
cancelled,the payment was not completedcreated_atstring (date-time)verified_atstring (date-time) | null
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/payments" \
-H "Authorization: Bearer $KEY"/v1/billing/topupsStart a top-up#
Returns a payment page; the wallet is credited when the provider confirms.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
Request bodyapplication/json
amountintegerrequiredrials
100000–2000000000
methodstringthe id of one of
payment_methodsin GET /v1/billing; default the first
Response
200TopupCreated
paymentstring (uuid)requiredamountintegerrials (1 toman = 10 rials)
methodstringmethod_labelstringpay_urlstringrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_amount, bad_payment_method, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
| 502 | Upstream failure: psp |
Example
curl -X POST "https://api.ibel.ai/v1/billing/topups" \
-H "Authorization: Bearer $KEY" \
-d '{"amount":100000}'/v1/billing/callback/{method}Payment page redirect (not for API clients)#
Verifies the payment, credits the wallet and redirects to the dashboard.
- Credential
- None
Parameters
methodstringpathrequiredthe payment method's id
Authoritystringquerythe payment's reference
Response
302Redirect to the dashboard's billing page with ?payment=paid|failed&id=<payment>
Errors
| Status | Description |
|---|---|
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/callback/card"/v1/billing/spendSet the Pro spend budget#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Request bodyapplication/json
limitinteger | nullat least 0
pauseboolean
Response
200Spend
limitinteger | nullat least 0
pauseboolean
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_limit, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 500 | internal: an unexpected failure |
Example
curl -X PUT "https://api.ibel.ai/v1/billing/spend" \
-H "Authorization: Bearer $KEY" \
-d '{"limit":0,"pause":true}'/v1/billing/planChange plan#
Pro: the month's fee for every seat, plus VAT, now. Hobby: one seat at most; no refund.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Request bodyapplication/json
planstringrequiredone of
pro,hobby
Response
200object
planstringrequired
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_plan, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 402 | Payment required: insufficient_balance |
| 403 | Not allowed: forbidden, step_up_required |
| 409 | Conflict: seat_limit |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/billing/plan" \
-H "Authorization: Bearer $KEY" \
-d '{"plan":"pro"}'/v1/billing/tax-detailsThe buyer's tax details#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
Response
200object
tax_detailsTaxDetails | nullrequiredbuyer_typestringrequiredone of
person,companylegal_namestringrequiredup to 200 characters
national_idstringrequiredeconomic_codestring | nullpostal_codestring | nullpattern
^\d{10}$addressstring | nullup to 500 characters
updated_atstring (date-time)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/tax-details" \
-H "Authorization: Bearer $KEY"/v1/billing/tax-detailsSet the buyer's tax details#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, billing
- Step-up
- With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.
Request bodyapplication/json
buyer_typestringrequiredone of
person,companylegal_namestringrequiredup to 200 characters
national_idstringrequiredeconomic_codestring | nullpostal_codestring | nullpattern
^\d{10}$addressstring | nullup to 500 characters
updated_atstring (date-time)
Response
200object
savedboolean
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_type, bad_name, bad_national_id, bad_economic_code, bad_postal_code, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 500 | internal: an unexpected failure |
Example
curl -X PUT "https://api.ibel.ai/v1/billing/tax-details" \
-H "Authorization: Bearer $KEY" \
-d '{"buyer_type":"person","legal_name":"…","national_id":"…"}'/v1/billing/invoicesIssued invoices#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
invoicesInvoiceSummary[]requirednumberstringrequiredpattern
^\d{4}-\d{6}$periodstringrequireda Jalali month, YYYY-MM, e.g. 1405-08
pattern
^\d{4}-\d{2}$issued_atstring (date-time)netintegerrials (1 toman = 10 rials)
vatintegerrials (1 toman = 10 rials)
totalintegerrequiredrials (1 toman = 10 rials)
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/invoices" \
-H "Authorization: Bearer $KEY"/v1/billing/invoices/{number}An invoice, or preview for this month so far#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Parameters
numberstringpathrequiredinvoice number, e.g. 1405-000001, or preview
periodstringquerypreview only: Jalali month
pattern
^\d{4}-\d{2}$
Response
200Invoice
numberstring | nullrequireddraftbooleanrequiredperiodstringrequireda Jalali month, YYYY-MM, e.g. 1405-08
pattern
^\d{4}-\d{2}$issued_atstring (date-time) | nulllinesInvoiceLine[]requiredkindstringrequiredone of
usage,discount,planmeterstringdescriptionstringrequireddescription_fastringPersian (not on invoices issued before 4 Nov 2026)
quantitynumberplan lines: seats
unitstringplan lines: seat-month (the month's seats) or seat (a seat added in the month)
unit_fastringPersian
unit_priceintegerrials (1 toman = 10 rials)
amountintegerrequiredrials (1 toman = 10 rials)
credit_totalintegerdiscount line on Pro: the month's usage credit from its seats, rials
netintegerrequiredrials (1 toman = 10 rials)
vatintegerrequiredrials (1 toman = 10 rials)
totalintegerrequiredrials (1 toman = 10 rials)
statementobjectfromstring (date-time)tostring (date-time)openingintegerrials (1 toman = 10 rials)
topupsintegerrials (1 toman = 10 rials)
creditsintegerrials (1 toman = 10 rials)
chargesintegerrials (1 toman = 10 rials)
closingintegerrials (1 toman = 10 rials)
buyerobject | nulltax details as at issue; for viewer and developer roles only buyer_type and legal_name
sellerobjectnamestringeconomic_codestringnational_idstringaddressstring
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_period |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/billing/invoices/1405-000001" \
-H "Authorization: Bearer $KEY"