I am new to stellar so please bear with my question if it sounds too basic. So, using the stellar laboratory, I created two accounts lets name 1 and 2. I funded the 1st account with test-net coins using friend-bot and left the 2nd account empty. Now as I understand that an account to be active on stellar network, it should have a minimum balance of about 1XLM. So using the transaction builder, I tried to perform a Payment Operation by trying to transfer 2XLM to the 2nd account. However I recieved the following response :

  "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": {
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+wAAAAA="

So can someone tell me which operation I need to use to send XLM to an un-initialised address so I can activate it, not by using friendbot.

2 Answers 2


The very first payment to an uninitialized account has to be performed with the createAccount operation.


The first time you're trying to send tokens to an uninitialised account, you have to use the createAccount method on Operations ie

const transaction = new StellarSdk.TransactionBuilder(senderAccount, {
    fee: feeInStroops,
    networkPassphrase, // Use the testnet passphrase
        destination: 'GCVTRT3OP3B7BJJDHHXG2UFMI76RBZDSYUDD37WUKVF2IV6TK6RRJXXN', // Replace with the recipient's public key
        asset: StellarSdk.Asset.native(), // Use Stellar Lumens (XLM)
        startingBalance: '1', // The amount to send
  • Welcome to Stellar! We've noticed you posted the same answer to four questions; please make sure your answer addresses the question in the best possible manner. See the Help Center article How to Answer.
    – Glorfindel
    Sep 4, 2023 at 17:19

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.