Stablecoin to Stablecoin (Crosschain)

Transfer stablecoins between wallets with automatic cross-chain bridging when needed. This flow handles chain conversion, routing optimization, and delivery to crypto wallets automatically.

How it Works

Stablecoin to stablecoin payouts follow a streamlined process:

  1. Create Payout: Specify stablecoin source, destination wallet, and amount
  2. Funding: Provide funding instructions for external wallet transfer
  3. Bridging: Cross-chain transfers are handled automatically when needed
  4. Delivery: Stablecoins are sent to the destination wallet on the target chain

Create Payout

Endpoint: POST /payout/{customerId}

Request

curl -X POST https://api.inflowconnect.com/payout/{customerId} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {
      "fromExternalWalletDetails": {
        "fromWalletAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
        "fromChain": "ethereum"
      },
      "amountInCents": 50000
    },
    "destination": {
      "destinationAccountId": "acc_b2c3d4e5f6g7h8i9"
    },
    "referenceId": "payout_ref_123"
  }'

Required fields:

  • source.fromExternalWalletDetails.fromWalletAddress: Your wallet address
  • source.fromExternalWalletDetails.fromChain: Source blockchain
  • source.amountInCents: Amount in cents (equivalent stablecoin value)
  • destination.destinationAccountId: Destination wallet account ID

Response

{
  "id": "payout_x1y2z3a4b5c6d7e8",
  "customerId": "cus_a1b2c3d4e5f6g7h8",
  "status": "AWAITING_FUNDS",
  "source": {
    "amountInWei": "50000000000000000000",
    "currency": "USDC",
    "currencyAddress": "0xA0b86a33E6441e6EdE88f0C1e0Ed08e41F3F0B2D",
    "currencyChain": "ethereum",
    "fromAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
    "accountId": null
  },
  "destination": {
    "accountId": "acc_b2c3d4e5f6g7h8i9",
    "currency": "USDC"
  },
  "fundingInstructions": {
    "fromAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
    "toAddress": "0x123abc...",
    "amountInWei": "50000000000000000000",
    "currency": "USDC",
    "currencyAddress": "0xA0b86a33E6441e6EdE88f0C1e0Ed08e41F3F0B2D",
    "currencyChain": "ethereum"
  },
  "feeAmountInCents": 150,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

Error Handling

Common Issues

ErrorCauseSolution
INSUFFICIENT_BALANCEAccount has insufficient fundsTop up account or reduce amount
INVALID_DESTINATIONWallet account not found or invalidVerify account registration
UNSUPPORTED_CHAINChain not supported for bridgingUse supported chain combination
AMOUNT_TOO_LOWBelow minimum thresholdIncrease payout amount
BRIDGE_UNAVAILABLECross-chain bridge temporarily downRetry later or use same-chain transfer

Retry Logic

For failed payouts:

  1. Check failure reason in payout status
  2. Address the underlying issue (account balance, bridge availability, etc.)
  3. Create new payout if original cannot be recovered
  4. Monitor status updates via webhooks