Skip to main content

Data Model

smilepayz teamsAbout 2 min

Data Model Overview

This section provides comprehensive documentation for all data models used in the Smilepayz API system. Data models define the structure and format of request and response parameters, ensuring consistent and reliable API communication.

Core Data Models

NoModel NameDescription
1Money ModelCurrency and amount specifications for transactions
Features: Multi-currency support, precision handling
Components: currency, amount, payAmount
2Merchant ModelMerchant identification and hierarchy information
Features: Primary and sub-merchant support
Components: merchantId, merchantName, subMerchantId
3Payer ModelCustomer information for pay-in transactions
Features: Regional identity requirements
Components: name, email, phone, idType, identity
4Receiver ModelRecipient information for pay-out transactions
Features: Regional compliance requirements
Components: name, email, phone, idType, identity, taxNumber
5Payment Channel ModelPayment method and processing information
Features: Multi-payment method support
Components: paymentMethod, paymentUrl, qrString, vaNumber
6Transaction Status ModelTransaction lifecycle state definitions
Features: Status tracking and monitoring
Components: INIT, PROCESSING, SUCCESS, FAILED, EXPIRED
7Trade Type ModelTransaction type classification
Features: Pay-in and pay-out differentiation
Components: Pay-In (1), Pay-Out (2)
8Item Detail ModelProduct and service information
Features: Item specifications and pricing
Components: name, quantity, price
9Area ModelRegional and network specifications
Features: Geographic and cryptocurrency support
Components: Regional codes, currency mapping

Model Categories

Transaction Models

Models specifically designed for financial transaction processing:

  • Money Model: Currency and amount handling
  • Trade Type Model: Transaction classification
  • Transaction Status Model: Status tracking

Entity Models

Models for identifying and managing business entities:

  • Merchant Model: Merchant identification and hierarchy
  • Payer Model: Customer information
  • Receiver Model: Recipient information

Processing Models

Models for payment processing and routing:

  • Payment Channel Model: Payment method specifications
  • Area Model: Regional and network support
  • Item Detail Model: Product and service details

Data Model Characteristics

Standardization

  • Consistent Format: All models follow standardized JSON format
  • Type Safety: Clear data type specifications for all parameters
  • Validation Rules: Comprehensive validation requirements
  • Documentation: Complete parameter documentation and examples

Regional Support

  • Multi-Region: Support for multiple countries and markets
  • Local Compliance: Regional regulatory compliance requirements
  • Currency Support: Multi-currency transaction processing
  • Payment Methods: Region-specific payment channel support

Security Features

  • Data Encryption: Sensitive data encryption in transit
  • Access Control: Role-based access control for data models
  • Audit Trail: Complete audit trail for data model usage
  • Privacy Protection: GDPR and regional privacy law compliance

Implementation Guidelines

Model Usage

  • Request Models: Used for API request parameter validation
  • Response Models: Used for API response data formatting
  • Validation: Comprehensive parameter validation and error handling
  • Documentation: Complete model documentation with examples

Best Practices

  • Consistent Naming: Standardized naming conventions across all models
  • Type Validation: Strict data type validation for all parameters
  • Error Handling: Comprehensive error handling for invalid data
  • Performance: Optimized model structure for efficient processing

Integration Support

  • SDK Integration: Full SDK support for all data models
  • Code Examples: Complete implementation examples
  • Testing: Comprehensive testing framework for model validation
  • Documentation: Detailed integration guides and tutorials

Model Evolution

Version Management

  • Backward Compatibility: Maintain backward compatibility for existing models
  • Version Control: Clear versioning strategy for model updates
  • Migration Support: Migration guides for model changes
  • Deprecation Policy: Clear deprecation and sunset policies

Enhancement Process

  • Feature Requests: Structured process for model enhancement requests
  • Review Process: Comprehensive review process for model changes
  • Testing: Extensive testing for model modifications
  • Documentation: Updated documentation for all model changes
Last update: