Friday, November 22, 2024

consumer – Bitpay check account Java SDK integration: Inadequate steadiness error when paying bill

Drawback
I arrange a Bitpay check account and loaded my Bitpay pockets with testnet BTC. Nonetheless I am seeing an in an "Inadequate funds for payment" error when paying an bill with the Bitpay Java SDK. Double checked the BTC quantity in my pockets and it is lower than your complete complete (together with the payment) and even tried manually setting the miner payment to 0 from the Bill object.

Anticipated Habits
Shopper mustn’t obtain “Inadequate funds for payment” error when opening the URL generated by the Bill.

Code

// Config file
{
  "BitPayConfiguration" : {
    "Setting" : "Take a look at",
    "EnvConfig" : {
      "Take a look at" : {
        "PrivateKeyPath" : "",
        "PrivateKey" : "xxx",
        "ApiTokens" : {
          "payout" : "yyy",
          "service provider" : "zzz"
        }
      }
    }
  }
}


// app code
    enjoyable createClient() {
        val configFilePath = ConfigFilePath("src/most important/sources/BitPay.config.json")
       bitpayClient = Shopper.createClientByConfigFilePath(configFilePath)
    }


enjoyable createInvoice(bitpayClient: Shopper) {
    var bill = Bill(0.00002, Forex.BTC)
    bill.autoRedirect = true
    bill = bitpayClient.createInvoice(bill)
    bill.merchantName = null
    bill.minerFees.btc.satoshisPerByte = 0.0
    bill.minerFees.btc.totalFee = 0

    val outcome: Bill = bitpayClient.createInvoice(bill)
}

Balances and complete due

  • testnet BTC steadiness: 0.00033
  • complete due (BTC): 0.00017439

enter image description here

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles