Get paid in USDC.
Let people pay with any token.
Easy Crypto Pay is an open-source pay button for EVM chains. You choose what you receive, for example USDC on Base. The payer picks whatever is in their wallet, and LI.FI swaps or bridges it on the way. No account, no API key, no server between you and the payer.
MIT licensed · non-custodial: funds go straight from the payer's wallet to your address.
- EASY CRYPTO PAY
- Order ORD-42Base
- Payer's wallet
- 0.0021 ETHArbitrum
- 3.10 USDTBNB Chain
- 120 DEGENskipped
- Pays withETH · Arbitrum
- Routebridge + swap, LI.FI
- Received5.00 USDC
- onBase
- tx0x8f3c…a41e
Add it in 30 seconds
Paste one script tag and one element. Set the chain, the token you want and your address. The button does the rest.
<script src="https://easy-crypto-pay.pages.dev/lib/v0.1.0/embed.global.js"></script>
<div data-easy-crypto-pay
data-integrator="your-app"
data-chain-id="8453"
data-token="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
data-amount="5"
data-recipient="0xYourAddress"
data-order-id="ORD-42"></div>
import { createEasyCryptoPay } from 'easy-crypto-pay'
import { EasyCryptoPayButton } from 'easy-crypto-pay/react'
const ecp = createEasyCryptoPay({ integrator: 'your-app' })
<EasyCryptoPayButton
client={ecp}
request={{ chainId: 8453, token: USDC_BASE, amount: '5',
recipient: '0xYourAddress', orderId: 'ORD-42' }}
onSuccess={(r) => fetch('/api/verify', { method: 'POST',
body: JSON.stringify({ txHash: r.txHash, orderId: r.orderId }) })}
/>
The npm package is not published yet. This snippet shows the API it will have.
import { verifyPayment } from 'easy-crypto-pay/server'
// Do not ship goods on the browser's onSuccess alone.
const { ok, received, reason } = await verifyPayment({
txHash,
fromChainId, // the chain the payer signed on, for cross-chain routes
request: { chainId: 8453, token: USDC_BASE, amount: '5', recipient: '0xYourAddress' },
})
// Also store txHash so the same transaction cannot pay for two orders.
Try it now, on Base Sepolia
This button asks for 1 testnet USDC and sends it to a burn address. It needs a browser wallet or a mobile wallet with Base Sepolia USDC from Circle's faucet. On testnet the payer must already hold the token: LI.FI does not route swaps between testnets.
Want the full flow with mainnet tokens, order tracking and server verification? Open the checkout demo. This page itself uses the script tag above.
How a payment works
- Quote. The button reads the payer's balances and asks LI.FI for routes that deliver at least your amount. If the payer already holds your token on your chain, it offers a plain transfer first.
- Sign. The payer picks one option and signs in their own wallet. Easy Crypto Pay never holds keys or funds.
- Track. For a swap or bridge, the button follows the transfer until it lands on your chain.
- Verify. Your server calls
verifyPayment()with the transaction hash. It reads the transaction (for a cross-chain route, also LI.FI's status API) and checks the token, amount, recipient and chain, so a forged browser callback cannot mark an order paid.
Payer's walletLI.FI route, if neededYour address
Already using a hosted crypto checkout?
Keep it. Put the Guard in front of your Buy button. If the payer already holds enough of the token your checkout asks for, the checkout opens as before. If not, the Guard swaps the shortfall into the payer's own wallet first. Your checkout, webhooks and settlement stay the same.
EasyCryptoPay.guard('#buy-credits', {
integrator: 'your-app',
target: { chainId: 8453, token: USDC_BASE, amount: '10.50' },
onReady: () => openYourCheckout(),
})
Without the Guard
Insufficient balance.
You need 10.50 USDC on Base.
The payer has ETH on Arbitrum and leaves.
With the Guard
Top up 10.50 USDC on Base
from 0.0045 ETH on Arbitrum?
One signature, then the same checkout opens.
Where it fits
- Tips and donations
- A writer, an open-source maintainer or a streamer takes USDC on one chain, whatever their readers hold.
- Digital goods
- Templates, e-books, API credits. Pair the button with
verifyPayment()before you unlock the download. - Event tickets
- Meetups and hackathons collect a small fee without making attendees bridge first.
- DAO and club dues
- One treasury address and one token, paid from any chain members happen to use.
- Top-ups before an existing checkout
- The Guard, above, for SaaS and AI APIs that already take crypto through a hosted provider.
When not to use it
Easy Crypto Pay is for the case where a script tag is enough. If you need any of the following, a hosted provider such as Daimo, Relay or thirdweb will serve you better.
| You need | Easy Crypto Pay |
|---|---|
| Card payments, bank transfers, fiat on-ramp | No |
| Refunds or subscriptions | No |
| Webhooks and a dashboard | No. You verify the transaction yourself. |
| Deposit addresses (pay without connecting a wallet) | No |
| Solana, Bitcoin or other non-EVM chains | No. EVM chains only. |
| No signup, no API key, your own address, open source | Yes |
What has been tested
Version 0.1.0, early. Copied from the repository's status notes, nothing added.
- Base fork, signed end to end: a direct 5 USDC transfer, and a real LI.FI quote for ETH to USDC executed on the fork.
verifyPayment()accepts both and rejects a wrong amount, recipient or chain. - Live LI.FI API, read only: real balances and quotes; every route's minimum output covers the bill.
verifyPayment()on a real cross-chain delivery: passes for the delivered amount, fails for one cent more or another recipient.- Browser wallet connection and the mobile-wallet (WalletConnect) button, with a stub wallet.
- Not yet: a mainnet payment with real funds, a testnet payment signed in a real wallet, and a WalletConnect session with a real phone.