---
tags: [vompay, service]
module: VomPay
---

# [Service]MyFatoorahAPIServices

## Connections
[[_VomPay]] · [[[Action]Actions]] · [[[Service]SupplierServices]] · [[[Service]InvoiceServices]] · [[[Service]DashboardSettingsServices]]

## Source
`Modules/VomPay/Services/MyFatoorah/`

Both services use `GuzzleHttpClientEncodingBody` (injected) for HTTP. All requests send `Authorization: Bearer {config('vompay.token')}` + JSON headers. Endpoints defined in `config('vompay.*')`.

---

## MyFatoorahInvoiceAPIService

Handles payment link generation.

| Method | HTTP | Endpoint config key | Purpose |
|---|---|---|---|
| generatePaymentLink($invoiceData) | POST | `vompay.invoice.generate_payment_link` | Create payment link in MyFatoorah; returns `InvoiceURL` + `InvoiceId` |

Called by `GeneratingPaymentLinkAction`.

---

## MyFatoorahSupplierAPIService

Handles all supplier (merchant) operations.

| Method | HTTP | Purpose |
|---|---|---|
| getBanksData() | GET | Available bank list for supplier registration form |
| createSupplier($supplier) | POST | Register new supplier/merchant in MyFatoorah |
| uploadSupplierDocument($documentData) | PUT | Upload KYC or business document (base64-encoded) |
| setCommissions($commissions) | POST | Set initial commission structure for supplier |
| updateCommissions($commissions) | POST | Update existing commission rates |
| getSupplierDashboard($supplierId) | GET | Supplier metrics from MyFatoorah dashboard |
| getSupplierDeposits($supplierId) | GET | Deposit history for the supplier |

Called by: `CreatingMyFatoorahSupplierAction` · `SetMyFatoorahCommissionsAction` · `UploadingSupplierDocumentAction` · `UpdateMyFatoorahCommissionsAction` · `VomPayDashboardService`
