Billing API
The Billing API allows you to perform invoice, receipts and order related actions.
Transaction API
Transaction related API’s are included here.
1. Get Credit Note Detail(s)
Here, you can get credit note details including receipt and company information.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/transaction/credit_note
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Header
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Optional | customer’s id | 1460 |
startdate | Date | Optional | invoice start date | 10/07/2019 |
enddate | Date | Optional | invoice enddate | 30/07/2019 |
pid | Integer | Optional | partner id | 0 |
For main venture, “partner id“ will be 0.
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[data] => Array
(
[0] => Array
(
[id] => 9871
[tran_no] => CR/19-20/285
[tdate] => 2019-12-04 00:00:00
[description] => credit note created against invoice no. INV/19-20/5046
[tran_id] =>
[amount] => 997.10
[paymentmethod] =>
[customer_id] => 1974
[currencyid] => 1
[currencycnratio] => 1.000
[invoice_num] => INV/17-18/5046
[is_tax] => 0
[currency] => INR
[sub_total] => 997.10
[base_sub_total] => 997.10
[company_info] =>
[transaction_taxes] => Array
(
[0] => Array
(
[id] => 564
[tax_type] => SGST
[tax_val] => 9.00
[tax_amount] => 76.05
)
[1] => Array
(
[id] => 565
[tax_type] => CGST
[tax_val] => 9.00
[tax_amount] => 76.05
)
)
[transaction_item] => Array
(
[0] => Array
(
[id] => 700
[transactionid] => 9871
[type] => other
[quantity] => 1
[description] => yourdomain.onmicrosoft.com ( Office 365 - Business Suite )
[subtotal] => 800.00
[discount] => 0.00
[taxable_value] => 800.00
[taxamount] => 144.00
[amount] => 944.00
[billingcycle] => Annually
[serviceid] => 3597
[start_billing_date] => 2019-12-04 00:00:00
[end_billing_date] => 2020-12-03 00:00:00
[planid] => 1
[per_unit_price] => 800.00
[item_sac] =>
[item_uom] =>
[is_bundle] => 0
[rel_bundleid] => 0
[bundleid] =>
[base_sub_total] => 800.00
[current_financial_amount] => 63.39
[future_financial_amount] => 736.61
[monthly_accural_details] => Array
(
[January-2019] =>
[February-2019] =>
[March-2019] =>
[April-2019] =>
[May-2019] =>
[June-2019] =>
[July-2019] =>
[August-2019] =>
[September-2019] =>
[October-2019] =>
[November-2019] =>
[December-2019] => 61.20
[January-2020] => 2.19
)
[transaction_item_taxes] => Array
(
[0] => Array
(
[id] => 503
[tax_type] => SGST
[tax_val] => 9.00
[tax_amount] => 72.00
)
[1] => Array
(
[id] => 504
[tax_type] => CGST
[tax_val] => 9.00
[tax_amount] => 72.00
)
)
)
)
)
)
)
In case of any errors, an error code key with value along with an error message will be returned.
2. Get Debit Note Detail(s)
Here, you can get debit note details including receipt and company information.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/transaction/debit_note
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Header
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Optional | customer’s id | 1460 |
startdate | Date | Optional | invoice start date | 10/07/2019 |
enddate | Date | Optional | invoice enddate | 30/07/2019 |
pid | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[data] => Array
(
[0] => Array
(
[id] => 9796
[tran_no] => DR/19-20/47
[tdate] => 2019-11-13 00:00:00
[description] => debit note generated against the service
[tran_id] =>
[amount] => 472.00
[paymentmethod] =>
[customer_id] => 1842
[currencyid] => 1
[currencycnratio] => 1.000
[invoice_num] => INV/17-18/4760
[is_tax] => 0
[currency] => INR
[subtotal] => 400.00
[base_sub_total] => 400.00
[company_info] =>
[transaction_taxes] => Array
(
[0] => Array
(
[id] => 548
[tax_type] => SGST
[tax_val] => 9.00
[tax_amount] => 36.00
)
[1] => Array
(
[id] => 549
[tax_type] => CGST
[tax_val] => 9.00
[tax_amount] => 36.00
)
)
[transaction_item] => Array
(
[0] => Array
(
[id] => 641
[transactionid] => 9796
[type] => other
[quantity] => 1
[description] => Essential Suite
1 Quantity
[subtotal] => 400.00
[discount] => 0.00
[taxable_value] => 400.00
[taxamount] => 72.00
[amount] => 472.00
[billingcycle] => Annually
[serviceid] => 3401
[start_billing_date] => 2019-09-16 00:00:00
[end_billing_date] => 2020-09-15 00:00:00
[planid] => 2
[per_unit_price] => 400.00
[item_sac] =>
[item_uom] =>
[is_bundle] => 0
[rel_bundleid] => 0
[bundleid] =>
[base_sub_total] => 400.00
[current_financial_amount] => 118.03
[future_financial_amount] => 281.97
[monthly_accural_details] => Array
(
[January-2019] =>
[February-2019] =>
[March-2019] =>
[April-2019] =>
[May-2019] =>
[June-2019] =>
[July-2019] =>
[August-2019] =>
[September-2019] => 16.39
[October-2019] => 33.88
[November-2019] => 32.79
[December-2019] => 33.88
[January-2020] => 1.09
)
[transaction_item_taxes] => Array
(
[0] => Array
(
[id] => 479
[tax_type] => SGST
[tax_val] => 9.00
[tax_amount] => 36.00
)
[1] => Array
(
[id] => 480
[tax_type] => CGST
[tax_val] => 9.00
[tax_amount] => 36.00
)
)
)
)
)
)
)
Invoices API
Invoice related API’s are included here.
1. Get Invoice Records
Here, you can get invoice details including invoice item, tax and company related information.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/invoice/list
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Header
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Optional | customer’s id | 1460 |
startdate | Date | Optional | invoice start date | 10/07/2019 |
enddate | Date | Optional | invoice enddate | 30/07/2019 |
pid | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[data] => Array
(
[0] => Array
(
[id] => 8400
[invoicenum] => INV/17-18/5151
[customer_id] => 2003
[description] => 1.) yourdomain.onmicrosoft.com [ Office 365 - Business Suite ]
2.) Addon : Managed Services
Billing Cycle : Semi-Annually
[amount] => 120.00
[subtotal] => 120.00
[creation_date] => 2019-12-04 10:26:15
[paid_date] => 2019-12-04 10:26:15
[status] => Paid
[currencyid] => 2
[currencycnratio] => 71.160
[invoice_type] => F
[custom_invoice] => 0
[single_invoice] => 1
[pid] => 0
[nextduedate] => 2019-12-04 10:26:15
[is_bundle] => 0
[currency] => INR
[ordernum] => RED/ORDER/15-16/4059
[transaction_num] => RCPT/15-16/266
[base_sub_total] => 1.69
[discount] => 0.00
[invoice_item] => Array
(
[0] => Array
(
[id] => 45245
[type] => other
[description] => Acronis demo - Gold Plan
( 100 GB )
[amount] => 120.00
[subtotal] => 120.00
[start_billing_date] => 2020-01-27 12:21:06
[end_billing_date] => 2020-02-26 12:21:06
[billingcycle] =>
[quantity] => 1
[planid] => 134
[serviceid] => 0
[item_uom] =>
[per_unit_price] => 120.00
[is_bundle] => 0
[discount] => 0.00
[rate] => 120.00
[base_sub_total] => 1.69
[current_financial_amount] =>
[future_financial_amount] => 1.69
[monthly_accural_details] => Array
(
[December-2019] => 91.80
[January-2020] => 3.28
)
[invoice_item_taxes] => Array
(
(
[0] => Array
(
[id] => 33824
[tax_type] => SGST
[tax_val] => 9.00
[tax_amount] => 54.00
)
[1] => Array
(
[id] => 33825
[tax_type] => CGST
[tax_val] => 9.00
[tax_amount] => 54.00
)
)
)
)
)
[company_info] => PRS Techno
)
)
)
Receipts API
Receipt related API’s are included here.
1. Get Receipt Records
Here, you can get receipt and company related information.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/receipt/list
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Header
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Optional | customer’s id | 1460 |
startdate | Date | Optional | invoice start date | 10/07/2019 |
enddate | Date | Optional | invoice enddate | 30/07/2019 |
pid | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Orders API
Order related APIs are included here.
1. Get Order Records
Here, you can get order details including order items, tax and customer’s current balance related information.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/order/list
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Header
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Optional | customer’s id | 1460 |
startdate | Date | Optional | order start date | 10/07/2019 |
enddate | Date | Optional | order end date | 30/07/2019 |
pid | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )