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 '{ "user_id": 1234, "region": "IN", "name": "Demo User", "email": "demo@example.com", "phone": "+919876543210" }'
{ "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/jsonResponse Body
application/json
