Skip to main content
This feature is accessible via sendTransaction method. Gateway delivers transactions simultaneously across multiple delivery methods, maximizing transaction success rates. Effortlessly switch between delivery channels from your dashboard—no code changes or redeployments required. Once you have your optimized transaction ready along with the tip transfer included, you can now send it via the sendTransaction method.
Gateway expects a minimal tip of 50K Lamports for delivery (or based on the methods used). Please ensure your transaction includes a transfer instruction to one of our Tip destinations
(Ignore if you’re using one of our builder endpoints)

Supported Encoding Formats

Transactions are accepted in both base64 and base58 encoding formats.
base58 is being deprecated from Solana and could be removed as an acceptable encoding in the future. It it advised to use base64

Tracking Slot Latency

As we route your transaction through your chosen delivery methods, we record the slot at which each transaction is sent. This allows us to accurately calculate slot latency for your transactions. For even more precise end-to-end latency tracking from your application, you can include a startSlot value in your request body. We’ll use this value to determine the slot latency on your behalf.
We’ve recently introduced a v1 set of of APIs, and hence please note the URL below with the /v1 path parameter.

Request Example

import {
  getBase64Encoder,
  getTransactionDecoder,
  getBase64EncodedWireTransaction
} from "@solana/kit";

// Continued from `buildGatewayTransaction`...
const optimizedTxString = optimizeBody.result.transaction;
const optimizedTx = getTransactionDecoder()
    .decode(getBase64Encoder().encode(optimizedTxString));

const signedTx = await signTransaction([keyPair], optimizedTx);

const deliveryResponse = await fetch(`${GATEWAY_URL}/v1/mainnet?apiKey=${apiKey}`, {
  method: 'POST',
  headers: {'Content-Type': 'application/json'}
  body: JSON.stringify({
    id: "test-id",
    jsonrpc: "2.0",
    method: "sendTransaction",
    params: [getBase64EncodedWireTransaction(signedTx), {
        encoding: "base64",
		startSlot: 361082604
    }]
  }),
});

Response Example

The response contains results from each delivery method indexed using its URL.
type DeliveryResult = {
  result?: string; // Transaction signature
  error?: {
    code: number,
	message: string
  }
};
{
  "jsonrpc": "2.0",
  "id": "test-id",
  "result": "E7oKpwds2h4xxcrGoccrizTEVWvgu6k8u..."
}
In this example, the response includes either a result field with the transaction signature or an error field with error details.
I