Skip to main content
This endpoint supports both fungible tokens and NFTs.

Prerequisites

  • Valid API key with token transfer permissions
  • Source wallet with sufficient token balance
  • Valid destination wallet address
  • Token ID (for NFTs) or amount (for fungible tokens)

Request

curl -X POST "https://api.g2cplatform.com/v2/tokens/transfer" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "fromWallet": "0xabcd1234...",
    "toWallet": "0xefgh5678...",
    "tokenId": "token_def456...",
    "tokenType": "NFT"
  }'

Request Body

ParameterTypeRequiredDescription
fromWalletstringYesSource wallet address
toWalletstringYesDestination wallet address
tokenTypestringYesType of token: “FUNGIBLE” or “NFT”
tokenIdstringConditionalRequired for NFTs. Token identifier
amountnumberConditionalRequired for fungible tokens. Amount to transfer
memostringNoOptional memo for the transaction

Response

{
  "transactionId": "tx_transfer_789...",
  "fromWallet": "0xabcd1234...",
  "toWallet": "0xefgh5678...",
  "tokenId": "token_def456...",
  "tokenType": "NFT",
  "blockchainTxId": "0xfedcba987654...",
  "status": "pending",
  "memo": "Gift transfer",
  "createdAt": "2025-01-15T11:15:00Z",
  "estimatedConfirmation": "2025-01-15T11:20:00Z"
}

Examples

Transfer NFT

{
  "fromWallet": "0xabcd1234...",
  "toWallet": "0xefgh5678...",
  "tokenId": "token_def456...",
  "tokenType": "NFT",
  "memo": "Certificate transfer"
}

Transfer Fungible Tokens

{
  "fromWallet": "0xabcd1234...",
  "toWallet": "0xefgh5678...",
  "tokenType": "FUNGIBLE",
  "amount": 100,
  "memo": "Loyalty points reward"
}

Response Fields

FieldTypeDescription
transactionIdstringUnique identifier for the transfer transaction
fromWalletstringSource wallet address
toWalletstringDestination wallet address
tokenIdstringToken identifier (for NFTs)
amountnumberAmount transferred (for fungible tokens)
blockchainTxIdstringBlockchain transaction hash
statusstringTransaction status: “pending”, “confirmed”, “failed”
createdAtstringISO 8601 timestamp of transaction creation

Transaction Status

StatusDescription
pendingTransaction submitted to blockchain, awaiting confirmation
confirmedTransaction confirmed on blockchain
failedTransaction failed (insufficient balance, invalid address, etc.)

Error Responses

Status CodeDescription
400Invalid request data or missing required fields
401Unauthorized - invalid API key
403Insufficient permissions or balance
404Token or wallet not found
409Token already transferred or locked
500Internal server error

Important Notes

  • NFT transfers require the exact tokenId
  • Fungible token transfers require sufficient balance in the source wallet
  • All transfers are recorded on the blockchain and cannot be reversed
  • Transaction fees may apply depending on network conditions