Skip to content

RecordWithDiscountsAndFees

Record customer payments with discounts and finance charges for sale invoices

Released
Updated
URLSupports
/{cf_uri}/Sale/CustomerPayment/RecordWithDiscountsAndFees
POST
The {guid} in the URL above is replaced with the unique ID for any given company file

Attribute Details

AttributeTypeNotes
UIDGuid (36)Unique guid identifier created for a customer payment.
DepositTo
Required
StringIf allocating a banking account for the payment specify Account If using undeposited funds specify UndepositedFunds What are undeposited funds?
AccountobjectThe following set of information pulls through details for the Account
Account.UID
Required
Guid (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.
CustomerobjectThe following set of information pulls through details for the Customer contact
Customer.UID
Required
Guid (36)Foreign Key : Unique guid identifier belonging to the customer assigned to the customer payment.
Customer.DisplayIDString (15)Customer contact Card ID, can also be used as a unique customer contact identifier.
ReceiptNumberString (8)ID No of payment transaction
DateDateTimeTransaction 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?
PaymentMethodPaymentMethodPayment 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
MemoString (255)Memo text of the customer payment entry.
LinesarrayAn array of invoice or order line information.
Lines.SaleobjectSales invoice or order transaction information.
Lines.Sale.UID
Required
Guid (36)Foreign Key : Unique guid identifier belonging to the invoice object.
Lines.Sale.NumberString (8)Sales invoice number.
Lines.AmountApplied
Required
Decimal (13.2)Mandatory for a Local currency record : Amount applied to sale invoice or order.
Lines.AmountAppliedForeign
Required
Decimal (13.2)Mandatory for a Foreign currency record : Amount applied to sale invoice or order in foreign currency.
Lines.DiscountApplied
Required
Decimal (13.2)Mandatory for a Local currency record : Discount amount applied to invoice or order.
Lines.DiscountAppliedFOreign
Required
Decimal (13.2)Mandatory for a Foreign currency record : Discount amount applied to invoice or order in foreign currency.
Lines.TypeDecimal (13.2)Invoice type, can consist of the following: Invoice Order
CustomerPaymentobjectThe following set of information pulls through details for the customer payment
CustomerPayment.UIDGuid (36)Foreign Key : Unique identifier for the customer payment in the form of a guid.
CustomerPayment.ReceiptNumberString (10)ID No of payment transaction
CustomerPayment.URIStringUniform resource identifier associated with the customer payment object.
FinanceChargeInvoiceobjectThe following set of information pulls through details for the invoice generated from a finance charge
FinanceChargeInvoice.UIDGuid (36)Foreign Key : Unique identifier for the invoice in the form of a guid.
FinanceChargeInvoice.NumberString (10)Sale invoice number #
FinanceChargeInvoice.URIStringUniform resource identifier associated with the sale invoice object.
DiscountAppliedInvoicesarrayThe following set of information pulls through details for the invoice generated from a discount credit memo.
DiscountAppliedInvoices.UIDGuid (36)Foreign Key : Unique identifier for the invoice in the form of a guid.
DiscountAppliedInvoices.NumberString (10)Sale invoice number #
DiscountAppliedInvoices.URIStringUniform resource identifier associated with the sale invoice object.
CreditSettlementsarrayThe following set of information pulls through details for the settled credit memo.
CreditSettlements.UIDGuid (36)Foreign Key : Unique identifier for the settled credit in the form of a guid.
CreditSettlements.NumberString (10)Sale invoice number #
CreditSettlements.URIStringUniform resource identifier associated with the settled credit memo object.

Response

Request

json
{
  "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\" : [": [
    {
      "UID": "895c0837-ed10-4277-ad1c-ab3294d39847"
    },
    {
      "AmountApplied": 69,
      "DiscountApplied": 5,
      "Type": "Invoice"
    },
    {
      "UID": "172994f9-bd0a-41ee-8349-8ef68ac3be25"
    },
    {
      "AmountApplied": 3990,
      "DiscountApplied": 9.75,
      "Type": "Invoice"
    }
  ]
}