# moneroohq/moneroo-php architecture

> Architecture diagram of the GitHub repository moneroohq/moneroo-php, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moneroohq/moneroo-php
- Repository: https://github.com/moneroohq/moneroo-php

## Overview

Moneroo PHP SDK is a client library for calling the Moneroo API. An application supplies a secret key and invokes payment or payout operations; those operations delegate HTTP work to the shared request trait, which sends authenticated JSON requests and returns decoded API data or throws mapped exceptions. The README documents configurable development API URLs. Payment and payout status constants are included as domain references; sampled code does not show them controlling request flow.

Main entry points: [`src/Traits/Request.php`](https://github.com/moneroohq/moneroo-php/blob/main/src/Traits/Request.php) (Request handling), [`src/Moneroo.php`](https://github.com/moneroohq/moneroo-php/blob/main/src/Moneroo.php) (Moneroo client), [`src/Payment.php`](https://github.com/moneroohq/moneroo-php/blob/main/src/Payment.php) (Payment operations), [`src/Payout.php`](https://github.com/moneroohq/moneroo-php/blob/main/src/Payout.php) (Payout operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["SDK setup"]
  node_client["Moneroo client<br/>[Moneroo.php]"]
  node_config["API config<br/>[Config.php]"]
end

subgraph group_payments["Payments"]
  node_payment["Payment operations<br/>[Payment.php]"]
  node_payment_status["Payment statuses<br/>[Status.php]"]
end

subgraph group_payouts["Payouts"]
  node_payout["Payout operations<br/>[Payout.php]"]
  node_payout_status["Payout statuses<br/>[Status.php]"]
end

subgraph group_transport["HTTP transport"]
  node_request["Request handling<br/>[Request.php]"]
  node_exceptions["API exceptions"]
end

node_application(("PHP application"))
node_moneroo_api{{"Moneroo API"}}

node_application -->|"configures"| node_client
node_application -->|"invokes"| node_payment
node_application -->|"invokes"| node_payout
node_client -->|"reads defaults"| node_config
node_payment -->|"sends requests"| node_request
node_payout -->|"sends requests"| node_request
node_request -->|"reads timeout"| node_config
node_request -->|"sends JSON"| node_moneroo_api
node_moneroo_api -->|"returns response"| node_request
node_request -->|"maps errors"| node_exceptions

click node_client "https://github.com/moneroohq/moneroo-php/blob/main/src/Moneroo.php"
click node_config "https://github.com/moneroohq/moneroo-php/blob/main/src/Configs/Config.php"
click node_payment "https://github.com/moneroohq/moneroo-php/blob/main/src/Payment.php"
click node_payment_status "https://github.com/moneroohq/moneroo-php/blob/main/src/Payment/Status.php"
click node_payout "https://github.com/moneroohq/moneroo-php/blob/main/src/Payout.php"
click node_payout_status "https://github.com/moneroohq/moneroo-php/blob/main/src/Payout/Status.php"
click node_request "https://github.com/moneroohq/moneroo-php/blob/main/src/Traits/Request.php"
click node_exceptions "https://github.com/moneroohq/moneroo-php/tree/main/src/Exceptions"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_config toneBlue
class node_payment,node_payment_status toneAmber
class node_payout,node_payout_status,node_moneroo_api toneMint
class node_request,node_exceptions toneRose
class node_application toneIndigo
```

## Components

### SDK setup

- [Moneroo client](https://github.com/moneroohq/moneroo-php/blob/main/src/Moneroo.php): `src/Moneroo.php`
- [API config](https://github.com/moneroohq/moneroo-php/blob/main/src/Configs/Config.php): `src/Configs/Config.php`

### Payments

- [Payment operations](https://github.com/moneroohq/moneroo-php/blob/main/src/Payment.php): `src/Payment.php`
- [Payment statuses](https://github.com/moneroohq/moneroo-php/blob/main/src/Payment/Status.php): `src/Payment/Status.php`

### Payouts

- [Payout operations](https://github.com/moneroohq/moneroo-php/blob/main/src/Payout.php): `src/Payout.php`
- [Payout statuses](https://github.com/moneroohq/moneroo-php/blob/main/src/Payout/Status.php): `src/Payout/Status.php`

### HTTP transport

- [Request handling](https://github.com/moneroohq/moneroo-php/blob/main/src/Traits/Request.php): `src/Traits/Request.php`
- [API exceptions](https://github.com/moneroohq/moneroo-php/tree/main/src/Exceptions): `src/Exceptions`

### Other components

- **PHP application**
- **Moneroo API**

## Connections

- PHP application → Moneroo client: configures
- PHP application → Payment operations: invokes
- PHP application → Payout operations: invokes
- Moneroo client → API config: reads defaults
- Payment operations → Request handling: sends requests
- Payout operations → Request handling: sends requests
- Request handling → API config: reads timeout
- Request handling → Moneroo API: sends JSON
- Moneroo API → Request handling: returns response
- Request handling → API exceptions: maps errors
