Skip to main content

Prerequisites

  • Wallet: Create a wallet to transfer from.
  • Signer: The signing wallet must be registered as a signer on the wallet. You can do this at wallet creation by passing signers, or afterward by adding a signer.
  • Test Tokens: Fund your wallet with USDXM testnet tokens before transferring.
  • API Key: Get an API key with the wallets:transactions.create scope. In staging, all scopes are included by default.

What is a token transfer?

A token transfer moves a token from one wallet address to another onchain. This creates an onchain transaction that costs gas, which Crossmint handles for you. Once the blockchain confirms the transaction, the transfer is final and cannot be reversed.

Sending tokens

See the React SDK reference for more details.
See the API reference for all supported locator formats.

Verify your transfer

Once the transfer completes, you can verify it in two ways:
  1. View the onchain transaction using the explorerLink returned by the send method:
  1. Check the recipient’s balance programmatically using the check balances API.

Retry Transfers Safely

Add an x-idempotency-key header when you create a transfer from your server. If you retry the request with the same key, Crossmint returns the original transaction instead of creating a second one. The key identifies your request. It is not the transaction ID.
1

Create a key

Create a new UUID for each transfer and store it with the transfer in your system. Send it with the request.
2

Retry with the same key

If the request times out or returns a 5xx error, send the same request with the same key. A new key creates a new transfer.
3

Save the transaction ID

Save the id from the response. Use Get Transaction to check the status of the transfer.

Retry Limitations

  • A retry does not restart a transaction. You get the transaction in its current status. A failed transaction stays failed, and an awaiting-approval transaction still needs approval. To try again, use a new key.
  • The request body is not compared. If you reuse a key with a different amount or recipient, Crossmint returns the original transaction.
  • Keys apply to the whole project and do not expire. A key covers all wallets in the project, on both the Transfer Token and Create Transaction endpoints.
  • Responses do not include the key. You cannot look up a transaction by key, so save the transaction id.
On Stellar, a transaction expires if it is not approved before the ledger in onChain.expiration, about 8 minutes after it is created. An expired transaction keeps the awaiting-approval status. If you submit an approval for it, Crossmint returns a 422 error and sets the status to failed.

Next steps

Monitor transfers with webhooks

Track transactions and receive completion notifications

How to check wallet balances

Query token balances across your wallets

Test the Transfer Tokens API

Try out the API in the interactive playground