DEV Community

Cover image for Stellar Quests Level 1: Payment
Marlon
Marlon

Posted on

1

Stellar Quests Level 1: Payment

What is a Payment?

Payments are the transfers of value from one party/person/thing to another, and they're the corner stone of all blockchains. Payments on the Stellar blockchain are theoretically no different from payments on any other blockchain.

A payment, on the Stellar blockchain, is an operation type that must be selected when building a transaction. NOTE: Don't confuse transactions with operations- a single transaction can perform many different types of operations, and can also bundle many operations into the single transaction.

How are Payments created?

Payments are created by building a transaction of operation type "Payment". This operation asks for four inputs: destination, asset, amount, and source account. The Destination is the public key of the account that will receive the payment. The Asset is the form of value one will send to the destination; this can be the native asset Lumen ($XLM), or a custom asset. NOTE: In order for a destination to receive a custom asset, they must've established a trustline for it. The Amount is the total of an asset one will send to the destination; the ratio is 1:1. The Source Account is the public key of the account that'll be making the payment; this input is optional because if the amount won't be sent by the account which has built the transaction, then the public key entered here will refer to the account that will send the amount. NOTE: All transactions MUST be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is actually making the payment.

I plan on writing corresponding blog posts with relevant code examples. For now, I'm simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: https://quest.stellar.org/

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay