Payment Data Models

Payment refers to general payment towards any transaction, invoice , bill etc.

How to get the list of Payments

There are two ways to fetch the list of payments from your integrations:

1. Syncs (Webhook-based Bulk Reads)

Syncs provide an automated, push-based approach for bulk data retrieval. Once you set up a sync for an integration, Knit polls the source app for changes and sends updates straight to your webhook. This webhook-based model eliminates the need for you to continuously pull data.

Note: The data models sync does not start automatically. To initiate the synchronization process, you must explicitly call the Sync Start API for the initial sync.

Read more about syncs and webhooks here: https://developers.getknit.dev/docs/register-webhook-url#/

2. Read APIs (On-demand Individual Reads)

Read APIs provide on-demand access to specific data through request-response calls. These are standard GET/List operations that allow you to retrieve payment information whenever needed.

You can refer to accounting APIs here: https://developers.getknit.dev/reference/list-payments#/

Data Model

Model IDEvent Data KeyDescription
accounting_payment_infoinfo
accounting_payment_lineItemslineItems

Payment Info

Model ID: accounting_payment_info

Name Type Description

id

String

dateTime

Date

status

Enum

[SUCCESS, FAILURE, PENDING, NOT_SPECIFIED]

paymentMode

Enum

[CASH,CHEQUE, ELECTRONIC_TRANSFER, NOT_SPECIFIED]

referenceNumber

String

creditedAccountId

String

debitedAccountId

String

contactId

String

companyId

String

linkedCompanyIds

List[String]

List of company Ids associated with object. (Applicable for multi subsidiary apps like Netsuite.)

amount

Double

exchangeRate

String

currency

String

One of among Currency Codes (ISO 4217) like-
INR,
USD,
EUR

description

String

Payment Entries

Model ID: accounting_payment_lineItems

NameTypeDescription
lineItemsList[PaymentLineItem]

PaymentLineItem

NameTypeDescription
idString
amountString
referenceNumberString
discountDouble
modeEnum[CASH , CHEQUE, ELECTRONIC_TRANSFER, NOT_SPECIFIED]
paymentLinkedToEnum[INVOICE, BILL]
invoiceIdString
invoiceNumberString

Event Data Example

{
  "info": {
    "id": "eeedd617-d2c4-4d8c-96f9-69eeeb62b1e6",
    "dateTime": "2024-05-20T00:00:00Z",
    "status": "SUCCESS",
    "paymentMode": "ELECTRONIC_TRANSFER",
    "referenceNumber": "UTR01101",
    "creditedAccountId": "8185da42-1268-472e-a9a8-0758f53e464b",
    "debitedAccountId": "8185da42-1268-472e-a9a8-0758f53e464b",
    "contactId": "65a3f750-de4c-463a-85b1-f04a3a37b45a",
    "companyId": "ac19c8f9-a901-4db3-bef1-5aaca2a7c15a",
    "amount": 1100.0,
    "exchangeRate": "1.0",
    "currency": "USD",
    "description": "This is payment for Tshirt."
  },
  "lineItems": [
    {
      "id": "eeedd617-d2c4-4d8c-96f9-69eeeb62b1e6",
      "amount": 1100,
      "referenceNumber": "UTR01101",
      "discount": 0.0,
      "mode": "ELECTRONIC_TRANSFER",
      "paymentLinkedTo": "INVOICE",
      "invoiceId": "0d93e033-6548-40ea-bdfd-e551b85f5d7e",
      "invoiceNumber": "INV-101"
    }
  ]
}