Discussions

Ask a Question
Back to All

how can add discount on total amount not on each item

i provide some services (items) and provide discount on total amount of each services but in body of post invoices not allow to add discount on total amount

const payload = {
currency: "SAR",
language: "ar",
tax_amount_type: "TAX_INCLUSIVE",
line_items: aggregatedItems,
contact: { name: payment.patient.fullName },
channels: [
{
medium: "email",
data: {
subject: "فاتورة الحجز",
message: "تم ارسال الفاتورة بنجاح",
recipients: {
to: [payment.patient.email || "[email protected]"],
},
},
},
],
invoice_date: new Date().toISOString().split("T")[0],
invoice_number: ${booking.id},
};