# Issue : Creating Invoice with deposit option activated with createinvoice()

**URL:** <https://forum.wixstudio.com/t/issue-creating-invoice-with-deposit-option-activated-with-createinvoice/55806>\
**Category:** Ask the community\
**Tags:** technical-talk, question, code\
**Created:** [January 27, 2024, 1:48pm UTC](https://forum.wixstudio.com/t/issue-creating-invoice-with-deposit-option-activated-with-createinvoice/55806 "2024-01-27T13:48:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aflambeaux](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/aflambeaux/32/16087_2.png) [@aflambeaux](https://forum.wixstudio.com/u/aflambeaux)\
**Post date:** [January 27, 2024, 1:48pm UTC](https://forum.wixstudio.com/t/issue-creating-invoice-with-deposit-option-activated-with-createinvoice/55806/1 "2024-01-27T13:48:54Z")

</div>

Hello Wix Velo Community,

I am working on a project where I need to create invoices with a 25% deposit of the total using Wix Velo. Here is my current code:

```javascript
let createInvoiceFields = {
    "status": "PartialAndOverdue",
    "title": title,
    "customer": customer,
    "currency": "EUR",
    "lineItems": lineItems,
    "metadata": metadata,
    "dates": dates,
    "totals": {
        "subtotal": totalLineItems, // Initial total amount
        "total": depositAmount // 25% of the total amount
    }
};

```

Unfortunately, this is not working as expected. I am struggling to make the invoice reflect the 25% deposit correctly. Do you have any suggestions or corrections to my approach? Any advice or example code would be greatly appreciated.

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![aflambeaux](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/aflambeaux/32/16087_2.png) [@aflambeaux](https://forum.wixstudio.com/u/aflambeaux)\
**Post date:** [January 29, 2024, 5:58am UTC](https://forum.wixstudio.com/t/issue-creating-invoice-with-deposit-option-activated-with-createinvoice/55806/2 "2024-01-29T05:58:58Z")

</div>

Does someone has an idea?
