Skip to main content

Data Model - Money

smilepayz teamsAbout 2 min

Money Overview

The Money data model defines the structure for currency and amount information in payment transactions. This model encapsulates currency specifications, transaction amounts, and settlement amounts across different currencies and regions.

Data Model Structure

ParameterTypeDescription
currencyStringISO 4217 currency code specification
Format: Three-letter currency code
Usage: Identifies the currency for transaction processing and settlement
Examples: IDR, THB, BRL, INR, PHP, USDT, BTC
amountNumberTransaction amount in smallest currency unit
Format: Numeric value (integer or decimal)
Usage: Primary transaction amount for payment processing
Examples: 10000, 500.00, 200.1234
payAmountNumberActual settlement amount (may differ from transaction amount)
Format: Numeric value (integer or decimal)
Usage: Final amount to be settled, used for reconciliation
Examples: 10000, 500.00, 200.1234

Currency Format Specifications

Fiat Currencies

CurrencyCodeFormatExampleDescription
Indonesian RupiahIDR#10000Integer format, no decimal places
Thai BahtTHB#.##500.00Two decimal places
Brazilian RealBRL#.##10000.00Two decimal places
Indian RupeeINR#.##10000.00Two decimal places
Philippine PesoPHP#.##10000.00Two decimal places
Mexican PesoMXN#.##500.00Two decimal places
Peruvian SolPEN#.##200.00Two decimal places
Colombian PesoCOP#.##50000.00Two decimal places
Chilean PesoCLP#50000Integer format, no decimal places

Cryptocurrencies

CurrencyCodeFormatExampleDescription
Tether USDUSDT#.####200.0000Four decimal places for precision
BitcoinBTC#.####0.0001Four decimal places for precision
EthereumETH#.####1.5000Four decimal places for precision
TRONTRX#.####1000.0000Four decimal places for precision
Binance CoinBNB#.####5.0000Four decimal places for precision

Implementation Examples

{
  "currency": "IDR",
  "amount": 10000
}

Amount Processing Guidelines

Precision Requirements

  • Fiat Currencies: Follow local currency precision standards
  • Cryptocurrencies: Use four decimal places for maximum precision
  • Rounding: Apply appropriate rounding rules for each currency

Validation Rules

  • Minimum Amount: Each currency has specific minimum transaction amounts
  • Maximum Amount: Platform-specific limits apply to all currencies
  • Format Validation: Amounts must match currency-specific format requirements

Settlement Processing

  • Amount Reconciliation: Verify transaction amount matches settlement amount
  • Currency Conversion: Handle cross-currency transactions appropriately
  • Fee Calculation: Apply transaction fees based on currency and amount

Security and Compliance

Amount Validation

  • Range Checking: Validate amounts against minimum and maximum limits
  • Format Verification: Ensure amounts match currency format specifications
  • Fraud Detection: Monitor for suspicious transaction patterns

Regulatory Compliance

  • Local Regulations: Adhere to regional currency and transaction regulations
  • Reporting Requirements: Maintain accurate records for regulatory reporting
  • Audit Trail: Complete audit trail for all amount-related operations
Last update: