Transfer NFTs via API: Steps, Parameters and Pitfalls
How an NFT transfer API works: ownership checks, request parameters, gas, signing, confirmation and common errors, with ERC-721 examples for Ethereum and Tron.
Reviewed by Maurice Sobiera

An NFT transfer API lets your backend move a token between wallets with one HTTP request. It checks ownership, builds the call for the token standard, signs and broadcasts the transaction, and reports the result. Every transfer is still an on-chain transaction, and the sender pays the fee.
This guide walks through each step, the parameters a request needs, and the errors that cost developers the most time.
TL;DR
- An NFT transfer changes the owner recorded in a token contract. On Ethereum-style chains it is a call to
transferFromorsafeTransferFrom; on Solana it is a token or Metaplex instruction. - A request needs four things: the sender wallet, the recipient address, the contract (or mint) address, and the token ID. ERC-1155 also needs an amount.
- Check ownership before you send, estimate fees before you sign, and confirm success from the chain (receipt and Transfer event), not from the HTTP response alone.
- The most common failures are wrong chain, recipient contracts that cannot receive NFTs, missing native gas and stale ownership.
- An API removes the per-chain plumbing. Chaingateway sends ERC-721, BEP-721 and TRC-721 transfers and offers webhooks for confirmation, so you do not poll. It has no ERC-1155 endpoint and no Solana NFT endpoint.
What does an NFT transfer API do?
An NFT is a record in a smart contract (or, on Solana, a token account) that says which address owns which token. Transferring it means changing that record, and only the owner or someone the owner has authorized can do that.
The ERC-721 standard defines this at the contract level. Each token is identified by a token ID, and a transfer moves ownership from one address to another when it is initiated by the owner, an approved address or an operator. The contract then emits a Transfer event, which is the signal most indexers and notification systems listen for.
An API sits on top of that. A good one handles five jobs for you:
- Ownership verification: confirm the sending wallet currently owns the token.
- Call construction: encode the right function for the standard and chain.
- Fee estimation: work out gas or network fees and check the wallet can pay them.
- Signing and broadcasting: sign with the wallet’s key and submit the transaction.
- Status reporting: return a transaction hash and tell you when the transfer is final.
The alternative is running your own node, holding web3 libraries per chain and writing the encoding yourself. That works for one chain and one collection. It gets expensive when you add a second network.
Which NFT standards and chains can a transfer API cover?
Not every NFT is the same kind of object, so an API must speak more than one dialect.
| Standard / model | Chains | How transfer works |
|---|---|---|
| ERC-721 | Ethereum, Polygon, Arbitrum and other EVM chains | One token ID per token; transferFrom or safeTransferFrom |
| ERC-1155 | Ethereum and EVM chains | Multi-token contract; transfer includes an amount per token ID, with batch transfers |
| SPL token with supply one + Metaplex metadata | Solana | Token program transfer; metadata stored separately |
ERC-1155 is worth a closer look if you handle game items or tickets. One contract holds both fungible and non-fungible types, its interface includes single and safe batch transfers, and each transfer carries an amount for the token ID. A token with a supply of one behaves as a classic NFT, but an edition with a supply of 500 is a different case: you must send an amount, not just an ID.
Solana works differently. It does not typically deploy a separate contract per collection. NFTs are tokens from the Token Program with a supply of one, and Metaplex Token Metadata holds the NFT details. So on Solana you transfer by mint address, not by contract plus token ID, and the recipient needs a token account for that mint.
When you evaluate any provider, ask which of these three models it supports on which chains. Chaingateway’s OpenAPI file lists these NFT endpoints:
| Chain | Endpoint | Standard |
|---|---|---|
| Ethereum | POST /api/v2/ethereum/transactions/erc721 | ERC-721 |
| Polygon | POST /api/v2/polygon/transactions/erc721 | ERC-721 |
| Arbitrum | POST /api/v2/arbitrum/transactions/erc721 | ERC-721 |
| BNB Smart Chain | POST /api/v2/bsc/transactions/bep721 | BEP-721 |
| Tron | POST /api/v2/tron/transactions/trc721 | TRC-721 |
There is no ERC-1155 endpoint. On Solana, POST /api/v2/solana/transactions/SPL sends fungible SPL tokens and does not cover NFT metadata or edition handling, so check your collection against it before you rely on it.
How do you transfer an NFT through an API, step by step?
The flow is the same regardless of provider. What differs is how much of it you write yourself.
1. Verify ownership
Before building a transaction, confirm the sender actually owns the token. For ERC-721 this means asking the contract who owns the token ID. For ERC-1155 it means checking the balance of that ID for the address. For Solana, check the token account holding the mint.
Do this immediately before sending, not from a cached database row. NFTs can be sold or moved in the seconds between your last sync and your request, and a transfer from a wallet that no longer owns the token will simply fail and still cost fees in some failure modes.
2. Check authorization
The standard allows the owner, an approved address or an operator to initiate a transfer. If your service moves NFTs out of user-owned wallets that you do not control, you need an approval first. If your service holds the keys for wallets it created (as in custodial flows), the sending wallet is the owner and no approval is needed.
3. Build and estimate
Choose the function and encode the arguments. Then estimate the fee. On EVM chains that means a gas limit multiplied by a gas price; on Solana it is a small per-signature fee plus, possibly, rent for a new token account. The Chaingateway endpoints take optional gas, gasprice, maxFeePerGas and maxPriorityFeePerGas fields, and the EVM chains have a GET .../gasprice endpoint. Avoid a hard-coded gas limit, because it fails when the recipient is a contract with extra logic. Test on a testnet what a request costs without those fields.
Also confirm the wallet holds enough of the native coin. An address with ten NFTs and zero ETH cannot move any of them.
4. Sign and broadcast
The transaction must be signed by the owner’s private key. Either you sign locally and submit the raw transaction, or the API signs for a wallet it manages. Managed wallets are simpler for backend flows, since your servers never handle raw keys.
5. Confirm
A transaction hash means the network accepted your submission, not that the transfer succeeded. Wait for a receipt showing success, and for the Transfer event with the expected sender, recipient and token ID. For high-value NFTs, wait for several confirmations before you update your own database or release anything in exchange.
What does a transfer request need?
Whatever the provider’s field names, the request carries the same information.
| Parameter | Why it is needed | Notes |
|---|---|---|
| Chain / network | The same address exists on many EVM chains | Mainnet vs testnet is the first thing to check when a token “vanishes” |
| Sender wallet | Identifies who signs and pays | Must own the token and hold native gas |
| Recipient address | Destination | Validate format and checksum; never accept free text without checks |
| Contract or mint address | Identifies the collection | Contract on EVM, mint on Solana |
| Token ID | Identifies the individual token | Not used on Solana, where the mint is the token |
| Amount | Quantity to move | Required for ERC-1155; one for ERC-721 |
| Fee settings | Gas limit and price, or priority fee | Let the API estimate unless you have a reason not to |
| Idempotency or reference | Prevents double sends on retry | Store your own reference against the transaction hash |
That last row matters more than it looks. If your request times out, you do not know whether the transaction was broadcast. Retrying blindly can send a second transaction, which for a unique NFT will simply fail, but for an ERC-1155 edition can move extra copies. Look up the earlier attempt first.
How do you estimate and pay NFT transfer fees?
On EVM networks the sender pays gas in the chain’s native coin, and the cost varies with network congestion and the complexity of the call. A plain transferFrom is cheap compared with a mint or a marketplace sale, but a recipient contract with a heavy receiver function can raise it.
Practical rules:
- Estimate immediately before sending and add a modest buffer instead of using a fixed number.
- Keep a minimum native balance on every wallet that sends NFTs, and alert when it drops below it.
- If you transfer on behalf of users, decide up front who pays: you (top up the wallet) or the user (deduct from a balance). Surprises here become support tickets.
- On Solana, remember the recipient may need a new token account, which has a one-time cost.
How do you secure NFT transfers?
NFT transfers are irreversible. There is no chargeback and no support desk on-chain, so the safeguards live in your code.
Protect the signing path. Authenticate every API call. Chaingateway uses a bearer token in the Authorization header, as defined in RFC 6750. Keep the token in a vault, rotate it, and never ship it in a browser or mobile app. Wallets created with a password store the key encrypted on Chaingateway’s side. Wallets without a password return the private key at creation, and you must keep it safe yourself.
Validate the recipient. Check address format and chain. Offer a confirmation step for high-value items. Where policy requires it, screen addresses before sending.
Mind receiver contracts. The ERC-721 specification describes safeTransferFrom as calling onERC721Received on a contract destination and reverting if the return value is wrong. This protects you from locking a token in a contract that cannot move it. The plain transferFrom leaves that check to the caller. The Chaingateway API reference does not say which of the two functions its ERC-721 endpoint calls, so test a transfer to a contract address on a testnet before you rely on either behaviour.
Limit exposure. Keep a hot wallet with only the NFTs needed for near-term transfers and the rest in a more restricted wallet. Apply per-request and daily limits in your own layer.

