api.tx.balances.transfer(recipient, new BN(txAmount)).paymentInfo(sender) When I call paymentinfo to get a transaction fee, I got this error. Error: The transactionPaymentApi.queryInfo runtime call is not available in your environment

  • 1
    What chain are you querying?
    – Tarik Gul
    Mar 21 at 11:38
  • 1
    which version of polkadot.js are you using?
    – pepoviola
    Mar 21 at 11:59

1 Answer 1


I used 9.6.2, just upgraded the @polkadot/api to the latest version and it worked as expected. Thank you @Tarik Gul and @pepoviola

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.