Create ACH Payment Method

This function allows you to create a new ACH card payment method for a customer. It returns the newly created Payment Method on success.

Request Parameters

PropertyTypeDescriptionRequired
customerIdIntegerThis is the customer Id for the customer that this payment method is attached to.Yes
accountNumberIntegerThis is the ACH account number for this payment method.Yes
transitNumberIntegerThis is the ACH transit number for this payment method.Yes
bankAccountTypeEnum: {CHQ, SAV}This the identifier for the card type.Yes
firstNameStringThis is the first name associated with the card. [Max Length: 50 characters]Yes
lastNameStringThis is the last name associated with the card. [Max Length: 50 characters]Yes
address1StringThis is the address associated with the card. [Max Length: 50 characters]Yes if Address Verification Services is in use
address2StringThis is the address associated with the card. [Max Length: 50 characters]Yes if Address Verification Services is in use
countryIdIntegerThis is the Fusebill generated country code. Call (Read Country ID)[https://developer.fusebill.com/reference#read-country-id] to find the appropriate codeYes if Address Verification Services is in use
stateIdIntegerThis is the Fusebill generated state code. Call (Read Country ID)[https://developer.fusebill.com/reference#read-country-id] to find the appropriate codeYes if Address Verification Services is in use
cityStringThis is the city associated with the address associated with the card. [Max Length: 50 characters]Yes if Address Verification Services is in use
postalZipStringThis is the regional location code (eg. ZIP code in the USA) associated with the address associated with the card. [Max Length: 10 characters]Yes if Address Verification Services is in use
sourceEnum: {Manual, Automatic, SelfServicePortal}This is the payment source.Yes
paymentCollectOptionsObject. Defined BelowIf the card is validated successfully, this object is used to collect a specified amountOptional

Payment Collect Options Object

PropertyTypeDescription
collectionAmountDecimalThe amount to be collected
Examples
curl -X POST "https://secure.fusebill.com/v1/paymentMethods/achCard" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{customerId:{customerId},accountNumber:'01234567890',transitNumber:'1234',bankAccountType:'CHQ',firstName:'John',lastName:'Doe',address1:'232 Herzberg Road',address2:'Suite 203',countryId:124,stateId:9,city:'Kanata',postalZip:'K2K 2A1',source:'Manual'}"
//Json Payload
string jsonData =
"{customerId:{customerId},accountNumber:'01234567890',transitNumber:'1234',bankAccountType:'CHQ',firstName:'John',lastName:'Doe',address1:'232 Herzberg Road',address2:'Suite 203',countryId:124,stateId:9,city:'Kanata',postalZip:'K2K 2A1',source:'Manual'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/paymentMethods/achCard");
//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 xyz', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"customerId":186838,"accountNumber":'01234567890',"transitNumber":'1234',"bankAccountType":'CHQ',"firstName":'John',"lastName":'Doe',"address1":'232 Herzberg Road',"address2":'Suite 203',"countryId":124,"stateId":9,"city":'Kanata',"postalZip":'K2K 2A1',"source":'Manual'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/paymentMethods/achCard', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "accountNumber": "123457832156",
  "transitNumber": "12345",
  "bankAccountType": "CHQ",
  "firstName":"James",
  "lastName":"McHenry",
  "address1": "98 Roberts St",
  "address2": "",
  "city": "Chicago",
  "stateId": 1,
  "countryId": 124,
  "postalZip": "V9V 9V9",
  "makeDefault": true,
  "customerId": 669521,
  "source": "Manual"
}
Response
{ 
   "maskedAccountNumber":"****7890",
   "maskedTransitNumber":"****1234",
   "bankAccountType":"CHQ",
   "customerId":172677,
   "firstName":"John",
   "lastName":"Doe",
   "address1":"232 Herzberg Road",
   "address2":"Suite 203",
   "countryId":124,
   "country":"CAN",
   "stateId":9,
   "state":"Ontario",
   "city":"Kanata",
   "postalZip":"K2K 2A1",
   "isDefault":false,
   "externalCustomerId":null,
   "externalCardId":null,
   "storedInFusebillVault":true,
   "id":82628,
   "uri":null
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "achCard",
            "Value": "Required property 'firstName' not found in JSON. Path '', line 17, position 1."
        },
        {
            "Key": "achCard.FirstName",
            "Value": "The FirstName field is required."
        },
        {
            "Key": "achCard.LastName",
            "Value": "The LastName field is required."
        }
    ]
}
Language
Authorization