get https://secure.fusebill.com/v1/Refunds/
This function allows you to retrieve a specific refund with full details by its transaction Id.
Path Parameters
Property | Type | Description |
---|---|---|
transactionId | Integer | This is the Id of the transaction (refund) you want to retrieve. |
Examples
curl -X GET "https://secure.fusebill.com/v1/refunds/{transactionId}" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//query parameter
int transactionId = {transactionId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/refunds/" + transactionId);
//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/refunds/{id}', headers=headers)
print(r.content)
Response
{
"paymentActivityId":114659,
"reference":"this is an example refund",
"effectiveTimestamp":"2017-01-16T21:55:59",
"description":"Refund of payment 7327933 this is an example payment",
"customerId":172677,
"originalPaymentActivityId":114639,
"amount":10.0000,
"currency":"USD",
"invoiceAllocations":[
],
"unallocatedAmount":0.0,
"id":7327992,
"uri":"https://secure.fusebill.com/v1/refunds/7327992"
}
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "Refund with id 123 not found."
}
]
}