List Payment Allocations

This function gets a list of payment allocations for a specific invoice. These objects contain the Fusebill generated invoice ID, the amount, and the Fusebill generated payment ID which is used to uniquely identify the transaction.

Path Parameters

ParameterTypeDescription
invoiceIdIntegerFusebill generated ID of the invoice whose payment allocations you want to retrieve
Examples
curl –X GET https://secure.fusebill.com/v1/Invoices/{invoiceId}/paymentAllocations \ 
  -H "Content-Type: application/json" \ 
  -H "Authorization: Basic {APIKey}"
//Setup invoice number 
InvoiceId = {invoiceId} 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Invoices/" + invoiceId + "/paymentAllocations); 
//Add Content type 
request.ContentType = "application/json"; 
request.ContentLength = 0; 
//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 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/Invoices/{invoiceID}/paymentAllocations', headers=headers) 
print(r.content)
Response
[
    {
        "paymentId": 99017344,
        "invoiceId": 7612480,
        "amount": 40.0000,
      	"effectiveTimestamp": 2021-02-04T05:15:03",
      	"paymentMethod": "Credit Card (Visa ending in 8231)",
      	"paymentReference": null,
      	"paymentActivityId": 24245845
    }
]
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Invoice with id 2 not found."
        }
    ]
}
Language
Authorization