Reverse Invoice

This request reverses an invoice. You can choose the invoice along with if you want the Full invoice reversed, unearned charges, or the amount or net amount.

URL Parameters

ParameterTypeDescription
IdIntegerThe ID of the invoice you want to retrieve.
reverseChargeOptionsStringFull, Unearned, Amount, NetAmount
referenceStringOptional description or reference data point

Request Parameters

Invoice collection options

Examples
curl –X POST https://secure.fusebill.com/v1/Invoices/Reverse/
-H "Content-Type: application/json" \ 
-H "Authorization: Basic {APIKey}" \ 
-d "{}" 
{
  "invoiceId": 1,
  "reverseChargeOption": "Full",
  "reference": "Reversing all charges in Full"
}
//Json data for payload 
string jsonData = "{}"; 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/draftInvoices/PostReadyCharges?customerId={customerId}"); 
//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())) 
{ 
  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 a dict to the Payload parameter 
payload = {} 
#Pass in your URI, Payload and Headers 
r = requests.post('https://secure.fusebill.com/v1/draftInvoices/PostReadyCharges?customerId={customerId}', data=json.dumps(payload), headers=headers) 
print(r.content)
{
  "invoiceCollectOptions": {
    "paymentMethod": "UseExistingPaymentMethodAndMakeDefault",
    "paymentMethodId": 98753987,
    "useAnyAvailableFundsFirst": true,
    "creditCard": null,
    "achCard": null,
    "rollbackOnFailedPayment": false
  }
}
{
  "invoiceCollectOptions": {
    "paymentMethod": "UseProvidedPaymentMethodAndSave",
    "useAnyAvailableFundsFirst": false,
    "creditCard": {
      "cardNumber": 1234123412341234,
      "expirationMonth": 2,
      "expirationYear": 23,
      "cvv": 123,
      "firstName": "Karen",
      "lastName": "Wood",
      "address1": "10 Dodge St",
      "address2": "",
      "city": "Columbia",
      "stateId": 1,
      "countryId": 124,
      "source": "Manual",
      "postalZip": "V9V 9V9",
      "customerId": 12345678
    },
    "achCard": null,
    "rollbackOnFailedPayment": true
  }
}
{
  "invoiceCollectOptions": {
    "paymentMethod": "UseProvidedPaymentMethodOnce",
    "useAnyAvailableFundsFirst": false,
    "creditCard": null,
    "achCard": {
      "accountNumber": 123457832156,
      "transitNumber": 12345,
      "bankAccountType": "CHQ",
      "firstName": "James",
      "lastName": "McHenry",
      "address1": "98 Roberts St",
      "address2": "",
      "city": "Chicago",
      "stateId": 1,
      "countryId": 124,
      "postalZip": "V9V 9V9",
      "customerId": 12345678,
      "source": "Manual"
    },
    "rollbackOnFailedPayment": true
  }
}
Response
Language
Authorization