Evolution SDK
Transactions

Simple Payment

Send a simple payment transaction on Cardano

Simple Payment

Sending value from one address to another is the most fundamental blockchain operation. Evolution SDK makes it straightforward: specify the recipient and amount, then build, sign, and submit.

This guide covers common payment patterns—from basic ADA transfers to payments including native tokens. You'll see how to structure amounts, handle multiple assets, and follow best practices for production applications.

Basic ADA Payment

The simplest transaction sends only lovelace (ADA's smallest unit). 1 ADA = 1,000,000 lovelace:

import { ,  } from "@evolution-sdk/evolution";

const  = ({
  : "preprod",
  : {
    : "blockfrost",
    : "https://cardano-preprod.blockfrost.io/api/v0",
    : ..!
  },
  : {
    : "seed",
    : ..!,
    : 0
  }
});

// Send 2 ADA
const  = await 
  .()
  .({
    : ..("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    : ..(2_000_000n)
  })
  .();

const  = await .();
const  = await .();
.("Transaction hash:", );

Working with ADA Amounts

Use these common conversions for clarity:

// Common ADA amounts in lovelace
const  = 1_000_000n;
const  = 500_000n;
const  = 10_000_000n;

// Calculate dynamically
const  = 2.5;
const  = ( * 1_000_000);

.(); // 2500000n

Payments with Native Tokens

Include native tokens (custom tokens or NFTs) alongside ADA. The assets object takes any asset by its policy ID + asset name:

import { ,  } from "@evolution-sdk/evolution";

const  = ({
  : "preprod",
  : {
    : "blockfrost",
    : "https://cardano-preprod.blockfrost.io/api/v0",
    : ..!
  },
  : {
    : "seed",
    : ..!,
    : 0
  }
});

// Send 2 ADA plus 100 tokens
const  = "7edb7a2d9fbc4d2a68e4c9e9d3d7a5c8f2d1e9f8a7b6c5d4e3f2a1b0c9d8e7f6";
const  = ""; // empty for fungible tokens
let  = ..(2_000_000n);
 = ..(, , , 100n);

const  = await 
  .()
  .({
    : ..("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    
  })
  .();

const  = await .();
await .();

The policy ID + asset name is concatenated into a single hex string.

Common Patterns

Using Named Variables

Make your code more readable with descriptive variable names:

const  = ..("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63");
const  = 5_000_000n;  // 5 ADA

const  = await 
  .()
  .({
    : ,
    : ..()
  })
  .();

Environment-Based Amounts

Adjust transaction values based on network or configuration:

const  = .. === "mainnet";
const  =  ? 5_000_000n : 1_000_000n;

const  = await 
  .()
  .({
    : ..("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    : ..()
  })
  .();

Best Practices

Follow these guidelines for safe, reliable payments:

  • Test on testnet first - Always verify transaction logic on preprod or preview networks before mainnet
  • Validate addresses - Check address format and network match before building transactions
  • Review fees - Inspect calculated fees in the built transaction before signing
  • Secure credentials - Use environment variables for mnemonics and API keys, never hardcode
  • Start small - Test with minimal amounts when deploying new payment logic

Next Steps