I'm trying to submit a transaction that includes a payment operation. Sometimes the transaction succeeds. However, sometimes it fails. I believe this has something to do with the decimal being submitted.

Before submitting the transaction, the decimal prints as:


On failed transactions, if I browse the XDR response (via Stellar laboratory), I see a negative amount:

amount: -6.6705011 (raw: -66705011)

Any idea why this is a negative number?


Post Payment Error: Horizon request error of type request failed with message: {
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html",
  "extras": {
    "envelope_xdr": "[XDR INFO]",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB/////wAAAAA="
  • 2
    What SDK are you using. The first problem I see is that the amount has too many decimal places (7 is max). Commented May 10, 2018 at 21:41

1 Answer 1


When I pasted the decimal you posted into the stellar transaction builder I got the following error: "Amount can only support a precision of 7 decimals."

Perhaps whatever method it uses to encode decimals does not support that level of precision and fails spectacularly (underflow, overflow?).


Your Answer

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

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