Read Debit

This function returns a debit object by its associated transaction ID

Path Parameters

PropertyTypeDescription
transactionIdIntegerFusebill generated ID of the transaction representing the relevant debiting of accounts receivable
Examples
curl –X GET https://secure.fusebill.com/v1/Debits/{transactionId}\ 
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}"
//Setup Debit ID: 
int debitID= {transactionId} 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Debits/" + debitID); 
//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/Debits/{transactionId}',  headers=headers) 
print(r.content)
Response
{
  "reference": "a custom string",
  "effectiveTimestamp": "2019-04-16T10:59:44",
  "description": "Reversal of credit 15884967",
  "customerId": 4865197,
  "originalCreditId": 15884967,
  "amount": 67.95,
  "currency": "CAD",
  "invoiceAllocations": [],
  "id": 63282695,
  "uri": "https://secure.fusebill.com/v1/Debits/63282695"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Debit with id 123 not found."
        }
    ]
}
Language
Authorization