Self-hosted and self-custodial XMR payment gateway in C#
  • C# 98.3%
  • Dockerfile 1.7%
Find a file
2026-10-10 19:55:08 +02:00
caishenpay-cs fix(poller): poll continuously on the configured interval, fix wake up miss when running multiple workers in a cluster 2026-10-10 19:54:47 +02:00
.dockerignore Add dockerfile 2026-10-09 11:56:07 +02:00
.gitignore Ad sqlite db 2026-10-10 19:55:08 +02:00
caishenpay-cs.sln Add project files 2026-09-12 14:10:05 +02:00
Dockerfile Add dockerfile 2026-10-09 11:56:07 +02:00
LICENSE Add license 2026-09-12 15:06:00 +02:00
README.md Add deployment instructions 2026-10-09 12:06:04 +02:00

Caishen Pay

C# crypto payment gateway for processing XMR transactions.

Currently only supports single merchant private use as the signing encryption key is global. Multi-tenant support is in the works.

Requirements

  • monero wallet generated
  • monero-wallet-rpc
  • .NET 10+

Running

git pull https://git.blackruby.hu/blackruby/caishenpay-cs.git
dotnet run --project caishenpay-cs

Listens on http://localhost:5094 and reads appsettings.Development.json. Override any setting with an environment variable or by editing the appsettings.json file.

Using Docker

docker build -t caishenpay-cs .
docker run --rm -p 8080:8080 \
  -e SecurityKey=01HSGVBSF99SK6XMJQJYF0X3WQ \
  -e Wallets__Monero__RpcUri=http://example.local:18088 \
  -e Wallets__Monero__RpcUsername=rpcusername \
  -e Wallets__Monero__RpcPassword=rpcpassword \
  caishenpay-cs

Add -e IsPollerNode=false to run a web-only worker without the poller.

Authentication

For protected endpoints an X-API-KEY must be supplied in the request header, defined in settings.json as 'SecurityKey.'

Multiple SecurityKeys can be provided in the SecurityKey settings separated by ;,