Send Transactions

Send already-signed Solana transactions to the network through FlashLand. Your transaction is forwarded unchanged: nothing is added to it, reordered or re-signed.

You pay for each send with a tip inside the transaction itself (see Pay the tip inside the transaction), so a transaction that does not land costs nothing.

Endpoint

text
POST https://send.flashland.dev/v1/transactions
GET  https://send.flashland.dev/v1/health

Authentication

Every send carries your API key as a bearer token. Find the key on the Send page of your dashboard. Treat it like a password. Keep it out of logs and client code.

http
Authorization: Bearer YOUR_API_KEY

Send a transaction

The body is JSON with one field, transaction: the base64 of a fully signed legacy or versioned transaction, at most 1,232 bytes before encoding.

bash
curl -sS https://send.flashland.dev/v1/transactions \
  -H "Authorization: Bearer $SEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"transaction\":\"$TRANSACTION_BASE64\"}"
typescript
const res = await fetch("https://send.flashland.dev/v1/transactions", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.SEND_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ transaction: Buffer.from(tx.serialize()).toString("base64") }),
});
if (!res.ok) { const { error } = await res.json(); throw new Error(`${error.code}: ${error.message}`); }
console.log((await res.json()).signature);

The receipt

json
{
  "signature": "5Nx3...qT7w",
  "accepted": true,
  "duplicate": false,
  "charged_lamports": 200000,
  "balance_remaining_lamports": 49800000,
  "payment_mode": "balance"
}
FieldMeaning
signatureThe transaction signature, read from the bytes you sent.
acceptedThe send was forwarded and acknowledged. It is not a landing guarantee: confirm the signature on chain.
duplicateThe same signature was already accepted in the last 90 seconds. It is not forwarded or charged again.
charged_lamportsWhat this send reserved from your balance. It settles when the transaction lands.
balance_remaining_lamportsYour balance after this send.
payment_modebalance for a prepaid send.

Amounts are in lamports (1 SOL = 1,000,000,000 lamports) at this store's price per send.

Regional endpoints

Send from the endpoint that suits you. Every endpoint reaches the same account and the same balance; use the QUIC endpoint where you can, it is the fastest way to send.

RegionQUIC (fastest)HTTPS
Frankfurt (default)quic.flashland.dev:11000https://send.flashland.dev/v1/transactions
New Yorkquic.nyc.flashland.dev:11000https://send.nyc.flashland.dev/v1/transactions

An endpoint that is not listed is not available yet.

More examples

The same send in Python:

python
import base64, os, requests

res = requests.post(
    "https://send.flashland.dev/v1/transactions",
    headers={"Authorization": f"Bearer {os.environ['SEND_API_KEY']}"},
    json={"transaction": base64.b64encode(bytes(tx)).decode()},
    timeout=10,
)
res.raise_for_status()
print(res.json()["signature"])

Keep the connection open over HTTPS, so only the first send pays for the handshake:

typescript
import { Agent } from "undici";

const agent = new Agent({ keepAliveTimeout: 60_000, keepAliveMaxTimeout: 300_000, connections: 4, pipelining: 1 });

export async function send(tx: Uint8Array) {
  const res = await fetch("https://send.flashland.dev/v1/transactions", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.SEND_API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ transaction: Buffer.from(tx).toString("base64") }),
    // @ts-expect-error undici's dispatcher is not in the DOM fetch types
    dispatcher: agent,
  });
  if (!res.ok) { const { error } = await res.json(); throw new Error(`${error.code}: ${error.message}`); }
  return res.json();
}
python
import base64, os, requests

session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['SEND_API_KEY']}"

def send(tx: bytes):
    res = session.post("https://send.flashland.dev/v1/transactions", json={"transaction": base64.b64encode(tx).decode()}, timeout=10)
    res.raise_for_status()
    return res.json()

Pay the tip inside the transaction

Pay for a send with a SOL transfer (the tip) to the tip account, inside the transaction you sign. No deposit is needed, and a send paid this way is not charged to any balance: its receipt shows charged_lamports 0.

  • Tip account: YOUR_TIP_ADDRESS
  • Minimum: 0.0002 SOL (200000 lamports). There is no maximum; any amount at or above the minimum counts.

Step by step:

  1. Get your send address and API key from the Send page of your dashboard.
  2. Add one SOL transfer to the tip account, of at least the minimum, from a wallet that signs the transaction.
  3. Sign the transaction as usual and send it to https://send.flashland.dev/v1/transactions with your API key.
  4. Check the Send page: once the transaction is final on chain, its activity shows the tip you paid.

