Developer Guide

Recurring Invoices

Returns a list of recurring Invoices linked to a specific customer, subject to paging as defined in pagination section

URL

GET https://api.billagain.com/v1/customers/{customerID}/recurring-invoices

URL PARAMETERS (3 Fields)

Parameter Format Description
customerID req Numeric Unique customer identifier
page Numeric Current page number
page_size Numeric Amount of items on requested page

OUTPUT PARAMETERS (24 Fields)

Parameter Format Description
recurInvoiceID Numeric Unique Recurring Invoice identifier
customerID Numeric Unique customer identifier
CurrencyCode Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType Alpha Numeric Recurring invoice term type, will either be months or days
StartDate Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate Date Future date the current recurring invoice is to be sent on
isExpired Boolean Indicates if recurring invoice is expired
isCancelled Boolean An indicator to indicate if recurring invoice is cancelled
numDaysBeforeToInv Numeric Amount of days before the specific recurring invoice will be send
LastModified Date Last date specific recurring invoice was modified
SuspendedDate Date Date customer was suspended if suspended
comp_Status Boolean Computed customer status
CollectionMethod Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on recurring invoice
recurringinvoiceTaxID Numeric The recurring invoice tax identifier
recurringinvoiceID Numeric The recurring invoice identifier
Name Alpha Numeric The name of the tax
Perc Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
recurInvoiceChargeID Numeric The recurring invoice charge identifier
recurInvoiceID Numeric The recurring invoice identifier
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
AmountInc Decimal The total line cost including any taxes (AmountInc = AmountEx + Taxes)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

EXAMPLES

JSON Output

HTTP CODE: 200 OK
[
  {
    "recurInvoiceID": 30119,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T09:08:40.3612764+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30128,
        "recurInvoiceID": 30119,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20057,
        "recurringinvoiceID": 30119,
        "Name": "Vat",
        "Perc": 0.14       
      },
      {
        "recurringinvoiceTaxID": 20058,
        "recurringinvoiceID": 30119,
        "Name": "Tax",
        "Perc": 0.11      
      }
    ]
  },
  {
    "recurInvoiceID": 30118,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:44:31.1115676+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30127,
        "recurInvoiceID": 30118,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20053,
        "recurringinvoiceID": 30118,
        "Name": "Vat",
        "Perc": 0.14     
      },
      {
        "recurringinvoiceTaxID": 20054,
        "recurringinvoiceID": 30118,
        "Name": "Tax",
        "Perc": 0.11   
      }
    ]
  },
  {
    "recurInvoiceID": 30117,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:41:33.7346883+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30126,
        "recurInvoiceID": 30117,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20052,
        "recurringinvoiceID": 30117,
        "Name": "Vat",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30116,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:40:16.4508399+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30125,
        "recurInvoiceID": 30116,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30115,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:37:14.0470833+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30124,
        "recurInvoiceID": 30115,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30114,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:35:09.4224704+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30123,
        "recurInvoiceID": 30114,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30113,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:33:11.6007556+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30122,
        "recurInvoiceID": 30113,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30112,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:31:34.1077796+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30121,
        "recurInvoiceID": 30112,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30111,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:24:02.4309259+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30120,
        "recurInvoiceID": 30111,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30107,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": null,
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:01:09.1756029+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30116,
        "recurInvoiceID": 30107,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20051,
        "recurringinvoiceID": 30107,
        "Name": "Vat",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30106,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": true,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T15:03:54.2297962+00:00",
    "SuspendedDate": null,
    "comp_Status": "Cancelled",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30115,
        "recurInvoiceID": 30106,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30101,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-04-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": null,
    "lastRenewDate": null,
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T08:48:37.8229029+00:00",
    "SuspendedDate": null,
    "comp_Status": "Future",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30110,
        "recurInvoiceID": 30101,
        "Line": "a",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 123,
        "AmountEx": 123,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20043,
        "recurringinvoiceID": 30101,
        "Name": "VAT",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30100,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:51:05.1205147+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30109,
        "recurInvoiceID": 30100,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20055,
        "recurringinvoiceID": 30100,
        "Name": "Vat",
        "Perc": 0.14
      },
      {
        "recurringinvoiceTaxID": 20056,
        "recurringinvoiceID": 30100,
        "Name": "Tax",
        "Perc": 0.11
      }
    ]
  }
]

Returns a list of Recurring Invoices linked to this account, subject to paging as defined in pagination section

URL

GET https://api.billagain.com/v1/recurring-invoices

URL PARAMETERS

None - optional paging values can be passed through

OUTPUT PARAMETERS (24 Fields)

