To access the API, use the following URL
https://billingorchardapi.com/webservice/ChooseService.php
The five functions described below expect a single post variable called jsonData in json format. The CheckOut,Add, and Edit functions have an additional "object" key that contains data necessary for the function to accomplish its task, shown below. Please reference the "JSON Fields for Add and Edit" for the proper key names.
{ "apikey":"data", "service":"ViewUsers", "sig":"HMAC Signature", "timestamp":"20120802 15:47", "object":{ "key":"data", "key2":"data2" } }
The HMAC Signature input is generated from appending the apikey, service, and timestamp values together. (e.g. $apikey.$service.$timestamp) The timestamp shall consist of the time the data is called in the format of "YYYYMMDD hh:mm" in Coordinated Universal Time (UTC). If the request is five minutes old when it gets processed by the server or the signature is incorrect, it will return a 401 not authorized. The hashing algorithm is currently set as sha256. The key is currently set as "BillingOrchard2012".
The signature is encoded into a base64 string that complies with established standards.
Procedure
Procedure
Procedure
Procedure
Procedure
This function takes the data for a client, billed misc fees, and the amount being charged. It takes this and creates a new invoice, payment, and a client if the ClientID is not passed but the client information is. It uses this information to charge a payment using the client's payment information.
Parameters are the data you will pass with the call.
Service
For the CheckOut function, this field must contain "CheckOut"
Rules: Required
Type: String
This is your identifier
Rules: Required
Type: String
The HMAC-SHA256 Signature input is generated from appending the apikey, service, and timestamp values together as the input and your private key as the key
Rules: Required
Type: String
The time that the function was called. It must be in YYYYMMDD HH:MM format in UTC
Rules: Required
Type: String
This contains the necessary data for the function to do its job.
A JSON string is returned containing a message and other data.
Error with apikey
There is an issue with the apikey.
The service name provided could not be found.
The function was successful. It returns the IDs of five items. ClientID, Invoice, Fee, Recurring, and Payment.
There was an issue with the data that prevented the system from add or editing a client
There was a problem with updating or adding a client in the customer vault. A "Response_code" is returned that will describe the problem
Problem with creating Invoice. ClientID is returned
Problem with creating a BilledMisc fee. ClientID and Invoice are returned
Problem with creating a RecurringBilling fee. ClientID, Invoice, and Fee are returned
Error with processing the payment. A "Response_code" is returned that will describe the problem. ClientID, Invoice, Fee, and Recurring IDs are returned
There was a problem creating a payment entry in the database. ClientID, Invoice, Fee, and Recurring IDs are returned
Parameters
Parameters are the data you will pass with the call.
ServiceFor the View function, this field must contain one of the following:
This is your identifier
Rules: Required
Type: String
The HMAC-SHA256 Signature input is generated from appending the apikey, service, and timestamp values together as the input and your private key as the key
Rules: Required
Type: String
The time that the function was called. It must be in YYYYMMDD HH:MM format in UTC
Rules: Required
Type: String
If this field is specified, it will return the specified corresponding item
Rules: Optional
A JSON string is returned containing a message and other data.
Error with apikey
There is an issue with the apikey.
The service name provided could not be found.
The function was successful and returns the data
Parameters
Parameters are the data you will pass with the call.
ServiceFor the Delete function, this field must contain one of the following
This is your identifier
Rules: Required
Type: String
The HMAC-SHA256 Signature input is generated from appending the apikey, service, and timestamp values together as the input and your private key as the key
Rules: Required
Type: String
The time that the function was called. It must be in YYYYMMDD HH:MM format in UTC
Rules: Required
Type: String
ID used to identify item being deleted
Rules: Required
Type: Integer
A JSON string is returned containing a message and other data.
Error with apikey
There is an issue with the apikey.
The service name provided could not be found.
Delete status message
Parameters
Parameters are the data you will pass with the call.
ServiceFor the Update function, this field must contain one of the following
This is your identifier
Rules: Required
Type: String
The HMAC-SHA256 Signature input is generated from appending the apikey, service, and timestamp values together as the input and your private key as the key
Rules: Required
Type: String
The time that the function was called. It must be in YYYYMMDD HH:MM format in UTC
Rules: Required
Type: String
This contains the necessary data for the function to do its job.
A JSON string is returned containing a message and other data.
Error with apikey
There is an issue with the apikey.
The service name provided could not be found.
Update status message
Parameters
Parameters are the data you will pass with the call.
ServiceFor the Add function, this field must contain one of the following
This is your identifier
Rules: Required
Type: String
The HMAC-SHA256 Signature input is generated from appending the apikey, service, and timestamp values together as the input and your private key as the key
Rules: Required
Type: String
The time that the function was called. It must be in YYYYMMDD HH:MM format in UTC
Rules: Required
Type: String
This contains the necessary data for the function to do its job.
A JSON string is returned containing a message and other data.
Error with apikey
There is an issue with the apikey.
The service name provided could not be found.
Add status message
These keys go under the object field of the json string. This section describes the required field name, the data type, and the character limit for each field.
NOTE: The respective ID field for each item type is not needed when doing an Add
Note 2: The format for smalldatetime is "YYYY-MM-DD HH:MM:SS"
The direct post function is an alternative to posting a single JSON string to the API. In order to direct post to the BillingOrchard API, you must post the following variables to "https://billingorchardapi.com/webservice/Direct.php"