Skip to main content

payment_queryFeeDetails - JSON-RPC Method

Description#

Returns granular fee components for a signed extrinsic, including base fee, length fee, and adjusted weight fee. This aids advanced wallets and analytics platforms in explaining ENJ fee breakdowns on Enjin Matrix.

Parameters#

ParameterTypeRequiredDescription
extrinsicstringYesSigned extrinsic in hex
blockHashstring | nullNoBlock hash context

Returns#

FieldTypeDescription
inclusionFeeobject | nullDetailed inclusion fee components (or null for fee-free extrinsics)

Request Example#

{
"jsonrpc": "2.0",
"method": "payment_queryFeeDetails",
"params": [
"0x280403000b40c006a99901",
null
],
"id": 1
}

Response Example#

{
"jsonrpc": "2.0",
"result": {
"inclusionFee": null
},
"id": 1
}

For fee-paying transactions, inclusionFee contains baseFee, lenFee, and adjustedWeightFee fields, all expressed in plancks.

cURL Skeleton#

curl https://api-enjin-matrixchain.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "payment_queryFeeDetails",
"params": ["0x280403000b40c006a99901", null],
"id": 1
}'
{
"jsonrpc": "2.0",
"result": {
"inclusionFee": null
},
"id": 1
}

Because the referenced extrinsic is fee-exempt, the inclusion fee is null. For fee-paying calls replace the payload with your signed extrinsic to inspect baseFee, lenFee, and adjustedWeightFee.

Usage Notes#

  • Combine with payment_queryInfo to present end users with both total fees and their components.
  • A null inclusion fee typically indicates the extrinsic is fee-exempt (e.g., system remarks or fuel-tank-sponsored calls).
  • Historical fee analysis should pass a specific blockHash to account for prior fee constants.