Parameter Format Description
recurInvoiceID Numeric Unique Recurring Invoice identifier
customerID Numeric Unique customer identifier
CurrencyCode Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType Alpha Numeric Recurring invoice term type, will either be months or days
StartDate Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate Date Future date the current recurring invoice is to be sent on
isExpired Boolean Indicates if recurring invoice is expired
isCancelled Boolean An indicator to indicate if recurring invoice is cancelled
numDaysBeforeToInv Numeric Amount of days before the specific recurring invoice will be send
LastModified Date Last date specific recurring invoice was modified
SuspendedDate Date Date customer was suspended if suspended
comp_Status Boolean Computed customer status
CollectionMethod Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on recurring invoice
recurringinvoiceTaxID Numeric The recurring invoice tax identifier
recurringinvoiceID Numeric The recurring invoice identifier
Name Alpha Numeric The name of the tax
Perc Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
recurInvoiceChargeID Numeric The recurring invoice charge identifier
recurInvoiceID Numeric The recurring invoice identifier
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
AmountInc Decimal The total line cost including any taxes (AmountInc = AmountEx + Taxes)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

EXAMPLES

JSON Output

HTTP CODE: 200 OK
[
  {
    "recurInvoiceID": 30119,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T09:08:40.3612764+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30128,
        "recurInvoiceID": 30119,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20057,
        "recurringinvoiceID": 30119,
        "Name": "Vat",
        "Perc": 0.14
      },
      {
        "recurringinvoiceTaxID": 20058,
        "recurringinvoiceID": 30119,
        "Name": "Tax",
        "Perc": 0.11
      }
    ]
  },
  {
    "recurInvoiceID": 30118,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:44:31.1115676+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30127,
        "recurInvoiceID": 30118,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20053,
        "recurringinvoiceID": 30118,
        "Name": "Vat",
        "Perc": 0.14
      },
      {
        "recurringinvoiceTaxID": 20054,
        "recurringinvoiceID": 30118,
        "Name": "Tax",
        "Perc": 0.11
      }
    ]
  },
  {
    "recurInvoiceID": 30117,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:41:33.7346883+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30126,
        "recurInvoiceID": 30117,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20052,
        "recurringinvoiceID": 30117,
        "Name": "Vat",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30116,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:40:16.4508399+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30125,
        "recurInvoiceID": 30116,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30115,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:37:14.0470833+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30124,
        "recurInvoiceID": 30115,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30114,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:35:09.4224704+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30123,
        "recurInvoiceID": 30114,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30113,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:33:11.6007556+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30122,
        "recurInvoiceID": 30113,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30112,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:31:34.1077796+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30121,
        "recurInvoiceID": 30112,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30111,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-03-15T00:00:00+00:00",
    "lastRenewDate": "2017-03-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:24:02.4309259+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30120,
        "recurInvoiceID": 30111,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30107,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": null,
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:01:09.1756029+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30116,
        "recurInvoiceID": 30107,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20051,
        "recurringinvoiceID": 30107,
        "Name": "Vat",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30106,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-04-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": true,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T15:03:54.2297962+00:00",
    "SuspendedDate": null,
    "comp_Status": "Cancelled",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30115,
        "recurInvoiceID": 30106,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": []
  },
  {
    "recurInvoiceID": 30103,
    "customerID": 20624,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-16T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-16T00:00:00+00:00",
    "lastRenewDate": "2017-04-16T00:00:00+00:00",
    "nextRenewDate": "2017-05-16T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T09:01:27.296425+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40248,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30112,
        "recurInvoiceID": 30103,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 123,
        "AmountEx": 123,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20045,
        "recurringinvoiceID": 30103,
        "Name": "VAT",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30102,
    "customerID": 20624,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-04-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": null,
    "lastRenewDate": null,
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T09:00:17.5549369+00:00",
    "SuspendedDate": null,
    "comp_Status": "Future",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40248,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30111,
        "recurInvoiceID": 30102,
        "Line": "a",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 120,
        "AmountEx": 120,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20044,
        "recurringinvoiceID": 30102,
        "Name": "VAT",
        "Perc": 0.14
      }
    ]
  },
  {
    "recurInvoiceID": 30101,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-04-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": null,
    "lastRenewDate": null,
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T08:48:37.8229029+00:00",
    "SuspendedDate": null,
    "comp_Status": "Future",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30110,
        "recurInvoiceID": 30101,
        "Line": "a",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 123,
        "AmountEx": 123,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20043,
        "recurringinvoiceID": 30101,
        "Name": "VAT",
        "Perc": 0.14,
        "Desc": null
      }
    ]
  },
  {
    "recurInvoiceID": 30100,
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-13T08:51:05.1205147+00:00",
    "SuspendedDate": null,
    "comp_Status": "Active",
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30109,
        "recurInvoiceID": 30100,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 20055,
        "recurringinvoiceID": 30100,
        "Name": "Vat",
        "Perc": 0.14
      },
      {
        "recurringinvoiceTaxID": 20056,
        "recurringinvoiceID": 30100,
        "Name": "Tax",
        "Perc": 0.11,
        "Desc": null
      }
    ]
  },
  {
    "recurInvoiceID": 10049,
    "customerID": 10623,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2016-10-17T00:00:00+00:00",
    "EndDate": "2017-04-09T00:00:00+00:00",
    "lastInvDate": "2017-03-17T00:00:00+00:00",
    "lastRenewDate": "2017-03-17T00:00:00+00:00",
    "nextRenewDate": "2017-04-17T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2016-10-17T08:38:16.5274545+00:00",
    "SuspendedDate": null,
    "comp_Status": "Expired",
    "CollectionMethod": "cash",
    "gatewayID": null,
    "customerPaymentMethodID": null,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 10056,
        "recurInvoiceID": 10049,
        "Line": "Test 1",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 250,
        "AmountEx": 250,
        "AmountInc": 0,
        "DisplayOrder": 1
      },
      {
        "recurInvoiceChargeID": 10057,
        "recurInvoiceID": 10049,
        "Line": "Package 1",
        "Descrip": "Package age 1",
        "Qty": 1,
        "UnitCostEx": 200,
        "AmountEx": 200,
        "AmountInc": 0,
        "DisplayOrder": 2
      },
      {
        "recurInvoiceChargeID": 10058,
        "recurInvoiceID": 10049,
        "Line": "Test 1",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 15,
        "AmountEx": 15,
        "AmountInc": 0,
        "DisplayOrder": 3
      }
    ],
    "Taxes": [
      {
        "recurringinvoiceTaxID": 10009,
        "recurringinvoiceID": 10049,
        "Name": "VAT",
        "Perc": 0.14
      },
      {
        "recurringinvoiceTaxID": 10010,
        "recurringinvoiceID": 10049,
        "Name": "VAT",
        "Perc": 0.01
      },
      {
        "recurringinvoiceTaxID": 10011,
        "recurringinvoiceID": 10049,
        "Name": "VAT",
        "Perc": 0.1
      }
    ]
  }
]