Rules the relay checks:

  • Exactly one transfer to the tip account in each transaction. A transaction with two is refused with INVALID_TRANSACTION.
  • A plain System Program transfer as its own instruction, not one made from inside another program.
  • The tip account in the transaction itself, not in an address lookup table. A tip the relay cannot see does not count.
  • A tip below the minimum is refused with PAYMENT_TOO_LOW and not sent, so nothing is paid.
  • A transaction without the tip is paid from your balance; with no balance it is refused with INSUFFICIENT_BALANCE.
  • If the transaction does not land, or fails on chain, the tip is not paid. Solana still takes its network fee for a failed transaction.
typescript
import { Connection, PublicKey, SystemProgram, TransactionMessage, VersionedTransaction } from "@solana/web3.js";

const TIP_ACCOUNT = new PublicKey("YOUR_TIP_ADDRESS");
const MIN_TIP = 200000; // lamports = 0.0002 SOL. You can tip more.

// 1. Your own instructions, plus ONE transfer to the tip account, signed by the payer.
const instructions = [
  ...yourInstructions,
  SystemProgram.transfer({ fromPubkey: payer.publicKey, toPubkey: TIP_ACCOUNT, lamports: MIN_TIP }),
];

// 2. Build and sign as usual. Keep the tip account out of address lookup tables.
const connection = new Connection(process.env.RPC_URL!);
const { blockhash } = await connection.getLatestBlockhash();
const message = new TransactionMessage({ payerKey: payer.publicKey, recentBlockhash: blockhash, instructions }).compileToV0Message();
const tx = new VersionedTransaction(message);
tx.sign([payer]);

// 3. Send it to your send address with your API key.
const res = await fetch("https://send.flashland.dev/v1/transactions", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.SEND_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ transaction: Buffer.from(tx.serialize()).toString("base64") }),
});
if (!res.ok) {
  const { error } = await res.json();
  throw new Error(`${error.code}: ${error.message}`); // e.g. PAYMENT_TOO_LOW
}
console.log((await res.json()).signature);
python
import base64, os, requests
from solana.rpc.api import Client
from solders.message import MessageV0
from solders.pubkey import Pubkey
from solders.system_program import TransferParams, transfer
from solders.transaction import VersionedTransaction

TIP_ACCOUNT = Pubkey.from_string("YOUR_TIP_ADDRESS")
MIN_TIP = 200000  # lamports = 0.0002 SOL. You can tip more.

# 1. Your own instructions, plus ONE transfer to the tip account, signed by the payer.
tip = transfer(TransferParams(from_pubkey=payer.pubkey(), to_pubkey=TIP_ACCOUNT, lamports=MIN_TIP))
instructions = [*your_instructions, tip]

# 2. Build and sign as usual. Keep the tip account out of address lookup tables.
blockhash = Client(os.environ["RPC_URL"]).get_latest_blockhash().value.blockhash
message = MessageV0.try_compile(payer.pubkey(), instructions, [], blockhash)
tx = VersionedTransaction(message, [payer])

# 3. Send it to your send address with your API key.
res = requests.post(
    "https://send.flashland.dev/v1/transactions",
    headers={"Authorization": f"Bearer {os.environ['SEND_API_KEY']}"},
    json={"transaction": base64.b64encode(bytes(tx)).decode()},
    timeout=10,
)
if not res.ok:
    raise RuntimeError(res.json()["error"])  # e.g. PAYMENT_TOO_LOW
print(res.json()["signature"])

Errors and retries

Any response other than HTTP 200 is an error object: {"error":{"code":"...","message":"..."}}.

HTTPCodeMeaning and what to do
400INVALID_BASE64The transaction field is not valid base64. Fix and resend.
400INVALID_TRANSACTIONThe envelope is malformed or larger than 1,232 bytes. Not charged.
401UNAUTHORIZEDNo bearer key was sent.
401INVALID_API_KEYThe key could not be decoded. Keys begin with usq_live_.
402INSUFFICIENT_BALANCENo credit left. Add SOL, then resend.
402PAYMENT_TOO_LOWThe tip inside the transaction is below the minimum. Not sent, nothing paid.
403ACCOUNT_DISABLEDThe account is switched off. Contact support.
409SUBMISSION_IN_PROGRESSThe same signature is already in flight. Wait for it; do not retry at once.
503UPSTREAM_UNAVAILABLEIt could not be forwarded. Retry with backoff; any charge is reversed.

Retrying the same signed bytes is safe: a signature accepted in the last 90 seconds is never charged twice. For the lowest latency, hold one connection open: see the QUIC guide where your store offers it, or reuse HTTPS connections.