> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zuba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform Overview

> Understanding the Zuba Payment Platform architecture

## System Architecture

The Zuba Payment Platform is built around several core components that work together to provide comprehensive payment processing capabilities:

<div className="grid grid-cols-1 md:grid-cols-2 gap-4 my-6">
  <div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
    <h3 className="text-lg font-semibold mb-2">🚀 Payouts Engine</h3>

    <p className="text-sm text-gray-600 dark:text-gray-400">
      Send money globally via SEPA, crypto wallets, and traditional banking networks with real-time tracking and compliance.
    </p>
  </div>

  <div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
    <h3 className="text-lg font-semibold mb-2">💳 Payment Acceptance</h3>

    <p className="text-sm text-gray-600 dark:text-gray-400">
      Accept payments through Open Banking, manual deposits, and various payment methods with instant settlement.
    </p>
  </div>

  <div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
    <h3 className="text-lg font-semibold mb-2">📊 Ledger System</h3>

    <p className="text-sm text-gray-600 dark:text-gray-400">
      Double-entry accounting system with multi-currency support, real-time balance tracking, and comprehensive audit trails.
    </p>
  </div>

  <div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
    <h3 className="text-lg font-semibold mb-2">🔌 Provider Network</h3>

    <p className="text-sm text-gray-600 dark:text-gray-400">
      Integrated network of payment providers, FX services, and custody solutions for optimal routing and rates.
    </p>
  </div>
</div>

## Data Flow

```mermaid theme={"dark"}
graph LR
    A[Client Application] --> B[Zuba API]
    B --> C[Authentication Layer]
    C --> D[Business Logic]
    D --> E[Ledger System]
    D --> F[Payment Providers]
    F --> G[External Banks/Wallets]
    E --> H[Database]
    D --> I[Webhooks]
    I --> A
```

## Key Entities

### Beneficiaries

Recipients of payouts with associated account information:

* Personal information (name, email, address)
* Multiple accounts (bank accounts, crypto wallets)
* KYC status and compliance data
* Transaction history

### Accounts

Payment destinations with specific details:

* **Bank Accounts**: IBAN, SWIFT, routing numbers
* **Crypto Wallets**: Blockchain addresses and networks
* **Mobile Money**: Phone numbers and provider details

### Transactions

All payment activities recorded in the ledger:

* **Payouts**: Outbound payments to beneficiaries
* **Payins**: Incoming payments from customers
* **Internal Transfers**: Balance movements between accounts
* **FX Transactions**: Currency conversion records

## Payment Flow States

```mermaid theme={"dark"}
stateDiagram-v2
    [*] --> created
    created --> queued
    queued --> processing
    processing --> paid
    processing --> failed
    created --> cancelled
    queued --> cancelled
    failed --> [*]
    paid --> [*]
    cancelled --> [*]
```

### Status Definitions

| Status       | Description                         | Actions Available |
| ------------ | ----------------------------------- | ----------------- |
| `created`    | Payment created, awaiting queue     | Cancel            |
| `queued`     | Payment queued for processing       | Cancel            |
| `processing` | Payment being processed by provider | View, Track       |
| `paid`       | Payment successfully delivered      | View, Receipt     |
| `failed`     | Payment failed due to error         | Retry             |
| `cancelled`  | Payment cancelled by user/system    | View              |

## Multi-Currency Support

The platform supports over 100 currencies with real-time conversion:

* **Fiat Currencies**: USD, EUR, GBP, JPY, and more
* **Stablecoins**: Various USD and EUR-pegged tokens

### Currency Conversion

* Real-time exchange rates from multiple providers
* Transparent fee structure
* Rate locking for large transactions
* Historical rate tracking

## Compliance Framework

Built-in compliance features ensure regulatory adherence:

<AccordionGroup>
  <Accordion title="KYC (Know Your Customer)">
    * Identity verification for beneficiaries
    * Document collection and validation
    * Risk assessment and scoring
    * Ongoing monitoring and updates
  </Accordion>

  <Accordion title="AML (Anti-Money Laundering)">
    * Transaction monitoring and screening
    * Sanctions list checking (OFAC, EU, UN)
    * Suspicious activity reporting
    * Transaction limits and controls
  </Accordion>

  <Accordion title="Regulatory Reporting">
    * Automated regulatory filing
    * Transaction reporting for authorities
    * Audit trail maintenance
    * Data retention policies
  </Accordion>
</AccordionGroup>

## Provider Integration

The platform integrates with multiple payment providers for optimal coverage:

### Payment Rails

* **SEPA**: European bank transfers
* **SWIFT**: International wire transfers
* **Faster Payments**: UK instant transfers
* **ACH**: US bank transfers
* **Crypto Networks**: Solana, Tron, etc.

### Provider Selection

The system automatically selects optimal providers based on:

* Destination country and currency
* Cost and speed preferences
* Success rates and reliability
* Compliance requirements

## Security & Infrastructure

### Data Security

* End-to-end encryption for sensitive data
* PCI DSS compliance for card data
* SOC 2 Type II certification
* Regular security audits and penetration testing

### Infrastructure

* Multi-region deployment with 99.9% uptime SLA
* Auto-scaling based on demand
* Comprehensive monitoring and alerting
* Disaster recovery and backup systems

## Getting Started

Ready to integrate? Here's what you need to know:

1. **Authentication**: All API calls require valid API keys
2. **Webhooks**: Set up endpoints for real-time notifications
3. **Testing**: Use test API keys for development

<Note>
  The platform is designed to be developer-friendly with comprehensive APIs and detailed documentation for easy integration.
</Note>
