Read Charge Summary

This method returns a list of summarized charges for a given customer.

Path parameters

PropertyTypeDescription
customerIdIntegerFusebill generated ID uniquely identifying the customer

This call supports string filtering (Read More)
&query=parameterName:Value

Parameter NameAcceptable ValuesParameter NameAcceptable Values
endDateDateTimepurchaseIdInteger
productCodeStringstartDateDateTime
productIdIntegersubscriptionProductIdInteger

This call supports pagination (Read More)
&pageSize=10&pageNumber=0
This call supports sorting (Read More)
&sortOrder=Ascending or &sortOrder=Descending
&sortExpression=expression

Examples
curl –X GET https://secure.fusebill.com/v1/customers/{customerId}/chargeSummary 
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}"
//Setup customer ID: 
int customerId= {customerId} 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customers/" + customerId + "/chargeSummary); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "GET"; 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
{ 
  result = streamReader.ReadToEnd(); 
}
#Import library JSON 
import json 
#Import library Requests 
import requests 
#Pass in a dictionary to the Headers parameter 
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'} 
#Pass in your URI and Headers 
r = requests.get('https://secure.fusebill.com/v1/customers/{customerId}/chargeSummary',  headers=headers) 
print(r.content)
Response
[
  {
    "id": 65412013,
    "status": "Purchased",
    "effectiveTimestamp": "2019-05-29T01:05:57",
    "productCode": "gold",
    "name": "gold",
    "description": "",
    "quantity": 1,
    "unitPrice": 400,
    "proratedUnitPrice": null,
    "amount": 400,
    "remainingReverseAmount": 0,
    "glCode": null,
    "invoice": {
      "uri": "https://secure.fusebill.com/v1/invoices/551244"
    },
    "subscriptionProduct": {
      "id": 2330861,
      "uri": "https://secure.fusebill.com/v1/subscriptionProducts/2330861"
    },
    "purchase": null,
    "relatedPayments": [
      {
        "id": 65412016,
        "reference": "Credit Card (Visa ending in 1111)",
        "uri": "https://secure.fusebill.com/v1/payments/65412016"
      }
    ],
    "relatedCredits": [],
    "relatedProductItems": []
  }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "No HTTP resource was found that matches the request URI 'https://dev-secure.fusebill.com/v1/customers/-1/chargeSummary'"
        }
    ]
}
Language
Authorization