Ask Kevin is smarter.
OmniDimension
Reseller

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.

POST/reseller/credits/calculate
Body
4 fields
·

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
}'
Example response
synthetic
{
  "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
AuthorizationBearer <token>

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