Stablecoin Withdrawal

Step 1: Create a Stablecoin Withdrawal

Use the Create Withdrawal API to initiate a stablecoin withdrawal from your 1Money account to an external crypto network address. For the example, we will use USDT on the Ethereum network.

Example cURL:

curl --request POST \
     --url https://sandbox-api.1money.com/v1/portfolios/portfolio_id/withdrawals \
     --header 'X-Api-Key: 123456' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "asset": "USDT",
  "network": "ETHEREUM",
  "amount": "200",
  "country_code": "USA",
  "destination_address_id": "b0f214a9-8b35-11f0-b308-2eaa4f6974f2",
  "external_id": "0x71a6c6be0be5f28ef4ea7541749d90d9c66fec7d"
}
'

Sample Response:

(TODO: Replace with real response)

{
"withdrawalId": "wd_crypto_789xyz123abc",
  "externalId": "USDT-ETH-WD-20251006-0001",
  "currency": "USDT",
  "network": "ETHEREUM",
  "amount": "200",
  "destinationAddress": "curl --request POST \
     --url https://sandbox-api.1money.com/v1/portfolios/portfolio_id/withdrawals \
     --header 'X-Api-Key: 123456' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "asset": "USDT",
  "network": "ETHEREUM",
  "amount": "200",
  "country_code": "USA",
  "destination_address_id": "b0f214a9-8b35-11f0-b308-2eaa4f6974f2",
  "external_id": "0x71a6c6be0be5f28ef4ea7541749d90d9c66fec7d"
}
'",
  "status": "PENDING",
  "estimatedGasFee": "25.50",
  "estimatedGasPrice": "30000000000",
  "estimatedGasLimit": "65000",
  "networkConfirmations": 12,
  "createdAt": "2025-10-06T21:38:00Z",
}

Step 2: Set Up Webhook Monitoring

Configure webhook notifications to receive real-time updates about your crypto withdrawal status changes.

Register Webhook for Crypto Withdrawals:

curl -X POST \
  'https://api.1money.network/v1/webhooks' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "crypto-withdrawal-monitor-001",
    "eventType": "crypto_withdrawal.status_changed",
    "url": "https://your-app.com/webhooks/crypto-withdrawal",
    "description": "Monitor USDT withdrawal status updates"
  }'

Response:

{
  "eventType": "crypto_withdrawal.confirmed",
  "timestamp": "2025-10-06T22:02:00Z",
  "data": {
    "withdrawalId": "wd_crypto_789xyz123abc",
    "externalId": "USDT-ETH-WD-20251006-0001",
    "status": "COMPLETED",
    "currency": "USDT",
    "network": "ethereum",
    "amount": "500.00",
    "destinationAddress": "0x742C15d71c13Fb72c4EdAAD7d8A078C13F5e3b9A",
    "txHash": "0x8f4b2c1d9e7a5f8c3b6d2a4e1f7c9b5d8e3a6f1c4b7d2e5a8f1c4b7d2e5a8f1c",
    "blockNumber": 18456789,
    "blockHash": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
    "confirmations": 12,
    "requiredConfirmations": 12,
    "networkFee": "23.45",
    "completedAt": "2025-10-06T22:02:00Z"
  }
}

Step 3: Retrieve Withdrawal Status

You can also use the Retrieve Withdrawal API to manually check the current status and details of your crypto withdrawal.

Retrieve by Withdrawal ID:

curl -X GET \
  'https://api.1money.network/v1/withdrawals/wd_crypto_789xyz123abc' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

Response:

{
  "withdrawalId": "wd_crypto_789xyz123abc",
  "externalId": "USDT-ETH-WD-20251006-0001",
  "currency": "USDT",
  "network": "ethereum",
  "amount": "500.00",
  "destinationAddress": "0x742C15d71c13Fb72c4EdAAD7d8A078C13F5e3b9A",
  "status": "COMPLETED",
  "txHash": "0x8f4b2c1d9e7a5f8c3b6d2a4e1f7c9b5d8e3a6f1c4b7d2e5a8f1c4b7d2e5a8f1c",
  "blockNumber": 18456789,
  "blockHash": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
  "confirmations": 12,
  "requiredConfirmations": 12,
  "gasPrice": "28500000000",
  "gasUsed": "63247",
  "networkFee": "23.45",
  "createdAt": "2025-10-06T21:38:00Z",
  "broadcastedAt": "2025-10-06T21:45:00Z",
  "completedAt": "2025-10-06T22:02:00Z",
  "explorerUrl": "https://etherscan.io/tx/0x8f4b2c1d9e7a5f8c3b6d2a4e1f7c9b5d8e3a6f1c4b7d2e5a8f1c4b7d2e5a8f1c"
}

List Historical Stablecoin Withdrawals

Retrieve a list of past crypto withdrawals for reporting and reconciliation.

List USDT Withdrawals

curl -X GET \
  'https://api.1money.network/v1/withdrawals?currency=USDT&network=ethereum&limit=10&status=COMPLETED' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

Sample Response

{
  "withdrawals": [
    {
      "withdrawalId": "wd_crypto_789xyz123abc",
      "externalId": "USDT-ETH-WD-20251006-0001",
      "currency": "USDT",
      "network": "ethereum",
      "amount": "500.00",
      "status": "COMPLETED",
      "txHash": "0x8f4b2c1d9e7a5f8c3b6d2a4e1f7c9b5d8e3a6f1c4b7d2e5a8f1c4b7d2e5a8f1c",
      "createdAt": "2025-10-06T21:38:00Z",
      "completedAt": "2025-10-06T22:02:00Z"
    },
    {
      "withdrawalId": "wd_crypto_456def789ghi",
      "externalId": "USDT-ETH-WD-20251005-0002",
      "currency": "USDT",
      "network": "ethereum",
      "amount": "250.00",
      "status": "COMPLETED",
      "txHash": "0x7e3a9f2c5b8d1e4a7c9f2b5d8e1a4c7f9b2e5a8c1f4b7e0d3a6f9c2b5e8a1d4c",
      "createdAt": "2025-10-05T14:20:00Z",
      "completedAt": "2025-10-05T14:45:00Z"
    }
  ],
  "pagination": {
    "total": 15,
    "limit": 10,
    "offset": 0,
    "hasMore": true
  }
}