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

# [Enum]Enums

## Connections
[[_VomPay]] · [[[Model]Models]] · [[[Service]SupplierServices]] · [[[Service]InvoiceServices]] · [[[Action]Actions]]

## Source
`Modules/VomPay/Enums/`

---

## VomPayInvoiceStatusesEnum
| Constant | Value |
|---|---|
| CREATED | `CREATED` |
| SUCCESS | `SUCCESS` |
| FAILED | `FAILED` |
| CANCELED | `CANCELED` |
| AUTHORIZE | `AUTHORIZE` |

`Statuses` array holds all values. Used to filter dashboard and update webhook state.

---

## VomPayInvoiceTypesEnum
| Constant | Value | Model |
|---|---|---|
| INVOICE | `invoice` | Invoice::class |
| PROFORMA | `proforma` | ProformaInvoice::class |
| ESTIMATE | `estimate` | SalesEstimate::class |
| DEBIT_NOTE | `debit_note` | Invoice::class |

`TYPES_PATHS` maps type string → model class. Used to resolve the payable model from webhook `CustomerReference`.

---

## VomPaySupplierTypesEnum
| Constant | Value |
|---|---|
| INDIVIDUAL | `individual` |
| COOPERATIVE | `cooperative` |
| COMPANY | `company` |

Determines which registration form view to render.

---

## VomPaySupplierStatusesEnum
| Constant | Value | Meaning |
|---|---|---|
| CREATED | 1 | Registered in MyFatoorah, not yet activated |
| COMPLETED_PROFILE | 2 | Submitted for review |
| APPROVED | 3 | Active — can generate payment links |
| REJECTED | 4 | Rejected by MyFatoorah |
| DEACTIVATED | 5 | Disabled by VoM admins |
| UPDATED | 6 | Data changed, awaiting re-activation |

---

## VomPayPaymentMethodsEnum
| Constant | Value | PaymentMethodId |
|---|---|---|
| VISA_MASTER | `visa_or_master_card` | 2 |
| MADA | `mada` | 6 |
| APPLE_PAY | `apple_pay` | 11 |
| APPLE_PAY_MADA | `apple_pay_mada` | 13 / 25 |

`METHODS` maps each to: `id` · `name_ar` · `name_en` · `image_url` (MyFatoorah CDN).

---

## VomPayInvoiceNotificationTypesEnum
| Constant | Value | Meaning |
|---|---|---|
| EMAIL | `EML` | Send via email only |
| MOBILE | `SMS` | Send via SMS only |
| LINK_ONLY | `LNK` | Generate link, no notification |
| ALL_OPTIONS | `ALL` | Email + SMS |

Used in `GeneratingPaymentLinkAction.getNotificationOption()` based on customer contact data.

---

## VomPayWebHookEventsEnum
| Constant | Value | Handler Service |
|---|---|---|
| SUPPLIER_STATUS_CHANGED | `SupplierStatusChanged` | VomPaySupplierStatusService |
| TRANSACTION_STATUS_CHANGED | `TransactionsStatusChanged` | VomPayInvoiceStatusService |
| BALANCE_TRANSFERRED | `BalanceTransferred` | VomPayBalanceTransferredService |

`EVENTS` maps event name → handler class (used to route incoming webhooks).

`HANDLE_SUCCESS_STATUS_SERVICES` maps invoice type → status handler:
- `INVOICE` → VomPayStatusHandlerForInvoiceService
- `DEBIT_NOTE` → VomPayStatusHandlerForDebitNoteService

---

## VomPayPackagesEnum
Defines which subscription packages support VomPay and their commission rates per payment method.

| Constant | Value |
|---|---|
| ADVANCED | 2 |
| UNLIMITED | 3 |
| NEW_ADVANCED | 5 |
| NEW_UNLIMITED | 6 |

`PACKAGES_SUPPORT_VOM_PAY = [UNLIMITED, NEW_UNLIMITED, ADVANCED, NEW_ADVANCED]`

Commission structure per entry: `PaymentMethodId` · `CommissionValue` · `CommissionPercentage` · `IsPercentageOfNetValue`

Lookup keys: `METHODS` (by package + method) · `COMMISSIONS_BY_METHODS_NAMES` (by method name) · `PACKAGE_COMMISSIONS` (by package with method name keys)

---

## VomPayPackagesEnumDemo
Demo/test variant of `VomPayPackagesEnum`. Only VISA/MASTER + MADA (no Apple Pay). Slightly different commission values. Used when `APP_ENV != production` via `VomPaySupplierService.getVomPayPackage()`.