Returns a specific recurring invoice

URL

GET https://api.billagain.com/v1/recurring-invoices/{recurInvoiceID}

URL PARAMETERS (1 Field)

Parameter Format Description
recurInvoiceID req Numeric Unique Recurring Invoice identifier

OUTPUT PARAMETERS (24 Fields)

Parameter Format Description
recurInvoiceID Numeric Unique Recurring Invoice identifier
customerID Numeric Unique customer identifier
CurrencyCode Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType Alpha Numeric Recurring invoice term type, will either be months or days
StartDate Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate Date Future date the current recurring invoice is to be sent on
isExpired Boolean Indicates if recurring invoice is expired
isCancelled Boolean An indicator to indicate if recurring invoice is cancelled
numDaysBeforeToInv Numeric Amount of days before the specific recurring invoice will be send
LastModified Date Last date specific recurring invoice was modified
SuspendedDate Date Date customer was suspended if suspended
comp_Status Boolean Computed customer status
CollectionMethod Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on recurring invoice
recurringinvoiceTaxID Numeric The recurring invoice tax identifier
recurringinvoiceID Numeric The recurring invoice identifier
Name Alpha Numeric The name of the tax
Perc Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
recurInvoiceChargeID Numeric The recurring invoice charge identifier
recurInvoiceID Numeric The recurring invoice identifier
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
AmountInc Decimal The total line cost including any taxes (AmountInc = AmountEx + Taxes)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

EXAMPLES

JSON Output

