CoinFlow Integration Guide
HedgePayments is built on top of CoinFlow, providing seamless cryptocurrency and fiat payment processing for your applications.Overview
CoinFlow is our primary payment processor that enables:- Crypto Payments: Accept 50+ cryptocurrencies
- Fiat On/Off Ramps: Convert between crypto and fiat currencies
- Global Coverage: Support for 180+ countries
- Instant Settlements: Fast payment processing and payouts
- Compliance: Built-in KYC/AML compliance
Getting Started
1. Sign Up for CoinFlow
- Visit CoinFlow Dashboard
- Create a merchant account
- Complete KYC verification
- Get your API credentials
2. Configure Environment Variables
Add your CoinFlow credentials to your.env file:
3. Initialize CoinFlow Client
Payment Flow
Creating a Payment
Handling Webhooks
CoinFlow sends webhooks for payment events. Configure your webhook endpoint:Supported Cryptocurrencies
CoinFlow supports the following blockchains and tokens:- Solana: SOL, USDC, USDT
- Ethereum: ETH, USDC, USDT, DAI
- Polygon: MATIC, USDC, USDT
- Near: NEAR
- Base: ETH, USDC
Testing
Sandbox Environment
Use the sandbox environment for testing:Test Credentials
- Test Email: [email protected]
- Test Amount: Any amount under $1000
- Test Cards: Use standard test card numbers
Production Deployment
Before Going Live
- ✅ Complete CoinFlow merchant verification
- ✅ Configure production API keys
- ✅ Set up webhook endpoints
- ✅ Test payment flow end-to-end
- ✅ Implement error handling
- ✅ Set up monitoring and logging
Production Configuration
Best Practices
Security
- Never expose API keys in client-side code
- Validate webhook signatures to prevent fraudulent requests
- Use HTTPS for all API communications
- Store credentials in environment variables
Error Handling
Monitoring
Track key metrics:- Payment success rate
- Average transaction time
- Failed payment reasons
- Webhook delivery status
Advanced Features
Custom Styling
Customize the CoinFlow payment widget:Transaction Metadata
Add custom metadata to track payments:Troubleshooting
Common Issues
Payment widget not loading- Verify merchant ID is correct
- Check environment (sandbox vs production)
- Ensure API keys are set
- Verify webhook URL is publicly accessible
- Check webhook signature validation
- Review CoinFlow dashboard logs
- Check customer has sufficient funds
- Verify currency is supported
- Review transaction limits
Support
- CoinFlow Docs: docs.coinflow.cash
- HedgePayments Support: [email protected]
- Discord: discord.gg/hedgepayments

