Jump to content

Create Add Funds Invoice with discount


erock4

Recommended Posts

Is it possible to create an "Add Funds" invoice for a client without sending them an email? I want to incentivize my clients to pre-fund their account by giving them a discount. So for example, they could add $100 worth of credit to their account by only paying $90. I'd also be interested in doing this with the external API, but I'm not sure how to generate an Add Funds invoice with the API.

Link to comment
Share on other sites

4 hours ago, Kian said:

Think twice. Basically you are creating money from nothing. I pay 90 (taxed) and get 100. Before you start coding give a call to your accountant to make sure everything is fine.

This does not answer my question. There's nothing wrong with offering a discount on an Add Funds invoice vs a discount on a product or services invoice.

I can do this now within WHMCS; after I make an Add Funds invoice, I simply add another line item with a negative value for the discount and it works as I expect. The problem is that I can't seem to stop the initial Add Funds invoice from automatically being sent to my client before I can add the discount. This is why I was interested in creating the Add Funds invoice with the external API for example.

Link to comment
Share on other sites

I do know that I didn't answer to your question. I just wanted to be helpful letting you know that this kind of change could cause billing mistakes. Over the years it happened with a lot of customers therefore before investing 15 minutes of my time giving you the snippet, I wanted to make sure that you were doing it in the right way. I don't like to share code that potentially could cause billing nightmares - you didn't mention you were adding another line with a negative amount.

On 10/18/2019 at 7:09 PM, erock4 said:

Is it possible to create an "Add Funds" invoice for a client without sending them an email?

Yes:

  1. EmailPreSend (abortsend = true)
  2. UpdateInvoice (add a new line with negative newitemamount)
  3. SendEmail (re-send the previously suppressed email)
Link to comment
Share on other sites

On 18/10/2019 at 18:09, erock4 said:

I want to incentivize my clients to pre-fund their account by giving them a discount. So for example, they could add $100 worth of credit to their account by only paying $90.

there are multiple commercial addons that can do that, e.g one would be Bonus For Funds - though i'm not sure if the bonus is automated or if you have to manually decide when to add it... the developers will know, so they'd be the ones to ask on that.

13 minutes ago, erock4 said:

I can do this now within WHMCS; after I make an Add Funds invoice, I simply add another line item with a negative value for the discount and it works as I expect. The problem is that I can't seem to stop the initial Add Funds invoice from automatically being sent to my client before I can add the discount. This is why I was interested in creating the Add Funds invoice with the external API for example.

there was a hook that was posted a couple of years ago that prevented the Add Funds emails from being delivered to the client...

I suppose in your case you could modify the hook to disable sending only if it's add funds AND there isn't a discount/negative line in the same invoice (if you're wanting to manually edit the invoice after creation)...

Link to comment
Share on other sites

2 hours ago, brian! said:

there was a hook that was posted a couple of years ago that prevented the Add Funds emails from being delivered to the client...

ohhh I was looking for  some hook like this... Sometimes I have a client (let´s say VIP client), and also this client ask to add funds by phone, as he do not use client area,  so  I have to add it on Admin side, and since it is client from long years, he will pay   monthly, so all add funds requested  should be add by admin side . I usually create manually invoice and add invoice line Add funds, because if i just create Add funds on admin it will send invoice on the same  moment to a client, and i want to choose when to send (end of month). If i prevent  add funds to be sent , sounds great. Will give that hook a try.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated