Payments

A payment is a transaction used to record a payment against an invoice or an adjustment/debit memo.

List payments

get/objects/accounts-receivable/payment

Returns a collection with a key, ID, and link for each payment. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

Permissions and other requirements
SubscriptionAccounts Receivable
User ypeBusiness
PermissionsList, View payments
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "212",
      • "id": "212",
      • "href": "/objects/accounts-receivable/payment/212"
      },
    • {
      • "key": "201",
      • "id": "201",
      • "href": "/objects/accounts-receivable/payment/201"
      },
    • {
      • "key": "289",
      • "id": "289",
      • "href": "/objects/accounts-receivable/payment/289"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": 101,
    • "previous": null
    }
}

Create a payment

post/objects/accounts-receivable/payment

Creates a new payment. To successfully create a payment, you must include either the entityId for a financialEntity or the id for an undepositedGLAccount in your request.

Permissions and other requirements
SubscriptionAccounts Receivable
User ypeBusiness
PermissionsList, View, Add payments
SecurityOAuth2
Request
Request Body schema: application/json
paymentMethod
required
string

Payment Method

Enum: "cash" "creditCard" "eft" "onlineACHDebit" "onlineChargeCard" "printedCheck"
Example: "printedCheck"
payerName
string

Name of the payer.

Example: "NF Power and Light"
object

Financial account from which the payment will be made.

entityId
string

Financial entity ID, such as a checking account ID.

Example: "CHK002"
object

Multi-entity payment details.

documentNumber
string

Document number, such as a check number.

Example: "1567"
description
string <= 1000 characters

Memo or notes about the AR payment.

Example: "Regular payment for services"
object

For multi-currency companies, the company's base currency.

currency
string

The company's base currency.

Example: "USD"
amountToPay
string <decimal-precision-2>

Amount to pay in the base currency.

Example: "500"
object

Transaction currency for the payment.

Example: "USD"
currency
required
string

The currency in which the payment was made.

Example: "USD"
amountToPay
string <decimal-precision-2>

Amount to pay in the transaction currency.

Example: "500"
totalAmount
string <decimal-precision-2> <= 14 characters

Total transaction amount.

Example: "100.00"
referenceNumber
string <= 21 characters

Reference number, which can be a transaction number from the bank or a document number.

Example: "1234"
object

AR summary the payment is part of. Summaries are collections of transactions grouped together for processing.

Example: "2021-01-23"
receiptDate
required
string <date>

Posting date for the AR payment.

Example: "2021-01-23"
key
string <= 8 characters

System-assigned key for the AR summary.

Example: "1259"
id
string

Identifier for the AR summary.

Example: "1259"
title
string

Title of the AR summary.

Example: "Receipts (Bank-CHK0002): Batch 02-07-2023"
name
string <= 100 characters

Name of the AR summary.

Example: "Feb 2023 batch"
object

Undeposited funds account associated with this payment.

id
string or null

Undeposited funds account number.

Example: "1501"
key
string or null

System-assigned key for the undeposited funds account.

Example: "356"
object

Customer associated with the AR payment.

Example: "1"
id
required
string <= 21 characters

Identifier for the customer.

Example: "Cust-00064"
key
string

System-assigned key for the customer.

Example: "45"
object

Supporting document for the payment.

key
string

System-assigned key for the attachment.

Example: "123"
id
string

Identifier for the attachment.

Example: "123"
paidDate
string <date>

Date when the invoice was fully paid.

Example: "2023-01-23"
object

Overpayments can be applied to future invoices and can be tagged to specific dimensions for future use.

customerId
string

Customer who made the payment.

Example: "C-00013"
locationId
string

ID of the location to assign any overpayment amount to.

Example: "CA"
departmentId
string

ID of the department to assign any overpayment amount to.

Example: "04"
classId
string

ID of the class to assign any overpayment amount to.

Example: "Class1"
projectId
string

ID of the project to assign any overpayment amount to.

Example: "11"
overPaymentAmount
string <decimal-precision-2>

Amount of the overpayment. When a payment is received that exceeds what the customer owes on all invoices and the amount of the payment is entered, Sage Intacct tracks the excess as an overpayment.

Example: "100.20"
object

Contact information for the AR payment.

object

Pay-to contact for the AR payment.

key
string

System-assigned key for the pay-to contact.

Example: "8"
id
string

Identifier for the pay-to contact.

Example: "Klay Vanderbilt"
Array of objects

