Skip to main content

Overview

The HopNow API supports multiple currencies for accounts, balances, payins, payouts, and FX operations. This guide covers best practices for handling currencies correctly.

Supported Currencies

The API supports all major fiat currencies (ISO 4217) and popular cryptocurrencies:

Fiat Currencies

  • USD - US Dollar
  • EUR - Euro
  • GBP - British Pound
  • MXN - Mexican Peso
  • BRL - Brazilian Real
  • And 150+ other ISO 4217 currencies

Cryptocurrencies

  • BTC - Bitcoin
  • ETH - Ethereum
  • USDC_ETHEREUM - USD Coin on Ethereum
  • USDC_POLYGON - USD Coin on Polygon
  • USDT - Tether

Currency Codes

Always use standard currency codes:

Decimal Precision

Different currencies have different decimal precision requirements:

Standard Fiat (2 decimals)

Zero-Decimal Currencies

Some currencies don’t use decimal places (e.g., JPY, KRW):

Cryptocurrencies (up to 8 decimals)

Amount Formatting

Always use string format for amounts to avoid floating-point precision errors:

Multi-Currency Accounts

Accounts can hold balances in multiple currencies simultaneously:

Currency Conversion (FX)

Use the FX endpoints for currency conversion:

Currency Matching

Always ensure currency matches across related operations:

Payout Destinations

Virtual Accounts

Each virtual account supports one currency:

Balance Checks

Always check sufficient balance before creating payouts:

Currency Display

Format currencies correctly for display:

Common Pitfalls

1. Floating Point Arithmetic

Never use float for money calculations:

2. Currency Mismatch

❌ Don’t create payouts with mismatched currencies:

3. Ignoring Balance Currency

❌ Don’t assume single currency:

Best Practices Summary

  1. ✅ Always use string format for amounts
  2. ✅ Use standard ISO 4217 currency codes
  3. ✅ Check currency matches for related operations
  4. ✅ Verify sufficient balance before payouts
  5. ✅ Use Decimal for money calculations
  6. ✅ Handle multi-currency accounts properly
  7. ✅ Respect currency-specific decimal precision
  8. ✅ Use FX endpoints for currency conversion