Calculate credit operation
Preview the cost of a transfer or revert without moving any credits. Use this to confirm amounts before calling the transfer or revert endpoints. The response shape differs between forward transfers and reverts. See the examples.
Reseller accounts only. Request access.
Number of minutes to calculate for.
Rate per minute for a forward transfer (e.g. `0.20`). Not required when `is_revert` is `true`.
Set to `true` to calculate a revert instead of a forward transfer.
curl -X POST 'https://backend.omnidim.io/api/v1/reseller/credits/calculate' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "cost_per_min": 0.2, "is_revert": false }'
{ "success": false, "my_cost": 0, "user_credit": 0, "profit": 0, "margin": 0, "reseller_balance": 0, "reseller_available_minutes": 0, "new_reseller_balance": 0, "refund_amount": 0, "deduction_amount": 0, "child_balance": 0, "child_available_minutes": 0, "new_child_balance": 0, "reseller_rate": 0, "currency_symbol": "string" }
Authorization
BearerAuth Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
Set child concurrency limit
Set the maximum number of simultaneous calls a child organization can run. Slots come from the reseller's shared pool. Increasing the limit deducts the delta from your pool and fails if you don't have enough slots. Decreasing the limit returns the delta to your pool immediately.
Transfer credits to a child
Transfer minutes from the reseller balance to a child organization. Credits are deducted from your balance immediately on success. The target organization must be a direct child of your reseller. Use the calculate endpoint first to preview the cost.
