Main Web API Documentation Information
Actual Page/Function Name:
Human Readable Name or Caption:
Add Invoice Payment
Page/Function Description:
This method will add a payment to an invoice.
Page/Function Output Type:
Extra Page/Function Notes:
As a note, if the invoice is a Metrc delivery, when a payment is applied to the invoice through this API, the delivery will attempt to auto complete using the payment date time stamp as the actual delivery time.

Scope Name Type Default Description Required Alternates Known Values
Arguments ACTUAL_TRANS_NUMBER String Pass in the actual credit card transaction number if known. This is usually some sort of id that's passed back from the credit card gateway to help with a future look up. The default is blank. No
Arguments AMOUNT_PAID Numeric 0 Pass in the amount that was paid. Yes
Arguments CORP_ID Numeric 0 Pass in the corp id number. This is your corporation ID or your business world number. This is required and will be validated. The default is 0, but will be checked for a real number. Yes
Arguments INVOICE_NUMBER Numeric 0 Pass in the invoice number. This is the primary key that ties the main invoice to the payments. As a note, you should have already ran the startMainInvoice method. Use that id number to pass to this method. Yes
Arguments MERCHANT_SETTING_ID Numeric 1 Pass in the merchant setting id number. If you are doing actual merchant processing, you will need to look this number up. You can only look it up from inside the system. A good place to go is the admin corp-wide settings for eCommerce under getSpecificCorpWideSettings. Under the field list argument, make sure to include one called web_merchant_setting_id. Yes
Arguments MONEY_TYPE_ID Numeric 0 Pass in the money type id. Some examples are 2=Cash, 3=Check, 4=Amex, 5=Discover, 6=MasterCard, 7=Visa, 13=On Account, 19=Money Order, 20=Gift Card/Certificate, 21=Coupon, 22=Drawer-Cash/Till, 23=PayPal, 24=Other, 25=Payout-Cash/Till. Go internally to an advanced invoice search page for all available money types. You may need to right click and View Source to find it. Yes
Arguments PAYMENT_CHECK_NUMBER String Pass in the check number if applicable. Yes
Arguments PAYMENT_NOTES String Pass in the payment notes. Yes
Arguments TRANSACTION_DATE String Pass in the transaction date. Yes
Arguments TRANSACTION_DATE_TIME String Pass in the transaction date/time stamp. Yes
Arguments TRANSACTION_NUMBER String Pass in the credit card validation or authorization code. This is an optional string to help you record any sort of special details--wire numbers, transaction numbers, authorization codes, etc. Yes
Arguments TRANSACTION_PROCESSED_BY_ID Numeric 0 Pass in the payee user id of the person doing the transaction. This id number will be used for a history message of who added the record. If this is not passed in, it will default to whoever the main payee/user id is that is using the method. Yes

ok Successfully added the payment to the invoice. Where can we take you? [invoice line items] [printable invoice] [invoice homepage] This assumes that everything went well.
dataIn Unable to record the invoice payment. Missing some data. Use your back button and try again. This is returned if the corp id, invoice number, merchant setting id, or money type id arguments are not found.
dataIn2 Unable to record the invoice payment. Missing the date information. Use your back button and try again. This is returned if the date is not valid.
zero Unable to find the main invoice number requested. Use your back button and try again. This is returned if the invoice amount, invoice date, invoice paid, and mark as receivable fields are empty for the requested invoice number.
db Unable to connect to the database. Invoice payment was not added to the database. Use your back button and try again. This is returned if there was an error in inserting or querying values such as actual trans number, amount paid, corp id, deposit date, deposited status, invoice number, total payments, invoice amount, transaction date, etc.

Caption Text