Log everything. Record who requested the transfer, the parameters, the hash and the result. When a customer disputes a transfer, the chain proves what happened, and your logs prove who asked for it.
What do common NFT transfer errors mean?
| Symptom | Likely cause | Fix |
|---|---|---|
| Transaction reverts | Sender does not own the token, or is not approved | Re-check ownership and approval just before sending |
| Reverts only for some recipients | Recipient is a contract without a receiver function | Use another address, or confirm the contract supports NFTs |
| ”Insufficient funds” | No native coin for fees | Top up the sending wallet |
| Transaction stuck pending | Gas price too low or nonce gap | Replace with a higher fee using the same nonce |
| Token not visible at recipient | Wrong network, or metadata not refreshed | Verify the chain and the Transfer event; wallets may cache |
| Wrong quantity moved | ERC-1155 amount mishandled | Always pass an explicit amount and verify the balance afterward |
Most of these are caught by two habits: checking ownership and balance first, and treating the on-chain receipt as the only proof of success.
How do you confirm transfers with webhooks instead of polling?
Polling a transaction hash every few seconds works in a prototype and wastes requests in production. With webhooks the provider calls your endpoint when a matching transfer is seen. In Chaingateway you register a webhook with type set to ERC721 (or TRC721, BEP721) and a contractaddress, plus a from or to address filter. The notification carries from, to, contractaddress, tokenid, txid and blocknumber.
Verify the X-Signature header, respond quickly and process events idempotently. Failed notifications are not retried automatically, so check the failed-notifications list too. The signature covers only the txid, so check the token ID and recipient against your own records. If you want to understand what such events look like at the log level, our walkthrough of the ERC-20 Transfer event covers the structure and topics. The ERC-721 event follows the same pattern with the token ID indexed.
How do you send an NFT with Chaingateway?
Send one request per token. The Ethereum request needs the sending address, the recipient, the collection’s contract address and the token ID. For a wallet created with a password, add password; for a wallet whose key you manage, add privatekey:
curl -X POST https://app.chaingateway.io/api/v2/ethereum/transactions/erc721 \ -H "Authorization: Bearer $CHAINGATEWAY_TOKEN" \ -H "X-Network: testnet" \ -H "Content-Type: application/json" \ -d '{ "from": "0xSenderAddress", "to": "0xRecipientAddress", "contractaddress": "0xCollectionContract", "tokenId": 7, "password": "wallet-password" }'The header X-Network: testnet selects Sepolia. Remove it for mainnet. A success returns status 201. A wrong wallet password returns 401 with “Wrong password provided”. An empty fee balance returns 422 with the node’s message, for example insufficient funds for gas * price + value.
The Tron request differs in two ways, and the difference is a common source of bugs. The field is tokenid in lower case, and the request also requires amount:
curl -X POST https://app.chaingateway.io/api/v2/tron/transactions/trc721 \ -H "Authorization: Bearer $CHAINGATEWAY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from": "TSenderAddress", "to": "TRecipientAddress", "contractaddress": "TCollectionContract", "tokenid": 7, "amount": 1, "password": "wallet-password" }'For broader context on where each kind of provider fits, see our comparison of blockchain API types. The Blockchain API page and the Ethereum API page cover the rest of the endpoints.
Plans start at €49 per month (Plus), with Pro at €99, Premium at €249 and Enterprise at €499 per month. Annual billing is €490, €990, €2,490 and €4,990 respectively. The 7-day free trial needs no card and no KYC. See the pricing page for what each plan includes.
What should you check before launch?
Before you let real users trigger NFT transfers, run through this list on a testnet first:
- Transfer a token you own to a normal wallet and confirm the receipt and the
Transferevent. - Transfer to a contract that cannot receive NFTs and confirm your code surfaces the failure.
- Attempt a transfer from a wallet with no native coin and confirm the error is clear.
- Send the same request twice and confirm your idempotency check stops the second.
- Kill your webhook endpoint for a minute, restore it and confirm events are not lost or double-processed.
- Review who can call the endpoint, with what limits, and where the secret is stored.
Sources
- ERC-721: Non-Fungible Token Standard
- ERC-1155: Multi Token Standard
- Non-fungible tokens (NFT), ethereum.org
- Token Metadata, Metaplex documentation
- RFC 6750: The OAuth 2.0 Bearer Token Usage
Recommended
Frequently asked questions
Yes. A hosted blockchain API connects to the nodes for you, builds and broadcasts the transaction and returns the hash. You still need to manage the wallet’s keys or use a managed wallet, and keep native coin available for fees.
Both change ownership under ERC-721. The safe version also checks that a contract recipient implements the receiver interface and reverts otherwise, which prevents tokens from getting stuck, according to the ERC-721 specification. For automated flows, the safe version is usually the better default.
Yes, in practice. ERC-1155 transfers carry an amount per token ID and support batch transfers, as the ERC-1155 standard describes. Your request must include the quantity, and you should verify the balance afterward. Chaingateway has no ERC-1155 endpoint, so such transfers need your own contract calls.
Check the transaction receipt for success and look for the matching Transfer event with the right sender, recipient and token ID. A webhook can deliver that to your backend as soon as it is mined, so you do not need to poll.
Not by you. Only the new owner can send it back. That is why you should validate addresses, confirm the chain and add a confirmation step for valuable tokens before sending.
Ready to build this yourself? Get your API key — 7-day trial, no card required — or see the Blockchain API for the full endpoint reference.