Create Refund

This function allows you to create a refund on a specific customer for a specific amount applied to a specific payment. Note that if the payment has been fully allocated to invoices then you must include a RefundAllocation to indicate which invoice to take payment value from and that the total of all the RefundAllocations must match the total of the refund amount.

Request Parameters

referenceStringThis is the text reference attached to the refund [Max Length: 500 characters]Optional
originalPaymentIdIntegerThis is the Fusebill Payment ID of the payment the refund will apply against.Yes
amountDecimalThis is the amount of the refund.Yes
refundAllocationsList of objects. Defined below.This is an optional list of invoice allocations which tells Fusebill how to split the value of this refund over multiple invoices.Optional
methodEnum:{PaymentMethod, Check, Cash, DirectDeposit}This dictates how the refund is/will be processed. Defaults to PaymentMethod, which means Fusebill will refund directly to the customer's payment method via the corresponding payment gateway.Optional

RefundAllocations Resource Properties

invoiceIdIntegerThis is the Invoice ID for the Invoice this refund allocation applies against.
amountDecimalThis is the dollar amount to apply against this invoice.
curl -X POST "" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{originalPaymentId:{paymentId},reference:'this is a test refund',amount:10}"
//Json Payload
string jsonData = "{originalPaymentId:{paymentId},reference:'this is a test refund',amount:10}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
//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 a dictionary to the Payload parameter
payload = {"originalPaymentId":{id},"reference":'this is a test refund','amount':10}
#Pass in your URI, Payload and Headers
r ='', data=json.dumps(payload), headers=headers)
  "reference": "refund",
  "originalPaymentId": 66889199,
  "amount": 50.0,
  "refundAllocations": [
      "invoiceId": 1234567,
      "amount": 10.0
      "invoiceId": 1234566,
      "amount": 40..
   "description":"Refund of payment 675658 ",
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
            "Key": "Api Error",
            "Value": "The refund for 50.0 exceeds the unallocated payment amount of 5.000000. Please assign the remaining 45.000000 to an invoice(s)"