HTTP CODE: 200 OK
{
  "recurInvoiceID": 30117,
  "customerID": 20625,
  "CurrencyCode": "ZAR",
  "reference": null,
  "Term": 1,
  "TermType": "months",
  "StartDate": "2017-03-15T00:00:00+00:00",
  "EndDate": null,
  "lastInvDate": "2017-03-15T00:00:00+00:00",
  "lastRenewDate": "2017-03-15T00:00:00+00:00",
  "nextRenewDate": "2017-04-15T00:00:00+00:00",
  "isExpired": false,
  "isCancelled": false,
  "numDaysBeforeToInv": 0,
  "LastModified": "2017-04-13T08:41:33.7346883+00:00",
  "SuspendedDate": null,
  "comp_Status": "Active",
  "CollectionMethod": "debit_order",
  "gatewayID": 10123,
  "customerPaymentMethodID": 40247,
  "InvoiceTerms": "",
  "InvoiceNotes": "",
  "RecurInvoiceCharges": [
    {
      "recurInvoiceChargeID": 30126,
      "recurInvoiceID": 30117,
      "Line": "A",
      "Descrip": "",
      "Qty": 1,
      "UnitCostEx": 18,
      "AmountEx": 18,
      "AmountInc": 0,
      "DisplayOrder": 1
    }
  ],
  "Taxes": [
    {
      "recurringinvoiceTaxID": 20052,
      "recurringinvoiceID": 30117,
      "Name": "Vat",
      "Perc": 0.14
    }
  ]
}

Adds a recurring invoice to your account

URL

POST https://api.billagain.com/v1/recurring-invoices

INPUT PARAMETERS (19 Fields)

Parameter Format Description
customerID req Numeric Unique customer identifier
CurrencyCode req Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term req Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType req Alpha Numeric Recurring invoice term type, will either be months or days
StartDate req Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate req Date Future date the current recurring invoice is to be sent on
numDaysBeforeToInv req Numeric Amount of days before the specific recurring invoice will be send
SuspendedDate Date Date customer was suspended if suspended
CollectionMethod req Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on invoice
Name req Alpha Numeric The name of the tax
Perc req Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

OUTPUT PARAMETERS (24 Fields)

Parameter Format Description
recurInvoiceID Numeric Unique Recurring Invoice identifier
comp_Status Boolean Computed customer status
customerID Numeric Unique customer identifier
CurrencyCode Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType Alpha Numeric Recurring invoice term type, will either be months or days
StartDate Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate Date Future date the current recurring invoice is to be sent on
isExpired Boolean Indicates if recurring invoice is expired
isCancelled Boolean An indicator to indicate if recurring invoice is cancelled
numDaysBeforeToInv Numeric Amount of days before the specific recurring invoice will be send
LastModified Date Last date specific recurring invoice was modified
SuspendedDate Date Date customer was suspended if suspended
CollectionMethod Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on recurring invoice
recurringinvoiceTaxID Numeric The recurring invoice tax identifier
recurringinvoiceID Numeric The recurring invoice identifier
Name Alpha Numeric The name of the tax
Perc Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
recurInvoiceChargeID Numeric The recurring invoice charge identifier
recurInvoiceID Numeric The recurring invoice identifier
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

EXAMPLES

JSON Input

 {
    "recurInvoiceID": 30100,
    "comp_Status": "Active",
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T08:45:01.9787633+00:00",
    "SuspendedDate": null,
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30109,
        "recurInvoiceID": 30100,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
      
    ],
  "Taxes": [
    {
      "Name": "Vat",
      "Perc": "0.14"
    },
    {
      "Name": "Tax",
      "Perc": "0.11"
    }
  ]
}

JSON Output

HTTP CODE: 201 Created
{
  "recurInvoiceID": 30118,
  "customerID": 20625,
  "CurrencyCode": "ZAR",
  "reference": null,
  "Term": 1,
  "TermType": "months",
  "StartDate": "2017-03-15T00:00:00+00:00",
  "EndDate": null,
  "lastInvDate": "2017-04-15T00:00:00+00:00",
  "lastRenewDate": "2017-04-15T00:00:00+00:00",
  "nextRenewDate": "2017-03-15T00:00:00+00:00",
  "isExpired": false,
  "isCancelled": false,
  "numDaysBeforeToInv": 0,
  "LastModified": "2017-04-13T08:44:31.1115676+00:00",
  "SuspendedDate": null,
  "comp_Status": "Active",
  "CollectionMethod": "debit_order",
  "gatewayID": 10123,
  "customerPaymentMethodID": 40247,
  "InvoiceTerms": "",
  "InvoiceNotes": "",
  "RecurInvoiceCharges": [
    {
      "recurInvoiceChargeID": 30127,
      "recurInvoiceID": 30118,
      "Line": "A",
      "Descrip": "",
      "Qty": 1,
      "UnitCostEx": 18,
      "AmountEx": 18,
      "AmountInc": 0,
      "DisplayOrder": 1
    }
  ],
  "Taxes": [
    {
      "recurringinvoiceTaxID": 20053,
      "recurringinvoiceID": 30118,
      "Name": "Vat",
      "Perc": 0.14
    },
    {
      "recurringinvoiceTaxID": 20054,
      "recurringinvoiceID": 30118,
      "Name": "Tax",
      "Perc": 0.11
    }
  ]
}

