Skip to main content

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

  1. Visit CoinFlow Dashboard
  2. Create a merchant account
  3. Complete KYC verification
  4. 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: test@coinflow.cash
  • Test Amount: Any amount under $1000
  • Test Cards: Use standard test card numbers

Production Deployment

Before Going Live

  1. ✅ Complete CoinFlow merchant verification
  2. ✅ Configure production API keys
  3. ✅ Set up webhook endpoints
  4. ✅ Test payment flow end-to-end
  5. ✅ Implement error handling
  6. ✅ Set up monitoring and logging

Production Configuration

Best Practices

Security

  1. Never expose API keys in client-side code
  2. Validate webhook signatures to prevent fraudulent requests
  3. Use HTTPS for all API communications
  4. 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
Webhook not receiving events
  • Verify webhook URL is publicly accessible
  • Check webhook signature validation
  • Review CoinFlow dashboard logs
Payment failing
  • Check customer has sufficient funds
  • Verify currency is supported
  • Review transaction limits

Support

Additional Resources