Overview

This method allows you to receive a payment into Komet Sales.

Request

https://api.kometsales.com/api/payment.receive

  • Method: POST
  • Content-Type: application/json

Input Parameters:

  • authenticationToken (required)(string:50): Komet Sales security token.
  • customerId (required)(integer:20): customer ID. You can obtain this value from the customer.list API method.
  • locationCode (required)(string:20): company location code. This field is only required if the company is in Multi Location mode. You can obtain this value from the location.list API method.
  • methodId (required)(integer:20): payment method ID from the master list. You can obtain this value from the payment.method.list API method.
  • date (required)(date): payment date (date format YYYY-MM-DD).
  • totalPayment (optional)(decimal:10,2): the total amount of the payment. This field can be used to create overpayments in the system.
  • referenceNumber (optional)(string:50): check or reference number.
  • notes (optional)(string:200): payment notes.
  • invoices (required): array of orders that will be affected with this payment.
    • invoiceNumber (required)(integer:10): invoice number. You can obtain this value from the invoice.details.list API method.
    • amount (required)(decimal:10,2): amount paid to this order.
    • discount (optional)(decimal:10,2): if you want to apply any discount amount to the order.

If the totalPayment field is given it must be at least equal than the total of all the invoices amounts, the amount left will be saved as overpayment.

Sample
{
  "authenticationToken": "token_info_goes_here",
  "customerId": 99999,
  "totalPayment": 3000,
  "methodId": "999", 
  "date": "2014-06-10",
  "referenceNumber": "Check 4566",
  "notes": "Any special notes goes here", 
  "invoices": 
   [
    {
      "invoiceNumber": 9999,   
      "amount": 1,200, 
      "discount": 0
    },
    { 
      "invoiceNumber": 9998,   
      "amount": 800, 
      "discount": 100
    }
 ]
}

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • controlNumber (integer:20): payment control number that was just created.
Sample
{
  "status": "1",
  "message": "success",
  "controlNumber": "9999"
 }