# assemiendev/money-fusion-php architecture

> Architecture diagram of the GitHub repository assemiendev/money-fusion-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/assemiendev/money-fusion-php
- Repository: https://github.com/assemiendev/money-fusion-php

## Overview

This is a small PHP SDK for creating and retrieving Money Fusion payments. An integrating application calls `PaymentClient`; the client builds the creation payload and makes HTTP requests to Money Fusion, returning decoded responses. Payment creation includes return and webhook URLs, which Money Fusion uses for the documented post-payment destinations. Both SDK methods share one source file; finer internal separation is not supported by the tree. The webhook and return interactions are documented capabilities, not observed SDK code.

Main entry points: [`src/PaymentClient.php`](https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php) (PaymentClient)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_integrator(("Integrating application"))
node_client["PaymentClient<br/>[PaymentClient.php]"]
node_create["Create payment<br/>[PaymentClient.php]"]
node_retrieve["Retrieve payment<br/>[PaymentClient.php]"]
node_moneyfusion["Money Fusion API"]
node_return["Return URL"]
node_webhook["Webhook URL"]

node_integrator -->|"calls"| node_client
node_client -->|"calls"| node_create
node_client -->|"calls"| node_retrieve
node_create -->|"POSTs payload"| node_moneyfusion
node_moneyfusion -->|"returns response"| node_create
node_retrieve -->|"GETs payment"| node_moneyfusion
node_moneyfusion -->|"returns details"| node_retrieve
node_moneyfusion -.->|"redirects"| node_return
node_moneyfusion -.->|"notifies"| node_webhook

click node_client "https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php"
click node_create "https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php"
click node_retrieve "https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php"

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_integrator,node_return toneIndigo
class node_client toneBlue
class node_create,node_retrieve toneTeal
class node_moneyfusion,node_webhook toneMint
```

## Components

### Other components

- **Integrating application**
- [PaymentClient](https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php): `src/PaymentClient.php`
- [Create payment](https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php): `src/PaymentClient.php`
- [Retrieve payment](https://github.com/assemiendev/money-fusion-php/blob/master/src/PaymentClient.php): `src/PaymentClient.php`
- **Money Fusion API**
- **Return URL**
- **Webhook URL**

## Connections

- Integrating application → PaymentClient: calls
- PaymentClient → Create payment: calls
- PaymentClient → Retrieve payment: calls
- Create payment → Money Fusion API: POSTs payload
- Money Fusion API → Create payment: returns response
- Retrieve payment → Money Fusion API: GETs payment
- Money Fusion API → Retrieve payment: returns details
- Money Fusion API → Return URL: redirects
- Money Fusion API → Webhook URL: notifies
