Easy Crypto Pay

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.

Try it on testnet

MIT licensed · non-custodial: funds go straight from the payer's wallet to your address.

  1. EASY CRYPTO PAY
  2. Order ORD-42Base
  3. Payer's wallet
  4. 0.0021 ETHArbitrum
  5. 3.10 USDTBNB Chain
  6. 120 DEGENskipped
  7. Pays withETH · Arbitrum
  8. Routebridge + swap, LI.FI
  9. Received5.00 USDC
  10. onBase
  11. tx0x8f3c…a41e
Example receipt. The amounts are illustrative.

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>

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 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

  1. 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.
  2. Sign. The payer picks one option and signs in their own wallet. Easy Crypto Pay never holds keys or funds.
  3. Track. For a swap or bridge, the button follows the transfer until it lands on your chain.
  4. 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 needEasy Crypto Pay
Card payments, bank transfers, fiat on-rampNo
Refunds or subscriptionsNo
Webhooks and a dashboardNo. You verify the transaction yourself.
Deposit addresses (pay without connecting a wallet)No
Solana, Bitcoin or other non-EVM chainsNo. EVM chains only.
No signup, no API key, your own address, open sourceYes

What has been tested

Version 0.1.0, early. Copied from the repository's status notes, nothing added.