I'm still newbie on developing simple app using Stellar JS SDK(node.js) and I read their docs. I've created an asset using this code

var asset = new StellarSdk.Asset('USD', issuingKeys.publicKey());

and also I did issuing the account using this code

var issuingKeys = StellarSdk.Keypair.fromSecret('SCZANGBA5YHTNYVVV4C3U252E2B6P6F5T3U6MM63WBSBZATAQI3EBTQ4');
var transaction = new StellarSdk.TransactionBuilder(issuer)
            destination: receiverPublicKey,
            asset: "USD",
            amount: "1.0000000"

Now, is there a way that we can move the asset 'USD' from one Stellar account to another Stellar account ? Any inputs from you guys would greatly appreciated. Thanks.

  • It seems that you are trying to do a "payment" operation on the asset "USD" from "issuer" to "receiver", which looks totally fine. Do you mean your code not working or what do you mean?
    – cesarm
    Jun 25, 2018 at 6:22
  • 1
    When you say payment operation that means we are moving or transferring the asset to another account? Additional specs of my app is that the responsible for handling the payment should use the "coinbase payment method" for some reasons. So I'm confused should we use the payment operation in Stellar? And at the same time also use the coinbase payment method, does it make sense? Jun 25, 2018 at 6:37
  • 1
    "Payment" means "transfer" in Stellar, for both XLM and tokens (i.e. assets). Be reminded that the recipient must "trust" the token before someone sends it to him.
    – cesarm
    Jun 25, 2018 at 7:00

2 Answers 2


What you did in the above code was actually transfer the USD assets using a payment operation. In stellar you can do payment using native and as well as assets. As you handling the payment in a different place you can use the transfer operation to handle the asset part.

(payment means there should be two things or services need to be involved. hear if you perform only payment operation that means actually your transferring not paying.)

Or if you want to still make the payment using stellar then you can use multi sign transaction or manage offer to make the payment in stellar chain.


Firstly the destination account needs to create trustline with the USD asset. You can read more about what is stellar trustline here


After the destination has trustline then only you can send the USD asset.

In the above code, I don't see the id of USD asset issuer which is incorrect and your transaction will not succeed without it.

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.