Back to projects

Framework-independent crypto payment library

Rails Crypto Payment

A standalone Ruby library for exact USDT payment amounts and deposit retrieval, without Rails or database dependencies.

Outcome

Supports six-decimal payment amounts, EVM transfer verification, and signed Binance and Bybit deposit requests while leaving settlement under host application control.

My role

Open-Source Developer

How I helped

  • Built exact USDT amount reservation helpers and deposit retrieval clients.

Product

The workflow in context

Concept illustration generated with 9Router ag/gemini-3.1-flash-image; not a product screenshot.

Generated illustration of Rails Crypto Payment with a ruby gem, exact USDT amounts, EVM transfers, and exchange deposits.
Generated product visualization

The solution

Convert Rupiah prices into exact USDT amounts with BigDecimal, reserve unique six-decimal amounts, and retrieve deposits from EVM chains or exchange internal transfers.

Implementation

EVM JSON-RPC filters ERC-20 Transfer logs by token and recipient, verifies successful transaction receipts, and converts amounts using token decimals. Oversized RPC block ranges split on range errors. Binance and Bybit clients sign requests with host-provided credentials; Bybit deposit retrieval paginates results.

Payment boundaries

The host application owns credentials, wallets, payment records, polling cursors, expiration, settlement, transaction locking, and jobs. Database uniqueness must protect reservations atomically. Deposit status, coin, amount, recipient, and timestamps must match before transactional settlement.

AI system implementation

No AI runtime is involved. BigDecimal arithmetic, validated RPC responses, and signed exchange requests keep payment matching deterministic. Model output never determines amounts or settlement.

Source

Explore repository.

Could a similar approach help your business?

Tell me where work gets stuck. We can identify a practical first improvement and what success should look like.

Discuss your challenge