Skip to main content
These flows are actively being refined. Crossmint’s customer success engineers (CSE) will work with you to review your architecture. Contact Crossmint to get started.

Overview

A stablecoin wallet gives your agent the ability to hold USDC and make onchain payments, including x402 payments, direct stablecoin transfers, and other crypto-native transactions. The wallet is non-custodial: the agent uses a server key signer where the secret lives in its own runtime environment. The Crossmint SDK derives chain-specific signing keys from this secret — Crossmint never has access to the private key. Funding the wallet is done through the Crossmint onramp or by sending USDC directly to your address.

What This Enables

Once a wallet is created and funded, your agent can:
  • Hold stablecoins (USDC) across Solana, EVM chains, and Stellar
  • Make x402 payments to x402-enabled APIs and services
  • Send stablecoin transfers to other wallets
  • Pay for Crossmint Checkout orders using onchain payment methods

Prerequisites

  • A Crossmint developer account
  • A server-side API key with the scopes: wallets.create, wallets.read, wallets.fund, wallets:balance.read, wallets:transactions.create, wallets:transactions.sign, wallets:transactions.read

Integration Steps

1

Generate a Signer Secret for the Agent

Each agent needs its own signer secret. Generate one using the Server Signer tool or programmatically, and store it as an environment variable:
CROSSMINT_SIGNER_SECRET=xmsk1_<your-64-hex-character-secret>
The Crossmint SDK automatically derives chain-specific signing keys from this secret, scoped to your project ID, environment, and target chain. A single secret can be safely reused across chains within a project.
2

Create the Wallet with a Server Key Signer

Use the signer secret from the previous step to create a Crossmint smart wallet. The SDK handles key derivation and address resolution automatically — Crossmint never has access to the private key.
import {
    CrossmintWallets,
    createCrossmint,
} from "@crossmint/wallets-sdk";

const crossmint = createCrossmint({
    apiKey: process.env.CROSSMINT_SERVER_API_KEY,
});
const crossmintWallets = CrossmintWallets.from(crossmint);

const wallet = await crossmintWallets.createWallet({
    chain: "base-sepolia",
    signer: {
        type: "server",
        secret: process.env.CROSSMINT_SIGNER_SECRET,
    },
});

console.log("Wallet address:", wallet.address);