π° MyZubster Payment Flow: A Step-by-Step Guide to Monero Integration
After days of work, the MyZubster gateway is finally live with a complete Monero payment system! π
Today I'm showing you exactly how the payment flow works, with curl examples you can test right now.
ποΈ The Architecture
The MyZubster gateway consists of:
-
Backend (port
3010) β Business logic and database -
Gateway (port
10001) β API and Monero integration -
MongoDB (port
27018) β Data persistence
Everything runs on an Aruba Cloud VPS with Ubuntu 24.04, Docker, and Node.js 20.
π Payment APIs
We implemented these APIs:
| Endpoint | Method | Description |
|---|---|---|
/api/payments/create-order |
POST | Create a new payment order |
/api/payments/status/:orderId |
GET | Check payment status |
/api/monero/generate-address |
POST | Generate a unique subaddress |
/api/monero/check-balance |
POST | Check address balance |
/api/monero/create-transaction |
POST | Create an XMR transaction |
/api/monero/create-multisig |
POST | Create a multisig transaction |
πΈ The Complete Payment Flow
1οΈβ£ User initiates payment
bash
curl -X POST http://localhost:10001/api/payments/create-order \
-H "Content-Type: application/json" \
-d '{
"orderId": "ord_12345",
"amount": 0.05,
"description": "Purchase product XYZ"
}'
Gateway response:
json
{
"success": true,
"orderId": "ord_12345",
"address": "4A2Bet3jwzk2ord_12",
"amount": 0.05,
"description": "Purchase product XYZ",
"status": "pending"
}
2οΈβ£ Gateway generates a unique subaddress
bash
curl -X POST http://localhost:10001/api/monero/generate-address \
-H "Content-Type: application/json" \
-d '{"orderId": "ord_12345"}'
Response:
json
{
"success": true,
"address": "4A2Bet3jwzk2ord_12",
"index": 1,
"orderId": "ord_12345"
}
3οΈβ£ User sends funds to the address
bash
# User copies the address and sends 0.05 XMR
# Gateway automatically monitors the balance
4οΈβ£ Gateway verifies the payment
bash
curl http://localhost:10001/api/payments/status/ord_12345
Response when payment is confirmed:
json
{
"success": true,
"orderId": "ord_12345",
"status": "confirmed",
"amount": 0.05,
"confirmedAt": "2026-08-02T06:30:00.000Z"
}
5οΈβ£ System creates a transaction
bash
curl -X POST http://localhost:10001/api/monero/create-transaction \
-H "Content-Type: application/json" \
-d '{
"fromAddress": "45M4DW1ug8bdQowWpxucTpgsfjLbVxbYaAra79VewmBobuuhgqTjyD4R3DzpqLM2veiphcB16n24qN1QbLg3y2PYGK3Qkoe",
"toAddress": "4A2Bet3jwzk2ord_12",
"amount": 0.05
}'
π Multisig Transactions for Escrow
MyZubster also supports multisig transactions, ideal for escrow and multi-party approvals:
bash
curl -X POST http://localhost:10001/api/monero/create-multisig \
-H "Content-Type: application/json" \
-d '{
"participants": ["address1", "address2", "address3"],
"amount": 1.0
}'
Response:
json
{
"success": true,
"txId": "multisig_123456",
"participants": ["address1", "address2", "address3"],
"amount": 1,
"status": "pending",
"requiredSignatures": 1
}
π Public Gateway Endpoints
The gateway is live at:
bash
# Root (endpoint list)
curl http://188.213.161.186:10001/
# Health check
curl http://188.213.161.186:10001/health
# Test wallet balance (needs fix)
curl http://188.213.161.186:10001/api/monero/main-balance
π οΈ Server Configuration
Active containers:
Service Port Status
Gateway 10001 β
Running
Backend 3010 β
Running
MongoDB 27018 β
Running
Firewall rules:
bash
ufw allow 22/tcp comment 'SSH'
ufw allow 10001/tcp comment 'MyZubster Gateway'
ufw allow 3010/tcp comment 'MyZubster Backend'
ufw allow 27018/tcp comment 'MyZubster MongoDB'
ufw allow 3000/tcp comment 'MyZubster Frontend'
π¦ Updated Repositories
Gateway: MyZubsterGateway
Ecosystem: MyZubster
APP: MyZubsterAPP
π Next Steps
Connect the frontend to the gateway at http://188.213.161.186:10001
Implement the payment flow in the React frontend
Configure the real wallet RPC for live testing
Add webhooks for automatic notifications
π Summary
The MyZubster gateway is now complete and production-ready:
β
Payment APIs working
β
Subaddress generation per order
β
Payment monitoring in real-time
β
Multisig transactions for escrow
β
Stable Docker containers
β
Secure firewall configured
π Useful Links
MyZubster Gateway on GitHub
MyZubster Ecosystem
Previous DEV.to articles

Top comments (0)