Skip to main content
Withdrawals allow you to offramp stablecoins from your treasury wallet directly to your bank account. This is the reverse of the funding process. This guide shows you how to withdraw stablecoins from your company wallet directly to your bank account.
Looking for embedded offramps for your customers? Read the Offramp guide.
Treasury offramps are designed for company-owned wallets. They:
  • Work with treasury wallets managed in the Crossmint Console or API
  • Do not require per-user KYC, since the business is the verified entity
  • Can be initiated programmatically via the Create Order API

Offramp via API

  1. Contact Crossmint to register a bank account and obtain the paymentMethodId.
  2. Initiate a stablecoin transfer from your treasury wallet to a bank account using the Create Order API.
const serverApiKey = process.env.CROSSMINT_SERVER_SIDE_API_KEY;
const payerAddress = "YOUR_TREASURY_WALLET_ADDRESS";
const paymentMethodId = "YOUR_PAYMENT_METHOD_ID";
const amount = "100";

const response = await fetch(
    "https://www.crossmint.com/api/2022-06-09/orders",
    {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            "x-api-key": serverApiKey,
        },
        body: JSON.stringify({
            payment: {
                method: "base",
                currency: "usdc",
                payerAddress: payerAddress,
            },
            recipient: {
                paymentMethodId: paymentMethodId,
            },
            lineItems: [
                {
                    currencyLocator: "fiat:usd",
                    executionParameters: {
                        mode: "exact-in",
                        amount: amount,
                    },
                },
            ],
        }),
    }
);

const data = await response.json();
console.log(data);
curl --request POST \
  --url 'https://www.crossmint.com/api/2022-06-09/orders' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_SERVER_SIDE_API_KEY' \
  --data '{
    "payment": {
      "method": "base",
      "currency": "usdc",
      "payerAddress": "YOUR_TREASURY_WALLET_ADDRESS"
    },
    "recipient": {
      "paymentMethodId": "YOUR_PAYMENT_METHOD_ID"
    },
    "lineItems": [
      {
        "currencyLocator": "fiat:usd",
        "executionParameters": {
          "mode": "exact-in",
          "amount": "100"
        }
      }
    ]
  }'
import os
import requests

server_api_key = os.getenv("CROSSMINT_SERVER_SIDE_API_KEY")
payer_address = "YOUR_TREASURY_WALLET_ADDRESS"
payment_method_id = "YOUR_PAYMENT_METHOD_ID"
amount = "100"

url = "https://www.crossmint.com/api/2022-06-09/orders"
headers = {
    "Content-Type": "application/json",
    "x-api-key": server_api_key,
}
payload = {
    "payment": {
        "method": "base",
        "currency": "usdc",
        "payerAddress": payer_address,
    },
    "recipient": {
        "paymentMethodId": payment_method_id,
    },
    "lineItems": [
        {
            "currencyLocator": "fiat:usd",
            "executionParameters": {
                "mode": "exact-in",
                "amount": amount,
            },
        },
    ],
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)
Replace YOUR_TREASURY_WALLET_ADDRESS with your company wallet address and YOUR_PAYMENT_METHOD_ID with the payment method ID provided by your CSE contact.

How It Works

After the withdrawal is initiated:
  • Stablecoins are debited from your treasury wallet
  • Crossmint converts them into the selected fiat currency
  • Funds are sent to your bank account through the selected rail, such as ACH, RTP, or SEPA
  • You can track status in the Console or by polling the order status endpoint

Monitor Withdrawal Status

You can track the status of your withdrawal by polling the order status endpoint:
const apiKey = process.env.CROSSMINT_SERVER_SIDE_API_KEY;
const orderId = "YOUR_ORDER_ID";

const response = await fetch(
    `https://www.crossmint.com/api/2022-06-09/orders/${orderId}`,
    {
        method: "GET",
        headers: {
            "Content-Type": "application/json",
            "x-api-key": apiKey,
        },
    }
);

if (!response.ok) {
    throw new Error(`Failed to get order: ${response.status} ${response.statusText}`);
}

const data = await response.json();
console.log(data);
API_KEY="YOUR_SERVER_SIDE_API_KEY"
ORDER_ID="YOUR_ORDER_ID"

curl --request GET \
  --url "https://www.crossmint.com/api/2022-06-09/orders/${ORDER_ID}" \
  --header "Content-Type: application/json" \
  --header "x-api-key: ${API_KEY}"
import os
import requests

api_key = os.getenv("CROSSMINT_SERVER_SIDE_API_KEY")
order_id = "YOUR_ORDER_ID"

url = f"https://www.crossmint.com/api/2022-06-09/orders/{order_id}"
headers = {
    "Content-Type": "application/json",
    "x-api-key": api_key,
}

response = requests.get(url, headers=headers)

if not response.ok:
    raise Exception(f"Failed to get order: {response.status_code} {response.reason}")

print(response.json())

Next Steps

Product Overview

Full offramp documentation

Payment Schemes

Supported payment methods and schemes

Offramp Quickstart

Get started with the Offramp API