Skip to main content
Enterprise feature. Contact us for access.
Crossmint’s Regulated Transfers enable you to send compliant stablecoin transfers from your treasury wallet, using the Transfer Token API. Crossmint automatically handles compliance so if the transfer doesn’t meet regulatory requirements, the call will fail.
1

Install the SDK

Run the following command to install the SDK:
npm i @crossmint/wallets-sdk
2

Get your treasury wallet

Retrieve your treasury wallet using the alias:
index.ts
import { CrossmintWallets, createCrossmint } from "@crossmint/wallets-sdk";

const crossmint = createCrossmint({
    apiKey: "<your-server-api-key>",
});

const crossmintWallets = CrossmintWallets.from(crossmint);

const treasuryLocator = "evm:smart:alias:treasury" // your treasury wallet alias

const treasuryWallet = await crossmintWallets.getWallet(treasuryLocator, {
    chain: "base-sepolia",
    signer: {type: "api-key"},
});
Create a treasury wallet if you don’t have one already here.
3

Create recipient wallet

Create a wallet for the recipient to receive funds in:
index.ts
const userLocator = "userId:johnd-123";

const wallet = await crossmintWallets.createWallet({
    chainType: "evm",
    signer: {
        type: "email",
        email: "johnd@example.com"
    },
    owner: userLocator
});

console.log(wallet.address);
4

Register recipient as user

Register the recipient as a user with Crossmint and provide the required personal data to facilitate a compliant money transfer:
const userLocator = "userId:johnd-123";

const options = {
   method: 'PUT',
   headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
   body: JSON.stringify({
       personalData: {
           firstName: "John",
           lastName: "Doe",
           dateOfBirth: "2007-01-01",
           nationality: "US"
       }
   })
};

fetch(`https://staging.crossmint.com/api/2025-06-09/users/${userLocator}/`, options)
   .then(response => response.json())
   .then(response => console.log(response))
   .catch(err => console.error(err));
5

Send regulated transfer

Send a transfer from your treasury wallet. The API will automatically check compliance requirements. If the transfer doesn’t meet regulatory requirements (e.g., missing KYC/KYB, sanctions issues, travel rule violations), the call will fail with an error.
index.ts
try {
    const { hash, explorerLink } = await treasuryWallet.send(
        userLocator,
        "usdc",
        "100"
    );
    
    console.log(`Transfer successful: ${hash}`);
    console.log(`Explorer: ${explorerLink}`);
} catch (error) {
    // The transfer will fail if compliance requirements aren't met
    // Common reasons: missing KYC/KYB, sanctions checks, travel rule violations
    console.error("Transfer failed:", error.message);
}
The transfer API automatically performs compliance checks. If the transfer fails due to compliance issues, you’ll receive an error message indicating what requirements weren’t met.

Compliance Requirements

Transfers will fail if they don’t meet regulatory requirements:
  • AML Screening: Automatic screening against sanctions lists and watchlists
  • Travel Rule Compliance: Required data exchange for cross-border transfers
  • Transaction Limits: Adherence to regulatory thresholds and limits
If a transfer fails, check the error message for specific compliance requirements that need to be addressed.

Launching in Production

For production, the steps are almost identical, but some changes are required:
  1. Create a developer account on the production console
  2. Create a production server API key on the API Keys page with the API scopes wallets.read, wallets:transactions.create, wallets:transactions.sign
  3. Replace your test API key with the production key
  4. Ensure all compliance requirements are configured for your production environment

Learn More