/post-payments/

Purpose
Allows users to make payments. If the ClientKey variable matches a client already in the system, the client information will be updated. If there is no matching ClientKey a new client will be created.
Header Information
The following Authorization keys need to be added to any API call header.
Auth-FactorID: an ID provided by FactorCloud to the Factor who owns the instance of FactorCloud.
Auth-SystemKey: A Key to Identify the specific system.
Auth-APIKey: An API password.
HTTP Methods
Accepts POST requests.
URI
/api_factor/post-payments/
Body Information
The body is a JSON Object with the following paramaters:
Variable Name Type Required Purpose
BatchReference Char Var Y Anything to represent batch - can be a batch of 1.
BatchTotal Float Y Total Amount should be sum of batch elements.
AccountNumber string Y Total Amount should be sum of batch elements.
PaymentDetails JSON[] JSON Array with the following properties:
Property Name Type Required Purpose
PaymentDate String Y bank_date
BankBatchItem String bank_batch_item
PaymentType String Y payment_type //ACH, CHECK, WIRE
Amount String Y payment_amount_field
BankRefNumber String aba_rt //from
AccountNumber String account_num //from
TransactionNumber String Y check_num_field
RemitterName String remitter_name
MemoLine String memo_line - invoice number or memo line on check
InvoiceRefNumber String order_invoice_num_field
ClientCode String Client Code in FactorCloud if Known - helps automate matching.
FinancialDocs String BASE 64 encoded DOC
Expected Return
An echo JSON object with the in-system information, this may be different then the information in the API call; and reflects the formatting applied to it when entered into the database.
Curl Example
Request:
curl -H 'Auth-FactorId: FACTORID' -H 'Auth-SystemKey: SYSTEMKEY' -H 'Auth-ApiKey: APIKEY' -X POST --data '{"BatchReference":"mmm-111","BatchTotal":"1500.00","AccountNumber":"861495268","PaymentDetails":[{"PaymentDate":"03-31-21","BankBatchItem":"","PaymentType":"ACH","Amount":"1000.00","BankRefNumber":"111-222","AccountNumber":"861495268","TransactionNumber":"861495268-1","RemitterName":"XYZ","MemoLine":"abc","InvoiceRefNumber":"20212131","ClientCode":"","FinancialDocs":""},{"PaymentDate":"03-31-21","BankBatchItem":"","PaymentType":"ACH","Amount":"500.00","BankRefNumber":"111-223","AccountNumber":"861495268","TransactionNumber":"861495268-2","RemitterName":"XYZ","MemoLine":"abc","InvoiceRefNumber":"20212132","ClientCode":"","FinancialDocs":""}]}' https://wstest.factorcloud.com/api_factor/post-payments/
Response:
Header for payment: Status 201 Created
{"message":"201 Created - v2.01.00"}
Sample Error Response(s)
{"message":"401 Unauthorized"}
{"message":"400 Bad Request"}
{"message":"400 Bad Request Invalid batchTotal"}