Overview
Moyasar integration in Flexprice syncs invoices to Moyasar and generates a payment link (Moyasar invoice URL) for each synced invoice.Synchronization Flow
The sync process is one-way (Flexprice → Moyasar) and works as follows:How it Works
Invoice Data Model
Flexprice Invoice Structure
Moyasar Invoice Structure
Sync Configuration
The following fields are mapped during sync:| Field | Flexprice → Moyasar | Notes |
|---|---|---|
amount | ✅ | Converted to smallest unit (e.g., Halalah) |
currency | ✅ | Passed as-is (e.g., SAR) |
description | ✅ | Summary of line items |
metadata | ✅ | Includes flexprice_invoice_id for tracking |
Payment Flow & Webhooks
Payment Journey
Error Handling
| Error | Cause |
|---|---|
Moyasar connection not configured | No active Moyasar connection found for the tenant/env. |
Currency not supported | Invoice currency (e.g., INR) not supported by your Moyasar account. |
Invalid amount | Amount must be positive. |
Testing
Test Cards (Moyasar Sandbox)
| Number | Expiry | CVC | Result |
|---|---|---|---|
4111 1111 1111 1111 | Future | 123 | Success |
4000 0000 0000 0002 | Future | 123 | Failure |

