InvoicePayment

POST /invoicing/Invoice/Payment/Add

The following list provides you with the absolute minimum fields required to add an InvoicePayment, as well as other potentially required fields.

Invoice Conditions

The following Invoice conditions must be satisfied in order to add any InvoicePayment record.

Condition Value
Invoice Status Invoice Status must be “Open” or “Committed”.
Estimate Not allowed.
BranchCode Required
Must be a valid Branch Code.
If not provided it will use the branch supplied during the login process, and if that is empty it uses the constant value “DEFAULT.
If a valid PaymentType is provided and the PaymentType option “Write All Payments as Branch” is True and filled in then the Branch from the “Write All Payments as Branch"will be used
TerminalCode Required
Must be a valid Terminal Code. If not provided it will use the terminal supplied during the login process, and if that is empty it uses the constant value “DEFAULT”.
Invoice JobStatus Any Job Status cascading that is configured in ePASS will be enforced through the API.
Bill To Customer BillToCustomer must be allowed to charge if the invoice is not estimate and the payment type is AR.
Credit Limits will be enforced in the following situation:
- The invoice is not an estimate
- Credit Limit is enabled for the Customer
- The Invoice Payment Type is AR
- Require Credit Approval is disabled
- Either the Job Status is dispatchable or Dispatching is disabled completely

Required Fields

The following fields are the absolute minimum fields that should be required to create an invoicepayment.

Fields Value
InvoiceCode Required
Must be a valid Invoice Code.
PaymentCode Required
Must be a valid Payment Code that is not Obsolete and Payment Type option “Show In Invoice Detail” is True. Payment Processing Type is “None” (We only allow non integrated payment type).
UserCreated Required
Must be a valid User Code that is not Obsolete. If not provided it will use the Login User.

Potentially Required Fields

These fields may be required depending on your ePASS configuration, or there is unique behavior that needs to be mentioned.

Fields Value
BillTo Info Invoice -> BillTo Info BillTo Info for the payment line are default from Invoice BillTo Info.

PaymentCode

If a valid PaymentCode is provided then the following values will be defaulted from the Payment. You can override any of the values that would come from the Payment simply by providing your own value.

Key Value
Description Payment -> Description

Sample: Add a Payment to an Invoice


POST /v1/invoicing/Invoice/Payment/Add
{
    "InvoiceCode": "S03253935",
    "PaymentTypeCode": "VISA",
    "Description": "Auth # 123456",
    "Amount": 1000,
    "BranchCode": "Default",
    "TerminalCode": "Default"
}



{
    "success": false,
    "warning": false,
    "httpStatusCode": 422,
    "generalMessage": "One or more of the fields has an invalid or missing value.",
    "exceptionMessage": null,
    "keys": [],
    "messages": [
        {
            "code": "INV-06005",
            "message": "Payments are not allowed on Finished Invoices."
        }
    ],
    "warnings": []
}