Home›Java›Mods›SimpleCryptoWebCashier
Existing solutions often add fees or takes some efforts to develop one. With stablecoin payments becoming more practical, they could be another way to accept donations besides traditional platforms like Stripe.

This is not meant to replace widely adopted methods such as cards. It is an exploratory, fun project rather than a production-ready service, mainly to show that stablecoin payments are now supported.

There are no built-in store, perk, or coupon features, etc. You simply specify the amount and which tokens to accept. After that, it can send a discord notification or run in-game commands. It works best if you listen for the payment-completed event and handle the rest in your own code.

This plugin does not connect to any cloud platform and has no premium or sign-up features, aside from the API keys you might use.

Highlights

1. Player visit the website, enter the player name and connects a wallet
pay1.png

2. User choose which network and token to pay with, and proceed with wallet signing.
pay2.png

3. Payment complete
pay3.png

Prerequisites

1. Coinbase developer portal API keys for x402 facilitators
2. Wallet to accept tokens, you can use MetaMask, Phantom, etc.
3. (Optional) Discord, to receive payment complete notification

How to Install
  1. Drag and drop this plugin into the plugins folder.
  2. Restart the server, then open plugins/SimpleCryptoWebCashier/config.yml.
  3. Enable the chains and tokens you want to support, then fill in your wallet address and CDP API keys.
  4. (Optional) Enable a Discord webhook URL and a ledger JDBC URL.
  5. Restart the server, then open http://127.0.0.1:28742/ in your browser to test it locally (do not really give this url to your player).
Plugin built with Java 17+ and requires at least spigot 16.5.

How to Test
  1. Enable testnets such as BASE_SEPOLIA and use a faucet like https://faucet.circle.com/ to receive testnet tokens.
  2. Test the payment flow and try out the plugin.
  3. Important: remove the testnet config before going to production.

Scalability and Performance

The webpage is currently embedded in the plugin. When you start the server with the plugin, you specify a port for the APIs and website, then expose it so players can access it. This design is only meant to simplify plugin setup and the server experience.

For a larger-scale server, it is better not to run the HTTP server inside the game server itself. Host it separately and use it only as an interface to grant in-game perks automatically.

If you want to host the website and backend APIs elsewhere, clone the repo, it can be decoupled from the Bukkit platform easily. API calls are asynchronous, the plugin it-self runs almost completely off the main-thread.


How it works

On many chains sending a transaction usually means paying a gas fee in the native token, unless a wallet or third party sponsors it for you. Last year x402 was launched and introduced facilitators that submit transactions on behalf of the payer. That simplifies crypto payments and reduces complexity.

What I added is just a wrapper around, some facilitators allow free transactions within a quota, so the fee can be as low as 0%. Converting back to fiat would be another story.


Supported Chains and Tokens

Disclaimer: I am not paid by Coinbase or anyone else to use the Coinbase facilitator.

This list may not be up-to-date and subject to change, please refer to Coinbase Developer document for latest. Currently the CDP Facilitator supports all ERC-20 tokens on its EVM networks through EIP-3009 or Permit2, and SPL tokens on Solana. There are example setup in the default config file.

AI Disclaimer

Yes this project is developed with the help with LLMs, under developer's supervision with code reviews. The frontend payment page was fully generated with an LLM.


Non-Affiliation Disclaimer

I am not paid by Coinbase or anyone else to use the Coinbase facilitator. This is simply a proof of concept to show that it works. Other facilitator should works too.

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

SimpleCryptoWebCashier is a free Minecraft Java mod. Compatible with Minecraft 1.16, 1.17, 1.18, 1.19 and newer. Downloaded 4 times (via Spigot). Download it and open it directly in the game.

Explore more