Details for the AR payment.

Array
discountDate
string <date>

Discount date

Example: "2023-04-30"
object

For multi-currency companies, the company's base currency.

object

Transaction currency for the payment detail.

Example: "100"
object

Inline transaction record details.

object

Inline transaction line item record.

object

Negative invoice transaction record

object

Negative invoice transaction line item record.

object

AR adjustment transaction record.

object

AR adjustment transaction line item record.

object

AR invoice record.

Example: "1"
object

AR invoice line item record.

object

AR advance record.

object

AR advance line item record.

object

AR posted overpayment record.

object

AR posted overpayment line item record.

object

Postive adjustment record.

object

Positive adjustment line item record.

Array of objects

Line items of the AR payment.

Array
memo
string

Memo or brief description of the AR payment line item.

Example: "Annual service charge"
object

GL account associated with the line item.

object

The general ledger account where the system posts offsets to this line item.

object
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "financialEntity": {
    • "entityId": "BOA"
    },
  • "paymentMethod": "cash",
  • "customer": {
    • "id": "Cust-00064"
    },
  • "documentNumber": "1567",
  • "paymentSummary": {
    • "id": "1259",
    • "receiptDate": "2023-03-23"
    },
  • "paidDate": "2023-03-23",
  • "baseCurrency": {
    • "currency": "USD",
    • "amountToPay": "0.06"
    },
  • "txnCurrency": {
    • "currency": "USD",
    • "amountToPay": "1"
    },
  • "paymentDetails": [
    • {
      • "arInvoice": {
        }
      },
    • {
      • "arInvoiceLine": {
        }
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "2096",
    • "key": "2096",
    • "href": "/objects/accounts-receivable/payment/2096"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a payment

get/objects/accounts-receivable/payment/{key}

Returns detailed information for a specified payment.

Permissions and other requirements
SubscriptionAccounts Receivable
User ypeBusiness
PermissionsList, View payments
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the payment.

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "464",
    • "key": "464",
    • "paymentSummary": {
      • "key": "281",
      • "id": "281",
      • "title": "Receipts(Bank-BOA): 2022/10/10 Batch",
      • "receiptDate": "2022-10-10",
      • "name": "Receipts(Bank-BOA): 2022/10/10 Batch"
      },
    • "undepositedGLAccount": {
      • "key": null,
      • "id": null
      },
    • "recordType": "rp",
    • "financialEntity": {
      • "entityId": "BOA",
      • "entityType": "ba",
      • "name": "Bank of America",
      • "currency": "USD"
      },
    • "state": null,
    • "paymentMethod": "cash",
    • "customer": {
      • "key": "8",
      • "id": "C-000012",
      • "name": "Power Aerospace Materials",
      • "href": "objects/customer/8"
      },
    • "documentNumber": "1567",
    • "description": "Regular payment for services",
    • "audit": {
      • "createdDateTime": "2022-10-10T00:00:00Z",
      • "modifiedDateTime": "2022-12-12T06:51:22Z",
      • "createdBy": "39",
      • "modifiedBy": "39"
      },
    • "paidDate": "2022-11-20",
    • "baseCurrency": {
      • "currency": "USD",
      • "totalAmount": "250",
      • "totalSelected": "0",
      • "totalPaid": "250",
      • "totalDue": "0"
      },
    • "txnCurrency": {
      • "currency": "USD",
      • "totalAmount": "250",
      • "totalSelected": "0",
      • "totalPaid": "250",
      • "totalDue": "0"
      },
    • "exchangeRate": {
      • "date": "2020-08-01",
      • "typeId": null,
      • "rate": 1
      },
    • "contacts": {
      • "payTo": {
        }
      },
    • "bankReconciliationStatus": "false",
    • "bankReconciliationDate": null,
    • "referenceNumber": null,
    • "attachment": {
      • "id": "123",
      • "key": "123"
      },
    • "multiEntityPayment": {
      • "key": "1077",
      • "id": "PAY-00136",
      • "href": "/objects/accounts-receivable/payment/1077"
      },
    • "lines": [
      • {
        }
      ],
    • "paymentDetails": [
      • {
        }
      ],
    • "href": "/objects/accounts-receivable/payment/464"
    },
  • "ia::meta": {
    • "totalCount": 1
    }
}

Query payments

post/services/core/query

Queries an object for filtered data.

SecurityOAuth2
Request
Request Body schema: application/json
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "accounts-receivable/payment"
fields
Array of strings

