Testnet, opt-in. Issuance is on for Base Sepolia (
84532) and Ethereum Sepolia (11155111). Other networks answer rail3_not_available_on_chain or token_not_watched_on_chain, and TRON is refused. Nothing here runs on a mainnet. Roadmap.What you need first
- A customer you already know. You ask for the address when the customer signs up or opens a funding page, not at checkout. A reference to that customer has to exist before the first deposit.
- A deployed pool on that network, the same one your other payments go to. Without it the call answers
409 pool_not_deployed. - Your API key (
sk_live_…), on your server. Never in a page.
How it fits together
The response is an untrusted hint, exactly like the address the checkout shows. Before the SDK hands you an address, a frame on our origin re-derives it from the chain: the pool from the payout wallet you pinned, then the address from that pool, the token, the two committed fee terms and the contract code this SDK release pins. If any part disagrees, you get no address. Verification.Step 1 — a route on your backend
The endpoint needs your secret key, so the browser can’t call it. Add one route that forwards the body and returns the response unchanged:Step 2 — call the SDK from the page
customerDeposit needs SDK 1.5.0 or later.
CryptoCheckout.customerDeposit(options)
Returns a promise. No other option is accepted. A key that looks like an identity (email, user…, player…, name, phone, dob, …) is refused by name, and any other unknown key is refused too.
An opaque reference to your customer: your internal id, a UUID, or a hash you compute. A sequential number is fine. 1 to 256 UTF-8 bytes, no control characters.Never send an email address, a phone number or a name. The SDK refuses a value shaped like an e-mail address or a phone number (
identity_value_rejected) before anything leaves the page. The server never stores the reference itself: it keeps only a keyed hash, scoped to the network and token. What we store.A token symbol (
USDC) or a token address. It has to be one you accept on that network.Your backend route from Step 1. The SDK
POSTs { chainId, token, customerRef } to it, with same-origin credentials.Your payout wallet, the same pin you give
init(). With it the address is verified against the chain. Without it the SDK only checks that the response agrees with itself, and resolves with verification: "unverified". Strongly recommended.How long to wait for the verification before giving up with
verification_unavailable.Result
verified: anchored to your on-chain payout attestation. unverified: you pinned no anchor, so the address agrees with its own binding but is not anchored to the chain. Show a notice, as the checkout does.Whether the address already has code. It doesn’t need to: the first deposit can arrive before it is deployed.
true when this customer already had an address on this network and token for your current pool. The call is idempotent: the same customer gets the same address back.Errors
The promise rejects with anError whose code says why, and whose retryable says whether trying again can help.
Fees
You pay the network fee on this rail, not your customer: every deposit is credited at its full amount. The address commits to two fee terms when it is created, both in the token’s base units:firstSurchargecovers creating the address and its first sweep. It is taken once, at the first sweep.surchargePerSweepcovers every later sweep.
422 surcharge_above_ceiling rather than fixing a high fee into the address for good. Try again later.
On a network where cryptocheckout covers the network fee (every test network today), a new address commits zero for both terms and we pay every sweep. Because anyone can send a permanent address a few cents, a covered address is swept only once what waits there reaches a minimum: 0.10 of the token on a test network. Below that it waits, the dashboard says so, and a sweep request is refused with 409 below_sponsored_sweep_floor. The money can only ever go to your pool, so waiting loses nothing.
The platform fee is the same as on the other rails, taken when the pool distributes. Fees.
When the money reaches your pool
A deposit is captured at the address as soon as it reaches that network’s confirmation depth. Depth scales with value, and nothing counts at first sight. Thecustomer.deposit.confirmed webhook fires once per deposit, and it is your trigger to credit the customer’s balance. From that point the money can only go to your pool.
The sweep into your pool is batched, so it isn’t immediate. An address is swept when one of these is true:
- the sweep’s network fee is at most 2% of the address’s balance,
- its oldest unswept deposit is 7 days old,
- or you asked for a sweep.
What we store, and what we don’t
- No identity. There is no column for an e-mail, a name or a player id. We never store your
customerRef, only a keyed hash, scoped to the network and token so one customer’s addresses can’t be linked across networks through it. - The address is public. Like any blockchain address, it and every deposit to it can be seen by anyone. Whoever holds your mapping from addresses to customers can read a customer’s whole deposit history. Keyed derivation stops us and third parties from guessing addresses. It does not hide an address from someone who already knows it.
- Retention. We keep each address’s deposit history (amounts and times) for 90 days after the webhook for that deposit is delivered.
Things to know
- Matching is by customer. A deposit tells you who paid, not which order. If you sell one-off items, match by amount and time yourself, or use the checkout.
- Moving your pool retires addresses. If your payout configuration changes and you get a new pool, addresses issued for the old pool are retired. They are still watched and swept into the pool they were made for. Ask again and the customer gets a new address for the current pool. The webhook says
retired: truefor a deposit to an old one. - Payer screening set to Enforce refuses issuance (
409 rail3_unavailable_with_enforce_screening): this rail has nowhere to screen a sender before capture yet. - Content Security Policy. The verification runs in a hidden frame from
https://www.cryptocheckout.ai, so yourframe-srchas to allow it, just as for the checkout. Embed → CSP. - Server-side only? Call
POST /customer-addressdirectly. You then skip the browser verification, so the address you get is only as trustworthy as the response.