Create Payment

This function allows you to create a new payment on a specific customer for a specific amount using a specific payment method.

Request Parameters

customerIdIntegerThis is the Id of the Customer to whom this Payment is being applied to.Yes
referenceStringThis is the reference field you can use to identify this payment. [Max Length: 500 characters]Optional
amountDecimalThis is the amount of the paymentYes
paymentMethodEnum:{ CreditCard, Cash, Check, DirectDeposit, ACH}This indicates the type of payment method being used.Yes
paymentMethodIdIntegerThis is the ID of the payment method to be used to fund this payment.Yes if paymentMethod is "ACH" or "CrediCard"
useDefaultPaymentMethodBooleanIf true, the customer's default payment method will be usedOptional
paymentAllocationsList of objects. Defined belowThis is an optional list of payment allocations which tells Fusebill how to split the value of this payment over many invoices.Optional
sourceEnum: {Manual, Automatic, SelfServicePortal, Import}Indicates the source of the paymentYes
autoAllocateBooleanIf true, then the payment will be automatically allocated to the customer's outstanding invoices in the order defined by autoAllocateOrderOptional
autoAllocateOrderEnum: {OldestToNewest, NewestToOldest}Defines how to automatically allocate the payment if autoAllocate is trueOptional

Payment Allocations Properties

invoiceIDIntegerThis is the invoice ID for the invoice this allocation applies against.
amountDecimalThis the dollar amount to apply against the above invoice
curl -X POST "" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerId:{customerId},source:'Manual',paymentMethod:'CreditCard',reference:'this is a test payment',amount:10,paymentMethodId:{paymentMethodId}}"
//Json Payload
string jsonData =
  "{customerId:{customerId},source:'Manual',paymentMethod:'CreditCard',reference:'this is a test payment',amount:10,paymentMethodId:{paymentMethodId}}";
//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 = {"customerId":{id},"source":'Manual',"paymentMethod":'CreditCard',"reference":'this is a test payment',"amount":10,"paymentMethodId":{id}}
#Pass in your URI, Payload and Headers
r ='', data=json.dumps(payload), headers=headers)
  "customerId": 655080,
  "reference": "abc123",
  "amount": 50.78,
  "paymentMethod": "Cash",
  "source": "Manual"
  "customerId": 655080,
  "reference": "abc123",
  "amount": 50.78,
  "paymentMethod": "Cash",
  "source": "Manual",
  "paymentAllocations": [
      "invoiceID": 566934,
      "amount": 2.0
   "reference":"this is a test payment",


    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
            "Key": "payment.PaymentMethodType",
            "Value": "Allowable values are: Check, DirectDeposit, CreditCard, Cash, ACH, Paypal"