Guide · Payments

How to accept crypto payments — without giving up your keys

Take Bitcoin, Ethereum and stablecoin payments with a REST API where your private keys never leave your own infrastructure. Point us at a wallet address you already control — or derive a fresh one per order — get a webhook the moment it's paid, and sweep funds by signing offline. No custody, no node to run.

Why non-custodial matters for payments

Most "crypto payment" tools ask you to trust them with the keys that control your money — funds land in their wallet and you request payouts. That's a custodial relationship, with the counterparty risk that comes with it.

CryptoAPIs is built the other way around. You hold your own extended public key (xPub); we derive receiving addresses from it and watch the chain for you, but we only ever see public data. When you move funds, you build the transaction through the API, sign it offline with your own private key, and broadcast it. At no point does a private key touch our servers.

The principle: watch with a public key, move by signing offline. Your keys, your coins — the API only ever handles what's already public on-chain.

You keep control of the address

Accept payments to a wallet address you already control — no custodian, nothing to hand over. This guide uses that single-address setup; both steps below are read-only to us, and you sweep by signing offline.

Processing at scale? If you'd rather give each customer or invoice a unique address, use an HD wallet (xPub) instead — that's covered end to end in How to build a crypto wallet. The watch → sign-offline → broadcast steps here are identical.

The flow, end to end

Watch an address, get notified on payment, sweep by signing offline — on any of 20+ supported chains.

Use the address customers pay into

Take the wallet address you already control and use it as your deposit address — nothing to create, nothing to hand over. That's your starting point for the next steps.

# No API call needed — just use an address you already control
DEPOSIT_ADDRESS="bc1qyour-existing-wallet-address" # → used in the steps below

Get a webhook when the payment lands

Subscribe to confirmed incoming transactions on your address. Your backend is notified the moment the customer pays — no polling. This is a read-only subscription; it never touches keys.

# Fire a webhook to your server on confirmed payment
curl -X POST \
  https://rest.cryptoapis.io/blockchain-events/bitcoin/mainnet/address-coins-transactions-confirmed \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ "data": { "item": {
      "address": "{yourAddress}",
      "callbackUrl": "https://your-shop.com/webhooks/crypto-paid" } } }'

Sweep funds — by signing offline

When you move collected funds to treasury, build the unsigned transaction through the API (fee, nonce and inputs calculated for you), sign it offline with your own private key, then broadcast the signed result. The private key stays in your environment the whole time.

1
Prepare
POST /prepare-transactions/…/native-coins
API builds the unsigned transaction
2
Sign offline
@cryptoapis-io/offline-signer
Your key signs it locally — never sent
3
Broadcast
POST /broadcast-transactions/…
Submit the signed transaction on-chain
# 1. Prepare an UNSIGNED transaction (no keys involved)
curl -X POST \
  https://rest.cryptoapis.io/prepare-transactions/utxo/bitcoin/mainnet/native-coins \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ "data": { "item": {
      "senderAddress": "{yourAddress}",
      "recipients": [{ "address": "{treasury}", "amount": "0.25" }] } } }'
# → returns the unsigned transaction + the sighash(es) to sign

# 2. Sign OFFLINE, in your own environment — e.g. our open-source signer,
# @cryptoapis-io/offline-signer (no HTTP, no API key; key never leaves your box)
# → returns signedTransactionHex, ready to broadcast

# 3. Broadcast the locally signed transaction
curl -X POST \
  https://rest.cryptoapis.io/broadcast-transactions/bitcoin/mainnet \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ "data": { "item": { "signedTransactionHex": "{signedTx}" } } }'
Stablecoins & tokens: accepting USDT, USDC or other tokens works the same way — derive or reuse an EVM address, watch it, and use the token prepare-transactions endpoints (ERC-20 / TRC-20) to sweep, still signing offline. One integration, coins and tokens across chains.

Three endpoints, one non-custodial flow

The whole money-movement path is just two API calls with your own offline signing in between — the private key never touches an endpoint.

1. Prepare — builds the unsigned transaction, with inputs, fee and change calculated for you. No keys sent.

2. Sign offline — sign the prepared transaction with your own private key, in your own environment. Our open-source @cryptoapis-io/offline-signer signs EVM, UTXO, Tron and XRP transactions entirely on your machine — no HTTP call, no API key — so the key never leaves your infrastructure. Any signing library works.

3. Broadcast — submits the transaction you signed offline. Takes only the signed hex.

What you don't have to build

The hard parts of payment acceptance — running full nodes for every chain, indexing addresses, reorg-safe confirmation tracking, fee estimation, mempool monitoring — are the API's job. You keep the one thing that should never be outsourced: control of your keys.

Frequently asked questions

Is CryptoAPIs custodial? Does it hold my crypto?

No. You keep your own keys. CryptoAPIs derives receiving addresses from your extended public key and watches the chain, but private keys are generated and used only in your environment. Every outgoing transaction is signed offline by you and only then broadcast.

How do I accept crypto payments without running a node?

Point the API at an address you control — either a single existing wallet address or one derived from your xPub — subscribe to a confirmed-transaction webhook on it, and you're notified the moment a customer pays. Across Bitcoin, Ethereum and 20+ chains, with no node or infrastructure to maintain.

Do I need an HD wallet, or can I just use one address?

Either works. The simplest setup — this guide — is a single wallet address you already control: just watch it and sweep by signing offline. If you want a unique address per customer or invoice for easier reconciliation at scale, use an HD wallet (xPub), covered in How to build a crypto wallet.

Can I accept stablecoins like USDT and USDC?

Yes. Token payments use the same derive-and-watch flow; sweeping uses the token prepare-transaction endpoints (ERC-20, TRC-20 and more), still signed offline with your own key.

How is this different from a crypto payment gateway?

Typical gateways are custodial — funds settle in the provider's wallet. Here funds land in addresses you derive and control, and you move them by signing offline. It's payment infrastructure, not a custodial middleman.

Which blockchains are supported?

Bitcoin, Ethereum, BSC, Polygon, Tron, XRP, Litecoin, Dogecoin and 20+ others, across the same unified REST API.

Start accepting crypto payments today

Build the non-custodial flow on a free tier — derive addresses, watch for payments and sweep by signing offline, across 20+ chains.