Jump to content
  • 0

PHP API Find out if client hasn't paid?



3 answers to this question

Recommended Posts

  • 0

Not sure about the API but's it's simple enough with a query - just look for invoices for the user with status unpaid, which have an invoiceitem matching the hosting id :)



select (whatever) from tblinvoices as i, tblinvoiceitems as ii where i.userid=(someone) and i.status="Unpaid" and ii.invoiceid=i.id and ii.relid=(the id from tblhosting) and ii.type="product"

Link to comment
Share on other sites

  • 0

HI RustBuck,

The one think I love about WHMCS is it's simple database design/structure so even without an API you can easily query the database to get all sorts of info.

In your, the invoices are stored in one table which has the due date and the Paid date or status as fields so you could easily using the client id read the DB and check what you want to do.

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.

Answer this question...

×   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