List of fields to include in the response. Can be any combination of these:

  • The name of a field in the object that you are querying, such as id.

  • The name of a field in a related object, using the form relatedObjectName.fieldName, such as vendor.id.

  • The result of an aggregate function run against the values in the returned objects. Use the form function:fieldName, such as min:startDate to return the earliest starting date. Valid function names are:

    • count
    • avg
    • sum
    • min
    • max
  • The result of an aggregate function run against the values in related objects, using the form function:relatedObjectName.fieldName, such as max:vendor.creditLimit. The same functions are supported as for object fields.

Example: ["key","id","max:vendor.creditLimit"]
Array of equal (object) or not equal (object) or less than (object) or (less than or equal (object)) or greater than (object) or (greater than or equal (object)) or in (object) or not in (object) or between (object) or not between (object) or contains (object) or does not contain (object) or starts with (object) or does not start with (object) or ends with (object) or does not end with (object)

Filter conditions to select the objects to return based on their field values. You use operators and conditions to build your filter, such as {"$eq":{"status":"active"}} to select objects in which status is equal to "active".

Example: [{"$eq":{"status":"active"}},{"$gt":{"totalDue":"1000"}},{"$contains":{"name":"Acme"}}]
Array
Any of:

Field value must be equal to this specified value.

For date fields, you can use these macro values that are relative to the current date or the asOfDate in filterParameters, if set:

  • today
  • currentWeek
  • currentMonth
  • currentQuarter
  • currentYear
  • yesterday
  • lastWeek
  • priorMonth
  • priorQuarter
  • priorYear

These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the asOfDate each time to retrieve the same data set for different time periods.

For example, {"eq":{"postingDate":"priorYear"}}.

object

The field name and value to be compared with object values.

Example: {"status":"active"}
filterExpression
string
Default: "and"

Logical operators to apply when there are multiple filter conditions. The conditions in the filters array are implicitly numbered starting at 1. Supports and, or, and grouping with parentheses.

Shortcuts:

  • and by itself means that all conditions must be true.
  • or by itself means that at least one condition must be true.
Example: "(1 and 2) or 3"
object

Pre-defined filter options.

asOfDate
string <date>

The "as of" date to use with any relative date comparisons in filters. For example, if asOfDate is set to "2022-04-01" then priorMonth will be "03".

The current date is used if asOfDate is not set.

Example: "2022-04-01"
includeHierarchyFields
boolean
Default: false

Set to true to include hierarchical structure information with each object in the response.

Example: false
caseSensitiveComparison
boolean
Default: true

Queries are case-sensitive by default. Set to false to ignore case in a query.

Example: true
includePrivate
boolean
Default: false

By default, in a multi-entity company, queries from the top-level entity do not access data in private entities. Set includePrivate to true if you want to query data in private entities.

Example: false
Array of objects

Set the order of the results by specifying field names to sort by and whether they should be in ascending or descending order.

Example: [{"totalDue":"asc"},{"lastPaymentMadeDate":"desc"}]
Array
property name*
additional property
string
Enum: "asc" "desc"
start
integer

First record of the result set to include in the response.

Example: 1
size
integer

Number of records to include in the response.

Example: 100
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "object": "accounts-receivable/payment",
  • "filters": [
    • {
      • "$eq": {
        }
      }
    ],
  • "fields": [
    • "key",
    • "id",
    • "paymentSummary.id",
    • "financialEntity.name"
    ],
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "725",
      • "id": "725",
      • "paymentSummary.id": "640",
      • "financialEntity.name": "HSBC"
      },
    • {
      • "key": "736",
      • "id": "736",
      • "paymentSummary.id": "651",
      • "financialEntity.name": "HSBC"
      },
    • {
      • "key": "738",
      • "id": "738",
      • "paymentSummary.id": "651",
      • "financialEntity.name": "HSBC"
      },
    • {
      • "key": "860",
      • "id": "860",
      • "paymentSummary.id": "775",
      • "financialEntity.name": "HSBC"
      },
    • {
      • "key": "861",
      • "id": "861",
      • "paymentSummary.id": "775",
      • "financialEntity.name": "HSBC"
      },
    • {
      • "key": "862",
      • "id": "862",
      • "paymentSummary.id": "775",
      • "financialEntity.name": "HSBC"
      }
    ],
  • "ia::meta": {
    • "totalCount": 6,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}