Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

GetInvoice()

hitmanpt edited this page Feb 10, 2017 · 2 revisions

Through this explanation we assume that you have using WHMCS_API; on the begining of the file
And the API() class initialized as _api
If needed check the Getting Started page

Contents


Function Overview

Prototype: public GetInvoice.GetInvoice GetInvoice(int InvoiceID)

Input:

  • InvoiceID: The ID of the invoice to retrieve (required)

Output: GetInvoice Model


Function Details

To call it just use GetInvoice.GetInvoice i = _api.GetInvoice(1);

The GetTransactions model is inside it's own namespace (more info)

View all details about GetInvoice Model

https://developers.whmcs.com/api-reference/getinvoice/

Donate


Full example

using WHMCS_API;

namespace YourApp
{
  class YourClass
  {
    public void YourFunction()
    {
       API _api = new API("username", "password", "accesskey", "url");
       GetInvoice.GetInvoice i = _api.GetInvoice(1);  
       Console.WriteLine("UserID: {0} Invoice total: {1}", i.UserID, i.Total);
    }
  }
}