# How to Automate Crypto Payment Forwarding — Non-Custodially

Auto-forward incoming deposits to your treasury without handing anyone your keys. Watch the addresses customers pay into, and on every confirmed payment prepare a sweep, sign it offline with your own key, and broadcast it. It's an automation you own — CryptoAPIs never holds a private key.

## Automated, but still your keys

"Auto-forwarding" usually means a service takes custody of incoming funds and moves them for you — which means it holds the keys. You can get the same automation without giving that up: CryptoAPIs tells you the instant a deposit confirms and prepares the unsigned sweep, but your service signs it offline with a key that never leaves your infrastructure, then broadcasts it.

## The forwarding loop

Triggered by a webhook, on any of 20+ supported chains — and it runs on a loop, so deposits forward themselves.

1. **Watch your deposit addresses.** Subscribe to confirmed incoming transactions on the addresses customers pay into.
   `POST /blockchain-events/{blockchain}/{network}/address-coins-transactions-confirmed`
2. **Prepare the forwarding transaction.** In your webhook handler, build an unsigned transaction that sends the received amount (minus fee) to your treasury.
   `POST /prepare-transactions/{evm|utxo}/{blockchain}/{network}/native-coins`
3. **Sign offline and broadcast.** Sign the prepared transaction offline in your own environment, with the key for that deposit address (e.g. [@cryptoapis-io/offline-signer](https://www.npmjs.com/package/@cryptoapis-io/offline-signer) — no HTTP call, no API key), then broadcast the signed result.
   `POST /broadcast-transactions/{blockchain}/{network}`

To auto-forward tokens (USDT, USDC…), swap the prepare step for the token endpoints (ERC-20 / TRC-20). The watch → sign-offline → broadcast loop is identical.

## FAQ

**Does CryptoAPIs hold my keys when forwarding payments?** No. This is a non-custodial pattern you build and run yourself: CryptoAPIs notifies you of deposits and prepares unsigned transactions, but you sign every sweep offline with your own key.

**How do I auto-forward incoming crypto to a treasury wallet?** Watch your deposit addresses with a confirmed-transaction webhook, and on each notification prepare a transaction to your treasury, sign it offline, and broadcast it. Running that on every webhook forwards deposits automatically.

**Can I automate forwarding for tokens like USDT and USDC?** Yes. Use the token prepare-transaction endpoints (ERC-20, TRC-20 and more) to build the sweep; the rest of the loop is identical.

**What do I need to run the automation?** A webhook endpoint, your own signing key held in your environment, and the CryptoAPIs prepare-transactions and broadcast endpoints. No nodes, indexers or custodian required.

[Start building free](https://app.cryptoapis.io/auth/register) · [Read the API docs](https://developers.cryptoapis.io/)
