Hosted Checkout vs Custom USDC Flows: What to Build for Onchain Payments
Should your crypto business use a hosted checkout for USDC payments or build a custom onchain flow? Compare mechanics, tradeoffs, and see a worked example.

Onchain businesses face a recurring question as they start billing customers: should we drop in a hosted checkout for USDC payments, or roll our own onchain payment flow? The answer is never the same for everyone. It depends on the complexity of your billing, your team’s roadmap, and how much you want to own the edge cases. This post breaks down the real tradeoffs, with code and numbers.
Hosted Checkout: What You Get and What You Lose
A hosted checkout is a pre-built flow. Your app hands off to a payment page, the customer signs a transaction, and the payment lands in your designated settlement address. You get receipts, retries, and a UI that handles both MetaMask and WalletConnect. The customer never shares a private key, only signs the transaction from their own wallet.
There are tradeoffs. You give up some control over the UX. The checkout provider decides what the screens look like, how errors display, and how to handle edge cases like insufficient gas or failed allowance. You often work with webhooks or callbacks, not direct smart contract events in your backend. If your product needs to customize every detail of the payment journey, a hosted checkout may be too rigid.
Example: Simple SaaS Subscription
Suppose you’re billing $50 USDC per month for a SaaS tool. You want to:
- Send an invoice each month
- Let customers pay from their own wallet
- Avoid storing user keys
- Get notified when payment settles
A hosted checkout lets you generate a link or embed a button. The user pays from their wallet. You receive a webhook or callback when payment is confirmed onchain.
Sample payment link JSON:
{
"amount": "50.00",
"currency": "USDC",
"chain": "base",
"payer": "0x123...abc",
"payee": "0x789...def",
"memo": "SaaS May 2024",
"redirect_url": "https://yourapp.com/thanks"
}
You drop this into the hosted checkout’s API. The provider handles the rest.
Error Handling and Edge Cases
Hosted checkout flows usually abstract common errors. If the user tries to pay from an account with insufficient balance, the UI prompts them. If they approve a recurring cap, the screen shows the max spend and asks for a signature. You receive notifications only for confirmed, final payments. No chargebacks, no reversals once the chain settles.
Building a Custom Onchain Payment Flow
A custom flow gives you control. You write the UI that prompts the user to pay. You listen for smart contract events yourself, or poll the chain for confirmed receipts. You decide how to handle errors, retries, and edge cases.
This approach is flexible, but it comes with a surface area of problems to solve: - Wallet integrations (MetaMask, WalletConnect, etc.) - Handling allowance and spend caps for recurring payments - Showing pending transactions and confirmations - Managing redirects, receipts, and notifications - Dealing with gas estimation and fee volatility
Example: Custom Integration for Usage Billing
Suppose you run a developer API, charging $0.10 USDC per API call. You want to bill customers at the end of each month, based on their usage. Your backend sums up the metered amount, then requests payment.
A custom frontend might use ethers.js to trigger the transfer:
import { ethers } from "ethers";
const usdcAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; // Mainnet USDC
const payee = "0x789...def";
const amount = ethers.utils.parseUnits("120.30", 6); // $120.30 USDC, 6 decimals
async function payInvoice(signer) {
const usdc = new ethers.Contract(usdcAddress, [
"function transfer(address to, uint256 value) public returns (bool)"
], signer);
const tx = await usdc.transfer(payee, amount);
await tx.wait(); // Wait for confirmations
return tx.hash;
}
You decide how to present the UI, what happens if the transaction fails, and how to display receipts. You also handle errors like insufficient balance or wrong network. If the customer needs to approve a recurring cap, you prompt them for an ERC-20 approval with a bounded amount.
Edge Cases and Maintenance
Building your own flow means you are responsible for every wallet quirk and every new edge case. Some users will be on mobile browsers or wallet apps with their own bugs. Some will run out of gas or try to pay on the wrong chain. Your team will need to maintain wallet integrations, UI updates, and backend reconciliation logic.
Comparing Maintenance and Flexibility
| Approach | Control | Maintenance | Edge Cases Handled |
|---|---|---|---|
| Hosted Checkout | Low/Medium | Low | Provider |
| Custom Flow | High | High | Your Team |
A hosted checkout covers 80% of standard needs. You can launch fast, and hand off most UX and error handling to the provider. You add custom logic around the checkout experience, such as gating features or emailing receipts, but you do not touch the transaction signing or settlement logic.
A custom flow lets you own every aspect. If you need a tightly branded experience, or have unique billing rules, or want to interact with your own smart contracts as part of checkout, this is the way. Just be prepared for ongoing maintenance and support costs.
Worked Example: Cost and Effort Breakdown
Let’s say you estimate 400 customers per month, each paying $50 USDC on Base. Your hosted checkout provider charges 0.1% per transaction. Your team would spend about 2 weeks building and testing a custom flow, with ongoing maintenance of 2 hours per week for edge cases and updates.
Hosted Checkout: - Provider fee: $20/month (0.1% of $20,000) - Dev effort: 1 day to integrate - Maintenance: almost none
Custom Flow: - No provider fee - Dev effort: 2 weeks initial, 8 hours/month maintenance - Support cost: variable, based on user issues
If your team’s blended engineering rate is $100/hour, the custom flow costs $8,000 up front, plus $800/month. Hosted checkout is much cheaper unless you have unique requirements or anticipate high transaction volume where fees matter more than engineering time.
When to Pick Each Option
Choose hosted checkout if: - Your billing flows are straightforward - You want to launch fast - You do not need to customize every onchain interaction - You prefer to offload wallet support
Choose a custom flow if: - You require deep customization or unique contract interactions - Your product’s UX or brand is tightly coupled to the payment journey - You are ready to commit to ongoing support for wallet integrations and network quirks
We built Reclack to give crypto businesses the choice. Our hosted checkout supports one-time and recurring USDC payments on Base, Ethereum and Polygon, with caps on every recurring approval. We never hold funds or ask for private keys. If you want to see how this fits your billing flows, see https://reclack.com for docs and API details.


