Crypto Payment Quick Start Guide

Prerequisites

All code implemented - Ready to test!

  • Protocol buffers generated

  • Database models created

  • Solana provider implemented

  • API endpoints integrated

Step 1: Apply Database Migration

# Start database
docker-compose up -d db

# Wait for database to be ready
docker-compose exec db pg_isready -U user -d aura_db

# Apply migration
docker-compose exec core-service alembic upgrade head

# Verify table created
docker-compose exec db psql -U user -d aura_db -c "\d locked_deals"

Expected output:

Step 2: Generate Solana Keypair (Devnet)

Step 3: Configure Environment

Step 4: Start Services

Step 5: Test Payment Flow

5.1 Negotiate Deal (Get Payment Instructions)

Expected response:

Save the deal_id and memo!

5.2 Send Payment

Option A: Using Solana CLI

Option B: Using Phantom Wallet

  1. Connect to Devnet in Phantom

  2. Send $AMOUNT SOL to $WALLET_ADDRESS

  3. Add $MEMO in the memo field

5.3 Check Payment Status

Step 6: Verify in Database

Step 7: Monitor with Jaeger

Troubleshooting

Error: "SOLANA_PRIVATE_KEY required when CRYPTO_ENABLED=true"

  • Make sure you exported the private key correctly

  • Check .env file has SOLANA_PRIVATE_KEY=<base58-key>

Error: "Payment verification failed"

  • Check RPC URL is correct: https://api.devnet.solana.com

  • Verify wallet has sufficient balance for transaction fees

  • Ensure memo matches exactly (case-sensitive)

Error: "Deal not found"

  • Verify deal_id is correct UUID

  • Check deal hasn't expired (default: 1 hour)

  • Confirm crypto is enabled: CRYPTO_ENABLED=true

Payment stuck on PENDING

  • Wait 30-60 seconds for Solana finality

  • Check transaction on Solana Explorer: https://explorer.solana.com/?cluster=devnet

  • Verify memo was included in transaction

  • Check amount matches (floating-point tolerance: ±0.01%)

No payment instructions returned

  • Verify CRYPTO_ENABLED=true in environment

  • Check core-service logs: docker-compose logs core-service | grep crypto_enabled

  • Restart services: docker-compose restart core-service

Testing Different Scenarios

Test 1: Successful Payment

Test 2: Deal Expiration

Test 3: Invalid Deal ID

Test 4: Crypto Disabled

Next Steps

  1. You are here - Local testing on devnet

  2. 🔜 Write unit tests (core-service/tests/test_market_service.py)

  3. 🔜 Write integration tests (core-service/tests/test_crypto_integration.py)

  4. 🔜 Deploy to staging with testnet

  5. 🔜 Deploy to production with mainnet

Production Checklist

Before enabling on mainnet:

Support

  • Documentation: CRYPTO_INTEGRATION_SUMMARY.md

  • Code examples: core-service/src/crypto/, core-service/src/services/

  • Logs: docker-compose logs -f core-service | grep -E "deal_created|payment_verified"

  • Traces: http://localhost:16686


Ready to test! 🚀

Start with Step 1 (database migration) and work through each step sequentially.

Последнее обновление