Skip to main content
POST
/
v1
/
tariffs
/
calculate-fee
Calculate fee
curl --request POST \
  --url https://api.example.com/v1/tariffs/calculate-fee \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1,
  "asset": "<string>",
  "from_channel": "<string>",
  "to_channel": "<string>",
  "media": "<string>",
  "reference_id": "<string>",
  "tariff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "commit": false
}
'
{
  "tariff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tariff_name": "<string>",
  "fee_range_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fixed_fee": 123,
  "percent_fee": 123,
  "total_fee": 123,
  "method": "fixed",
  "is_fallback": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amount
number
required
Required range: x >= 0
asset
string
required
from_channel
string
required
to_channel
string
required
media
string
required
reference_id
string
required
tariff_id
string<uuid>
customer_id
string<uuid>
commit
boolean
default:false

Response

200 - application/json

Fee calculation result

tariff_id
string<uuid>
tariff_name
string
fee_range_id
string<uuid>
fixed_fee
number
percent_fee
number
total_fee
number
method
enum<string>
Available options:
fixed,
percentage,
greater,
lesser,
sum
is_fallback
boolean