Updates a recurring invoice

URL

PUT https://api.billagain.com/v1/recurring-invoices/{recurInvoiceID}

URL PARAMETERS (1 Field)

Parameter Format Description
recurInvoiceID req Numeric Unique Recurring Invoice identifier

INPUT PARAMETERS (21 Fields)

Parameter Format Description
recurInvoiceID req Numeric Unique Recurring Invoice identifier
customerID req Numeric Unique customer identifier
CurrencyCode req Alpha 3 letter currency code, eg. ZAR, USD
Reference Alpha Numeric Unique recurring invoice reference
Term req Alpha Any recurring invoice term, will be the default to 1 if unset during add
TermType req Alpha Numeric Recurring invoice term type, will either be months or days
StartDate req Date Specific recurring invoice start date
EndDate Date Specific recurring invoice end date
lastInvDate Date Indicates the date last invoice was sent
lastRenewDate Date Previous date the current recurring invoice was sent on
nextRenewDate req Date Future date the current recurring invoice is to be sent on
numDaysBeforeToInv req Numeric Amount of days before the specific recurring invoice will be send
SuspendedDate Date Date customer was suspended if suspended
comp_Status Boolean Computed customer status
CollectionMethod req Alpha The method in which the invoice is collected, possible values:
  • cash
  • credit_card
  • debit_order
  • eft
  • hpp
gatewayID Numeric Gateway type identifier, required if collection method set to debit_order or credit_card
customerPaymentMethodID Numeric The customers payment method's identifier, required if gatewayID is selected above, has to match what gateway supports, i.e. if the gateway supports only bank accounts then a bank account or if the gateway supports only credit card then a credit card
InvoiceTerms Alpha Numeric Terms specificed for recurring invoice
InvoiceNotes Alpha Numeric Notes specificed for recurring invoice
Taxes List of Objects List of taxes applied on recurring invoice, if recurringinvoiceTaxIDinvoiceTaxID provided the values will be updated, if recurringinvoiceTaxIDinvoiceTaxID not provided a new entry will be added and if tax line not provided the tax line will be deleted from recurring invoice
recurringinvoiceTaxID Numeric The recurring invoice tax identifier
Name req Alpha Numeric The name of the tax
Perc req Decimal The percentage of tax, a value between 0 and 1
RecurInvoiceCharge List of Objects List of charges (lines) on recurring invoice
Line Alpha Numeric The line item
Descrip Alpha Numeric The items description
Qty Numeric The line quantity
UnitCostEx Decimal The cost of a unit excluding any taxes
AmountEx Decimal The total line cost excluding any taxes (AmountEx = UnitCostEx x Qty)
DisplayOrder Numeric Sequential order of how the invoice lines should appear on invoice

EXAMPLES

JSON Input

 {
    "recurInvoiceID": 30100,
    "comp_Status": "Active",
    "customerID": 20625,
    "CurrencyCode": "ZAR",
    "reference": null,
    "Term": 1,
    "TermType": "months",
    "StartDate": "2017-03-15T00:00:00+00:00",
    "EndDate": null,
    "lastInvDate": "2017-04-15T00:00:00+00:00",
    "lastRenewDate": "2017-04-15T00:00:00+00:00",
    "nextRenewDate": "2017-05-15T00:00:00+00:00",
    "isExpired": false,
    "isCancelled": false,
    "numDaysBeforeToInv": 0,
    "LastModified": "2017-04-12T08:45:01.9787633+00:00",
    "SuspendedDate": null,
    "CollectionMethod": "debit_order",
    "gatewayID": 10123,
    "customerPaymentMethodID": 40247,
    "InvoiceTerms": "",
    "InvoiceNotes": "",
    "RecurInvoiceCharges": [
      {
        "recurInvoiceChargeID": 30109,
        "recurInvoiceID": 30100,
        "Line": "A",
        "Descrip": "",
        "Qty": 1,
        "UnitCostEx": 18,
        "AmountEx": 18,
        "AmountInc": 0,
        "DisplayOrder": 1
      }
      
    ],
    "Taxes": [
    {
      "Name": "Vat",
      "Perc": "0.14"
    },
    {
      "Name": "Tax",
      "Perc": "0.11"
    }
  ]
}

JSON Output

HTTP CODE: 204 No Content

Cancels a recurring invoice

URL

DELETE https://api.billagain.com/v1/recurring-invoices/{recurInvoiceID}

URL PARAMETERS (1 Field)

Parameter Format Description
recurInvoiceID req Numeric Unique Recurring Invoice identifier

EXAMPLES

JSON Output

HTTP CODE: 204 No Content