Read Payment Details

This call returns the details of a payment.

Path Parameters

PropertyTypeDescription
paymentIdIntegerThe Fusebill generated ID that uniquely identifies this payment
Examples
curl -X GET "https://secure.fusebill.com/v1/payments/{id}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//Json Payload
string jsonData = "";

//Setup API key
string apiKey = "{APIKey}";

//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/payments/{id}");

//Add Content type
request.ContentType = "application/json";

//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);

//Set request method
request.Method = "GET";

//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}

//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, Payload and Headers
r = requests.get('https://secure.fusebill.com/v1/payments', headers=headers)
print(r.content)
Response
{ 
   "paymentActivityId":118419,
   "reference":"this is a test payment",
   "effectiveTimestamp":"2017-01-25T19:11:00.0009221Z",
   "description":null,
   "customerId":172677,
   "originalPaymentActivityId":null,
   "amount":10.0,
   "currency":"USD",
   "invoiceAllocations":[ 

   ],
   "refunds":[ 

   ],
   "unallocatedAmount":10.0,
   "refundableAmount":10.0,
   "id":7613586,
   "uri":"https://secure.fusebill.com/v1/payments/7613586"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Payment with id 123 not found."
        }
    ]
}
Language
Authorization