Solana Transfer Endpoint -Documentation

Transfer SPL tokens (USDT/USDC) with optional sponsorship, or transfer SOL (non-sponsored) with fee retention.

Method: POST Content-Type: application/json Auth: None Response: JSON
Endpoint
https://solana.wsbank.cc
HTTPS Requirement
All connections to this endpoint must be made over HTTPS. Plain HTTP requests should not be used in production.
Wrapper rule (mint)
mint = "" → SOL transfer • mint != "" → SPL token transfer.
Sponsorship rule
SOL transfers cannot be sponsored. Sponsored transactions are supported only for USDT and USDC SPL tokens.

Request Body

Field Type Required Description
sponsored boolean Yes If true, attempts a sponsored SPL token transfer (USDT/USDC only). If false, sender pays the network fee.
mint string Yes SPL token mint (base58 public key). Use "" to send SOL.
fromAddress string Yes Sender wallet address (base58, 32 bytes).
toAddress string Yes Recipient wallet address (base58, 32 bytes).
fromPrivateKey string Yes Sender private key (base58/base64 64 bytes, or JSON array string with 64 integers [..]).
memo string No Optional memo text (empty string allowed).
amount number Yes Transfer amount in UI units (must be > 0).
Validation behavior
If JSON is invalid or parameters are invalid, the endpoint returns INCORRECT_PARAMETERS (HTTP 400). Unknown fields are rejected.

Supported Assets

When sponsored=true, only the mints below are accepted:

{
  "USDT": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "USDC": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}

Example Requests

1) Sponsored USDT/USDC transfer
{
  "sponsored": true,
  "mint": "MINT_USDT_OR_USDC", // EX.: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNY
  "fromAddress": "SENDER_ADDRESS",
  "fromPrivateKey": "SENDER_PRIVATE_KEY",
  "toAddress": "RECIPIENT_ADDRESS",
  "memo": "",
  "amount": 10.25
}
If mint="" (SOL) and sponsored=true, the request is rejected.
2) Non-sponsored SPL token transfer (fee retained)
{
  "sponsored": false,
  "mint": "MINT_USDT_OR_USDC", // EX.: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNY
  "fromAddress": "SENDER_ADDRESS",
  "fromPrivateKey": "SENDER_PRIVATE_KEY",
  "toAddress": "RECIPIENT_ADDRESS",
  "memo": "optional memo",
  "amount": 0.50
}
3) SOL transfer (non-sponsored, fee retained)
{
  "sponsored": false,
  "mint": "",
  "fromAddress": "SENDER_ADDRESS",
  "fromPrivateKey": "SENDER_PRIVATE_KEY",
  "toAddress": "RECIPIENT_ADDRESS",
  "memo": "",
  "amount": 0.015
}
SOL transfers are allowed only when sponsored=false.

Success Response

On success, the endpoint returns the transaction signature and the sent amount.

{
  "success": true,
  "data": {
    "tx": "TRANSACTION_SIGNATURE",
    "amount": "SENT_AMOUNT"
  }
}

Error Responses

Incorrect parameters (HTTP 400)
{
  "success": false,
  "error": {
    "code": "INCORRECT_PARAMETERS",
    "message": "Incorrect parameters.",
    "details": [
      {
        "field": "fromAddress",
        "message": "address must be a valid Solana address (base58 public key)"
      }
    ]
  }
}
Insufficient balance (HTTP 400)
{
  "success": false,
  "error": {
    "code": "NOT_BALANCE",
    "message": "The wallet does not have enough funds to complete this transaction."
  }
}
Not supported (HTTP 400)
{
  "success": false,
  "error": {
    "code": "NOT_SUPPORTED",
    "message": "Sponsored transactions are currently supported only for USDT and USDC."
  }
}
Method not allowed (HTTP 405)
{
  "success": false,
  "error": {
    "code": "METHOD_NOT_ALLOWED",
    "message": "Only POST requests are allowed."
  }
}

Notes for Integrators

  • HTTPS only (required).
  • Content-Type must include application/json.
  • Use retry with exponential backoff on RPC rate limit errors (HTTP 429).
  • If recipient lacks ATA for the mint, backend may create it (extra fee/compute) depending on implementation.
Security
This endpoint requires no authentication or IP allowlisting, stores no customer data, and processes transactions with the highest possible security, applying strict validations and anti-abuse protections to reduce risk and block attack attempts.

© 2swap.io - All rights reserved