RecordWithDiscountsAndFees
Record customer payments with discounts and finance charges for sale invoices
Date Released: Nov 2013 Date Updated: Dec 2020
URL | Supports |
/{cf_uri}/Sale/CustomerPayment/RecordWithDiscountsAndFees
|
GET |
PUT |
POST |
DELETE
|
The {guid} in the URL above is replaced with the unique ID for any given company file |
Please note: While accessibility via the API is available to both AccountRight and new Essentials files. Not all features will be displayed in Product for new Essentials or the AccountRight Browser
Heads up! POSTing not only returns a 200 Status Response, but a payload JSON object as detailed below is also passed back. POSTing a payment that includes a discount will create a credit memo that is then automatically applied against the originating invoice.
POSTing a payment that includes a finance charge results in a sale invoice for that amount, the payment of the finance charge will be automatically applied against the resulting invoice.
The elements list below details information for RecordWithDiscountsAndFees. To view the descriptions for the elements you can either hover any attribute to reveal details or click here to show all details inline.
Items shown with are required when posting or puting data
Items shown with are read-only elements
Request
- UIDGuid (36)
- Unique guid identifier created for a customer payment.
- DepositToString
- If allocating a banking account for the payment specify Account
If using undeposited funds specify UndepositedFunds
What are undeposited funds?
- Account
- The following set of information pulls through details for the Account
-
- UIDGuid (36)
- Please note: Passing the Account UID is optional if you are assigning UndepositedFunds, if allocating a bank account the UID is required.
Foreign Key: Unique identifier for the account in the form of a guid.
- Customer
- The following set of information pulls through details for the Customer contact
-
- UIDGuid (36)
- Foreign Key: Unique guid identifier belonging to the customer assigned to the customer payment.
- DisplayIDString (15)
- Customer contact Card ID, can also be used as a unique customer contact identifier.
- ReceiptNumber String (8)
- ID No of payment transaction
- DateDateTime
- Transaction date entry, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' }
- FinanceChargeDecimal (13.2)
- Finance charge amount applicable to invoice.
What is a finance charge?
- FinanceChargeForeignDecimal (13.2)
- Finance charge amount applicable to invoice in foreign currency.
What is a finance charge?
- PaymentMethod PaymentMethod
- Payment methods must exist in company file, default methods consist of the following: (Users can add new methods through AccountRight UI)
American Express
Bank Card
Barter Card
Cash
Cheque
Diners Club
EFTPOS
MasterCard
Money Order
Other
Visa - Memo String (255)
- Memo text of the customer payment entry.
- Lines []
- An array of invoice or order line information.
- Sale
- Sales invoice or order transaction information.
- UIDGuid (36)
- Foreign Key: Unique guid identifier belonging to the invoice object.
- Number String (8)
- Sales invoice number.
- AmountAppliedDecimal (13.2)
- Mandatory for a Local currency record : Amount applied to sale invoice or order.
- AmountAppliedForeignDecimal (13.2)
- Mandatory for a Foreign currency record : Amount applied to sale invoice or order in foreign currency.
- DiscountAppliedDecimal (13.2)
- Mandatory for a Local currency record : Discount amount applied to invoice or order.
- DiscountAppliedFOreignDecimal (13.2)
- Mandatory for a Foreign currency record : Discount amount applied to invoice or order in foreign currency.
- TypeDecimal (13.2)
- Invoice type, can consist of the following:
Invoice
Order
Response
- CustomerPayment
- The following set of information pulls through details for the customer payment
-
- UIDGuid (36)
- Foreign Key: Unique identifier for the customer payment in the form of a guid.
- ReceiptNumberString (10)
- ID No of payment transaction
- URI String
- Uniform resource identifier associated with the customer payment object.
- FinanceChargeInvoice
- The following set of information pulls through details for the invoice generated from a finance charge
-
- UIDGuid (36)
- Foreign Key: Unique identifier for the invoice in the form of a guid.
- NumberString (10)
- Sale invoice number #
- URI String
- Uniform resource identifier associated with the sale invoice object.
- DiscountAppliedInvoices []
- The following set of information pulls through details for the invoice generated from a discount credit memo.
-
- UIDGuid (36)
- Foreign Key: Unique identifier for the invoice in the form of a guid.
- NumberString (10)
- Sale invoice number #
- URI String
- Uniform resource identifier associated with the sale invoice object.
- CreditSettlements []
- The following set of information pulls through details for the settled credit memo.
-
- UIDGuid (36)
- Foreign Key: Unique identifier for the settled credit in the form of a guid.
- NumberString (10)
- Sale invoice number #
- URI String
- Uniform resource identifier associated with the settled credit memo object.
Example json request
{"DepositTo" : "Account","Account" : {
- "UID" : "7772dc25-5ee6-4a61-994e-28c04b8a35fc"
},"Customer" : {
- "UID" : "63b984e5-241e-4c1a-bfe1-7868a69f5e29",
- "DisplayID" : "CUS000003"
},"ReceiptNumber" : "00001569","Date" : "2014-11-05T00:00:00","FinanceCharge" : 0,"Memo" : "Payment; Cash Sales","Lines" : [
- {
- "Sale" : {
- "UID" : "895c0837-ed10-4277-ad1c-ab3294d39847"
- },
- "AmountApplied" : 69,
- "DiscountApplied" : 5,
- "Type" : "Invoice"
- },
- {
- "Sale" : {
- "UID" : "172994f9-bd0a-41ee-8349-8ef68ac3be25"
- },
- "AmountApplied" : 3990,
- "DiscountApplied" : 9.75,
- "Type" : "Invoice"
- }
- ]
} Example json response
- {
- "CustomerPayment" : {
- "UID" : "647d1d43-9b70-40bd-a38c-da0f46e73df0",
- "ReceiptNumber" : "00001571",
- "URI" : "{cf_uri}/Sale/CustomerPayment/647d1d43-9b70-40bd-a38c-da0f46e73df0"
- },
- "FinanceChargeInvoice" : null,
- "DiscountAppliedInvoices" : [
- {
- "UID" : "c1641b60-e68c-4a30-bfa8-3f977ec4022c",
- "Number" : "00000014",
- "URI" : "{cf_uri}/Sale/Invoice/c1641b60-e68c-4a30-bfa8-3f977ec4022c"
- },
- {
- "UID" : "922690d0-c373-426e-91cb-8ee43b0da1f9",
- "Number" : "00000019",
- "URI" : "{cf_uri}/Sale/Invoice/922690d0-c373-426e-91cb-8ee43b0da1f9"
- }
- ],
- "CreditSettlements" : [
- {
- "UID" : "ba2a6710-bdc1-439e-b396-ee705c585553",
- "Number" : "SJ000001",
- "URI" : "{cf_uri}/Sale/CreditSettlement/ba2a6710-bdc1-439e-b396-ee705c585553"
- },
- {
- "UID" : "e0702eb3-17bf-4a5a-ae4a-38cdcde9d711",
- "Number" : "SJ000008",
- "URI" : "{cf_uri}/Sale/CreditSettlement/e0702eb3-17bf-4a5a-ae4a-38cdcde9d711"
- }
- ]
- }