Create Invoice
Create a new invoice with items and payment details.
Important: For most use cases, use the Checkout/Payment Link API (/v2/payment_links) instead. It generates a payment link that you can embed in your own web page or redirect to.
Use Cases:
- Create an invoice and manually mark it as paid for reference
- Automated invoice generation
Request body
Whether to send a notification to the consumer about the invoice
Invoice description or notes
List of coupon UUIDs to apply for discounts
UUID of the consumer who will pay this invoice
UUID of the beneficiaries to the consumer who will pay this invoice
Payment due date. After this date, the invoice will be marked as overdue
If enabled, all coupons (invoice-level and item-level) will be excluded when the payer chooses installments. The payer will need to pay the full amount without discounts when paying by installments.
ISO 4217 currency codes supported by Moyasar.
Includes all currencies supported by Moyasar payment gateway.
Response
Successful Response
Creation timestamp of the object.
Last modification timestamp of the object.
Unique identifier (UUID) of the invoice
Unique identifier (UUID) of the payment link if invoice was created from one
Unique identifier (UUID) of the metered subscription billed by this invoice
Unique identifier (UUID) of the user who created the invoice
Unique identifier (UUID) of the organization
Unique identifier (UUID) of the organization consumer
Unique identifier (UUID) of the account
Unique identifier (UUID) of the branch
Organization-specific invoice number
Description of the invoice
Total invoice amount after discounts (in invoice currency)
Original invoice amount before discounts (in invoice currency)
Total amount discounted at the item level
Total VAT amount calculated from products
Total price excluding VAT
ISO 4217 currency codes supported by Moyasar.
Includes all currencies supported by Moyasar payment gateway.
Total in home currency (SAR) for reporting. Equals total_amount for SAR invoices.
Actual settled amount in home currency (SAR) after payment processing.
Exchange rate used at invoice creation time (for audit). 1 for SAR invoices.
Message to display to the consumer
Invoice status enum representing the lifecycle/state of an invoice.
Status describes the current stage of an invoice in its lifecycle (DRAFT → CREATED → ACCEPTED → COMPLETED). This changes over time as the invoice progresses. Different from InvoiceType which describes the payment structure.
Start date and time of the billing period
End date and time of the billing period
Number of intervals per billing cycle for recurring invoices
Invoice type enum representing the payment structure/pattern of an invoice.
Type describes how the invoice is structured for payments (ONE_OFF, RECURRING, INSTALLMENTS, etc.). This is determined at invoice creation and typically doesn't change. Different from InvoiceStatusEnum which describes the current lifecycle state of the invoice.
Number of payment rows on the invoice (updated when payments are added or split)
Global unique invoice number
Remaining amount to be paid
Total amount already paid
Whether coupons are excluded when paying by installments
Unique identifier (UUID) of the subscription if this invoice is part of a subscription
Parent invoice ID for recurring invoices
URL to access the invoice
Sum of credit adjustment amounts (absolute value of negative net changes)
Sum of debit adjustment amounts
Sum of payment refunds on this invoice
Sum of paid payment amounts minus total_refunded
Total invoice amount in smallest currency unit (e.g. halala for SAR).
Original invoice amount (before discounts) in smallest currency unit.
Remaining amount in smallest currency unit.
Paid amount in smallest currency unit.
Changes
No recorded changes to this endpoint across all 1 revision of this API.