How to: Implement Passive Crypto Pay-In Addresses (API)
How to: Implement Passive Crypto Pay-In Addresses (API)
This page is for advanced / cryptocurrency-native companies. If that’s not you, head back to the Quickstart for the standard flows.
This feature is opt-in only and must be enabled by Coinflow. Before
any of the calls on this page will succeed, your merchant account
needs enableStableDepositAddresses=true. Reach out to your Coinflow
integrations contact — there is no self-serve toggle. Until the flag
is flipped, the create endpoint returns
400 Passive crypto pay-in deposit addresses are disabled for this merchant.
This guide walks through the end-to-end integration of passive crypto pay-in addresses.
All merchant IDs, customer IDs, addresses, and emails on this page are examples only and are not reflective of real production values. Replace them with your own values when integrating.
Authentication & Base URLs
The passive-address endpoints are split into two sets:
- Customer-facing (called from your end-user’s session with a
Coinflow session key or wallet auth):
POST /api/checkout/crypto-deposit-address/{merchantId} - Merchant-side (called from your backend with merchant credentials,
or by a Coinflow admin):
/api/merchant/customer-payin-addresses/...
Sandbox base URL: https://api-sandbox.coinflow.cash
Production base URL: https://api.coinflow.cash
1. List Supported Chains
Returns the chain names accepted by the create endpoint. The list is
environment-aware — sandbox returns testnets (e.g. Polygon Amoy,
Solana Devnet, Base Sepolia), production returns mainnets.
Pass any returned name verbatim as the chain field in subsequent calls.
The match is case- and whitespace-insensitive.
2. Create (or Retrieve) a Passive Address
The same call is used to mint a new address and to retrieve an existing
one — the response shape is identical and the operation is idempotent on
(merchantId, customerId, chain).
From your backend (merchant auth)
From the customer's session (session key auth)
Use this when your server issues the address. customerId comes from
your system; Coinflow uses it as the stable scoping key for the
address.
Display depositAddress to your customer alongside the chain name. The
customer can send USDC (or any supported stablecoin/asset on that
chain — see Supported Tokens and Chains)
in any amount. Coinflow swaps to USDC on settlement.
Errors
3. List a Customer’s Addresses
Returns every address Coinflow has minted for a (merchant, customerId)
pair, newest first, across all chains.
Use this to populate a customer’s “Crypto Funding” page in your app.
4. Pause an Address (Deactivate)
Pauses a single address. Once paused, any deposit that subsequently
lands on the address will not produce a Payment record — funds may
still clear on-chain briefly during reconciliation, but
Coinflow will refuse them.
5. Resume an Address (Activate)
Re-activates a paused address. Subject to the same flag and cap checks as minting a new address.
6. React to Deposits via Webhook
Every successful deposit on a passive address creates a Payment record
and dispatches the standard Payment Settled webhook. There is no
separate “passive deposit” event — passive deposits look like any other
settled payment from your webhook handler’s perspective.
paymentId, merchantId, customer, sessionId, and amounts shown
are examples only and not reflective of real production values.
To enable: Coinflow Admin Dashboard → Developers → Webhooks, select
the latest version, and ensure Payment Settled is subscribed. See
Configuring Webhooks
for setup.
Coinflow sends over/underpayment events
(Crypto Overpayment, Crypto Underpayment) for fixed-amount
token payments — but those events do not fire for passive addresses,
because passive addresses have no preset amount to over- or underpay.
Best Practices
Display the address with the chain name
A passive address is only valid on the chain it was minted for. Always
show the chain name (Polygon, Solana, etc.) next to the address
in your UI so the customer doesn’t send funds on the wrong network.
One address per chain per customer is enough
The endpoint is idempotent on (merchantId, customerId, chain). Don’t
cache stale addresses across redeploys — re-request and Coinflow
will return the same record. If you support multiple chains per
customer, mint each lazily on demand.
Always rely on the webhook, not the on-chain transfer
On-chain confirmation is necessary but not sufficient for funds to
appear on your books — Coinflow only credits the merchant once the
Payment Settled webhook fires, which is also when the address’s
status was checked. Build your accounting around the webhook, not
a chain listener.
Pause addresses you want to retire — don't 'forget' them
There’s no delete operation. To stop accepting funds on an address,
call POST /deactivate. The record stays so a future
(merchant, customer, chain) lookup still works, but no Payment
will be created from further deposits. Pausing also stops the
per-active-address billing for that record — see Billing below.
Treat the active-address cap as a guardrail, not a target
maxActivePassiveAddresses is set per-merchant by Coinflow and
cannot be raised or lowered via API or dashboard. If your model has
high churn (many one-off customers minting addresses), ask Coinflow
to set a cap so a sudden spike doesn’t fan out into a runaway number
of active sessions — and a runaway invoice. Paused addresses don’t
count against the cap or toward billing.
Billing
Coinflow charges a per-active-address fee for every
(customer, chain) pair that is in the active state. A single
customer with an active address on Polygon and another on Solana counts
as two active addresses for billing purposes — the fee scales
linearly with the number of active (customer, chain) combinations
you keep open.
- Only active addresses incur the per-address fee. The moment you
POST /deactivatean address, billing stops for it. CallingPOST /activatelater resumes both the address and the fee. - Mint per chain only as needed. If a customer only ever deposits on one chain, don’t pre-mint on every supported chain — each pre-mint is another billable record.
- Ask Coinflow to set a
maxActivePassiveAddressescap if you want a hard ceiling on your active-address fee exposure. See the Active Address Cap section of the overview for details.
Per-address pricing is defined in your merchant contract — contact your Coinflow account manager for current rates.

