Introduction to Tues Pay
Tues Pay is a Java SDK designed for cryptocurrency payments in centralized systems. Currently, it supports Bitcoin payments, Ethereum payments, and ERC20 token payments. With comprehensive documentation, you can quickly integrate crypto deposits, withdrawals, and e-commerce transactions for businesses like online stores and financial platforms.
Project Structure
The SDK is organized into modular components for flexibility:
tues-pay
├── tues-bitcoin # Bitcoin Java service
├── tues-core # Core cryptocurrency Java dependencies
├── tues-erc20 # ERC20 token Java service
├── tues-eth # Ethereum Java service
└── tues-ethereum-core # Ethereum core Java dependencies
docs # Setup guides
sql # Database scriptsHow It Works
- Transaction Scanning:
Built in Java, Tues Pay uses scheduled tasks to scan transactions from self-hosted cryptocurrency nodes. This enables automated deposit processing. Order Integration:
When generating an order, call the Tues Pay API (/currencyName/createRecharge/{orderId}/{amount}) with:currencyName: Cryptocurrency type (e.g.,bitcoin,ethereum).orderId: Unique order identifier.amount: Payment amount.
The system generates a unique wallet address linked to the order.
Blockchain Confirmation:
- A background task scans blocks from height
0to the latest, checking transactions against database records. - When a transaction matches the deposit address and amount, the order is marked confirmed.
- Another task verifies block confirmations against a configurable threshold (e.g., 6 confirmations for Bitcoin) before finalizing the deposit.
- A background task scans blocks from height
Deployment Guide
1. Node Setup
Follow the environment setup guide in the docs folder to deploy your cryptocurrency wallet nodes.
2. Security Configuration
Encrypt sensitive node credentials (username/password) using EncryptPropertiesUtils in tues-core to avoid plaintext exposure.
3. Database Setup
- Execute
sql/wallet.sqlin MySQL to create required tables. - Encrypt database connection URLs and credentials using
EncryptPropertiesUtils.
4. Build and Run
- Package the project with Maven:
mvn clean install. - Launch the JAR:
java -jar tues-pay.jar.
Core Features
- Multi-Currency Support: Bitcoin, Ethereum, and ERC20 tokens.
- Automated Deposits: Real-time blockchain scanning.
- Security: Encrypted credentials and configs.
- Scalability: Modular design for easy extension.
FAQs
Q1: How do I handle transaction delays?
A: Delays can occur due to network congestion. Monitor confirmations via the /transaction/status endpoint.
Q2: Can I add support for other cryptocurrencies?
A: Yes! Extend tues-core and implement the PaymentHandler interface for new currencies.
Q3: Is this SDK suitable for high-volume transactions?
A: Absolutely. The task-based architecture ensures scalability. For heavy loads, consider optimizing node RPC settings.
👉 Explore advanced crypto integration tips
👉 Learn about secure key management
### Keywords
1. **Cryptocurrency Payments**
2. **Java SDK**
3. **Bitcoin Integration**
4. **Ethereum Payments**
5. **ERC20 Tokens**
6. **Blockchain Transactions**
7. **Payment Gateway**
8. **Crypto Deposits**