Skip to content
FlatCryptoPay
Under the hood

How a non-custodial crypto payment gateway works

FlatCryptoPay never receives your customers' money: it tells the customer exactly what to send to your address, watches the public blockchain for that transfer, and notifies your store once it is confirmed. This page explains each step, from quote to webhook, and what we can and cannot see along the way.

Last verified

Quote

Your fiat price is converted to the chosen asset: stablecoins 1:1 with USD, Bitcoin and Litecoin locked for 30 minutes.

Match

A unique stablecoin amount or a fresh xpub-derived address links the transfer to one invoice.

Confirm

We wait for a network-specific number of confirmations before marking an invoice paid.

Notify

A signed webhook reaches your server and the customer is redirected back to your site.

What non-custodial means

Custody is about who can spend the money. A custodial gateway gives your customer an address that the gateway controls, so for some period your revenue is the gateway's liability. A non-custodial gateway only ever shows addresses that you control. We store your public addresses and, for Bitcoin and Litecoin, optionally a watch-only extended public key. Neither lets anyone spend funds.

Step by step

  • 1. Invoice: your server, the WooCommerce plugin or a payment link creates an invoice with an amount and currency.
  • 2. Choice: the customer opens the pay page and picks a coin and network, or card, Apple Pay or Google Pay.
  • 3. Quote: for stablecoins we add a few unique decimal digits to the amount and reserve it on your address for 60 minutes; for BTC or LTC we lock a rate for 30 minutes and show either a fresh derived address or your address with a unique amount.
  • 4. Transfer: the customer sends from their wallet or exchange directly to your address and pays the network fee.
  • 5. Detection: our watcher reads public chain data every minute and on demand while the page is open; when it sees the transfer, the invoice becomes processing.
  • 6. Confirmation: after the required confirmations the invoice becomes paid and the customer is redirected to your redirect_url.
  • 7. Webhook: your endpoint receives invoice.paid, signed with HMAC-SHA256, and your system fulfils the order.

Matching without custody

Matching is the hard part of non-custodial payments. Custodial gateways solve it by giving every invoice its own deposit address, which they control and later sweep. We use two techniques that keep control with you.

TechniqueUsed forHow it works
Unique amountUSDT, USDC, and optionally BTC/LTCEach invoice asks for an exact amount, such as 25.0037, reserved for 60 minutes on your single address
Derived addressBTC and LTC with xpub/zpubWe derive a new receiving address per invoice from your watch-only public key; only your wallet holds the spending keys

How card payments stay non-custodial

When a customer chooses card, Apple Pay or Google Pay, the payment is processed by an independent licensed card processor, which converts the proceeds and settles USDC directly to the EVM address you configured. We orchestrate the checkout and track the status, but the funds do not pass through a FlatCryptoPay account. The processor's fee is deducted before settlement and it may run its own customer checks.

What we can see and what we cannot

We can see what any blockchain observer can see for your addresses: incoming transfers, amounts and transaction hashes, plus the invoices you create. We cannot move funds, sign transactions or recover your wallet. If you lose your seed phrase we cannot help you recover it, which is the trade-off of holding your own keys.

Frequently asked questions

How does a non-custodial payment gateway work?

It shows the customer your own address, watches the blockchain for the matching transfer and notifies your store. The gateway never holds the funds, so it cannot freeze or lose them.

Is an xpub safe to share?

An extended public key cannot spend funds; it can only derive receiving addresses and view their history. That is a privacy consideration, so only share it with services you trust, but it does not put your coins at risk.

What happens if a customer pays after the invoice expires?

The money still arrives in your wallet because it was sent to your address. The invoice will not auto-complete, so you can fulfil manually or refund from your wallet.

Why do stablecoin amounts have extra decimals?

The extra digits make each invoice amount unique for 60 minutes, which is how we match a transfer to the right order without giving every invoice its own address.

Do you support Bitcoin Lightning?

Not yet. Lightning is on the roadmap. Today Bitcoin payments are on-chain with one confirmation.

Related

Start accepting crypto in minutes

Create a free account, add your wallet addresses and send your first invoice. No business documents, no percentage fees, no custody.

Start free: no fees, no documents