Payments

An AP payment is a transaction that records a payment against a bill or an adjustment.

List payments

get/objects/accounts-payable/payment

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

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View Payments
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "1718",
      • "id": "1718",
      • "href": "/objects/accounts-payable/payment/1718"
      },
    • {
      • "key": "1717",
      • "id": "1717",
      • "href": "/objects/accounts-payable/payment/1717"
      },
    • {
      • "key": "3228",
      • "id": "3228",
      • "href": "/objects/accounts-payable/payment/3228"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a payment

post/objects/accounts-payable/payment

Creates a new payment.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View, Add Payments
SecurityOAuth2
Request
Request Body schema: application/json
required
required
object

Financial account from which the payment is made.

id
string

Account number or other unique identifier for the bank account.

Example: "BOA"
required
object

Vendor to receive the payment.

key
string

Unique key for the vendor.

Example: "201"
id
string

ID of the vendor.

Example: "V-00014"
paymentMethod
required
string

Payment method for the payment.

Example: "printedCheck"
paymentDate
required
string <date>

The date to make the payment.

Example: "2024-11-23"
recordType
string

Record type

Enum: "apAdjustments" "apAdvance" "apAppliedAdvance" "apBill" "apDiscount" "apPayment" "arAdjustments" "arAdvance" "arAppliedAdvanceOverpayment" "arDiscount" "arInvoice" "arRealizedMultiCurrencyGainLoss" "arReceipts" "cmPrintedQuickCheck" "employeeExpenses" "employeeReimbursements" "expenseAdjustment" "interEntityReceivable" "manualCheck"
Example: "apBill"
action
string
Default: "draft"

The action to take when the payment is created or updated.

  • submit - Submit or post the payment, depending on the approval workflow.
  • draft - Move the payment to the outbox in the system.
Enum: "draft" "submit"
Example: "submit"
documentNumber
string or null

Reference number for the payment, which can be the check number or the transaction number, depending on the payment method used.

Example: "3086"
description
string or null

Description of the payment (memo).

Example: "From billing through August 31"
documentId
string or null

Document ID for the payment.

Example: "Prim-Vendor-Invoice-VI#0008#doc"
object

Transaction totals in the 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

For companies that use multi-currency transactions, totals in the transaction currency.

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"
object

Exchange rate details used to calculate the base amount.

date
string or null <date>

Exchange rate date for this transaction. Can be the current date, the date the transaction was issued, or the date the transaction will be paid.

Example: "2024-01-23"
typeId
string or null

Exchange rate type used to calculate the base amount from the transaction amount.

Example: "1"
paymentRequestMethod
string
Default: "useVendorPreference"

Specifies how payment requests are generated.

Enum: "generateOneRequestPerBill" "mergeRequestIntoOnePerVendorPayToContact" "mergeRequestsIntoOnePerVendor" "useVendorPreference"
Example: "generateOneRequestPerBill"
Array of objects non-empty

Payment deails, including transaction payment amounts, line items, and discounts.

Array (non-empty)
required
object

AP bill associated with the payment.

object

Payment amounts in the company's base currency.

object

Payment amounts in the company's transaction currency.

discountDate
string or null <date>

Date the discount was issued.

Example: "2024-04-04"
object

AP adjustment associated with the payment.

object

Line item in the associated AP adjustment.

object

Line item in the associated AP bill.

object

AP payment object that this payment detail object is part of.

object

AP payment line associated with this payment detail object.

object

Inline bill associated with the payment.

object

Line item in the associated inline bill.

object

Credit adjustment associated with the payment.

object

Line item in the associated credit adjustment.

object

AP advance associated with the payment.

object

Line item in the associated AP advance.

Array of objects

Line items in the payment.

Array
description
string or null

Memo or brief description of the AP payment line item.

Example: "Penalty"
object
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "financialEntity": {
    • "id": "BOA"
    },
  • "paymentDate": "2024-04-04",
  • "action": "submit",
  • "description": "From billing through March",
  • "documentNumber": "3086",
  • "documentId": "Prim-Vendor-Invoice-VI#0008",
  • "paymentRequestMethod": "generateOneRequestPerBill",
  • "baseCurrency": {
    • "currency": "USD"
    },
  • "txnCurrency": {
    • "currency": "USD"
    },
  • "paymentMethod": "creditCard",
  • "vendor": {
    • "id": "201"
    },
  • "details": [
    • {
      • "txnCurrency": {
        },
      • "bill": {
        }
      }
    ]
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "3323",
    • "key": "3323",
    • "href": "/objects/accounts-payable/payment/3323"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a payment

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

Returns detailed information for a specified payment.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View Payments
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the payment.

Example: 3323
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "3302",
    • "key": "3302",
    • "paymentSummary": {
      • "id": "1843",
      • "key": "1843",
      • "name": "Payments: 2024/03/30 04:08:58:5637 Batch",
      • "postingDate": "2024-03-21",
      • "href": "/objects/accounts-payable/summary/1843"
      },
    • "recordType": "apPayment",
    • "financialEntity": {
      • "id": "BOA"
      },
    • "state": "submitted",
    • "paymentMethod": "creditCard",
    • "vendor": {
      • "entity": "V201",
      • "id": "201",
      • "name": "PG & E",
      • "key": "38",
      • "href": "/objects/accounts-payable/payment/38"
      },
    • "entity": {
      • "id": "1",
      • "key": "1",
      • "name": "United States of America"
      },
    • "documentNumber": "123",
    • "description": "Payment for 2024-03-21",
    • "documentId": "Paid For PrjUS_InvWParent_4",
    • "txnDate": "2024-03-21",
    • "txnPaidDate": "2024-03-21",
    • "baseCurrency": {
      • "currency": "USD",
      • "totalAmount": "10.00",
      • "totalSelected": "0.00",
      • "totalPaid": "10.00",
      • "totalDue": "0.00"
      },
    • "txnCurrency": {
      • "currency": "USD",
      • "totalAmount": "10.00",
      • "totalSelected": "0.00",
      • "totalPaid": "10.00",
      • "totalDue": "0.00"
      },
    • "exchangeRate": {
      • "date": null,
      • "typeId": null,
      • "rate": null
      },
    • "payTo": {
      • "id": "PG & E(V201)",
      • "key": "6886",
      • "href": "/objects/company-config/contact/6886"
      },
    • "audit": {
      • "createdDateTime": "2024-03-29T18:08:57Z",
      • "modifiedDateTime": "2024-03-29T18:08:59Z",
      • "createdByUser": {
        },
      • "modifiedByUser": {
        }
      },
    • "cleared": false,
    • "clearedDate": null,
    • "isInclusiveTax": false,
    • "taxSolution": {
      • "key": null,
      • "id": null,
      • "taxCalculationMethod": null
      },
    • "paymentRequestMethod": "useVendorPreference",
    • "jointPayee": {
      • "id": null,
      • "key": null
      },
    • "lines": [
      • {
        }
      ],
    • "details": [
      • {
        }
      ],
    • "href": "/objects/accounts-payable/payment/3302"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a payment

patch/objects/accounts-payable/payment/{key}

Updates an existing payment by setting field values. Any fields not provided remain unchanged.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View, Edit Payments
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the payment.

Example: 3323
Request Body schema: application/json
recordType
string

Record type

Enum: "apAdjustments" "apAdvance" "apAppliedAdvance" "apBill" "apDiscount" "apPayment" "arAdjustments" "arAdvance" "arAppliedAdvanceOverpayment" "arDiscount" "arInvoice" "arRealizedMultiCurrencyGainLoss" "arReceipts" "cmPrintedQuickCheck" "employeeExpenses" "employeeReimbursements" "expenseAdjustment" "interEntityReceivable" "manualCheck"
Example: "apBill"
object

Financial account from which the payment is made.

id
string

Account number or other unique identifier for the bank account.

Example: "BOA"
action
string
Default: "draft"

The action to take when the payment is created or updated.

  • submit - Submit or post the payment, depending on the approval workflow.
  • draft - Move the payment to the outbox in the system.
Enum: "draft" "submit"
Example: "submit"
documentNumber
string or null

Reference number for the payment, which can be the check number or the transaction number, depending on the payment method used.

Example: "3086"
description
string or null

Description of the payment (memo).

Example: "From billing through August 31"
documentId
string or null

Document ID for the payment.

Example: "Prim-Vendor-Invoice-VI#0008#doc"
paymentDate
string <date>

The date to make the payment.

Example: "2024-11-23"
object

Transaction totals in the 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

For companies that use multi-currency transactions, totals in the transaction currency.

currency
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"
object

Exchange rate details used to calculate the base amount.

date
string or null <date>

Exchange rate date for this transaction. Can be the current date, the date the transaction was issued, or the date the transaction will be paid.

Example: "2024-01-23"
typeId
string or null

Exchange rate type used to calculate the base amount from the transaction amount.

Example: "1"
paymentMethod
string

Payment method for the payment.

Example: "printedCheck"
object

Vendor to receive the payment.

key
string

Unique key for the vendor.

Example: "201"
id
string

ID of the vendor.

Example: "V-00014"
paymentRequestMethod
string
Default: "useVendorPreference"

Specifies how payment requests are generated.

Enum: "generateOneRequestPerBill" "mergeRequestIntoOnePerVendorPayToContact" "mergeRequestsIntoOnePerVendor" "useVendorPreference"
Example: "generateOneRequestPerBill"
Array of objects non-empty

Payment deails, including transaction payment amounts, line items, and discounts.

Array (non-empty)
object

Payment amounts in the company's base currency.

object

Payment amounts in the company's transaction currency.

discountDate
string or null <date>

Date the discount was issued.

Example: "2024-04-04"
object

AP adjustment associated with the payment.

object

Line item in the associated AP adjustment.

object

AP bill associated with the payment.

object

Line item in the associated AP bill.

object

AP payment object that this payment detail object is part of.

object

AP payment line associated with this payment detail object.

object

Inline bill associated with the payment.

object

Line item in the associated inline bill.

object

Credit adjustment associated with the payment.

object

Line item in the associated credit adjustment.

object

AP advance associated with the payment.

object

Line item in the associated AP advance.

Array of objects

Line items in the payment.

Array
description
string or null

Memo or brief description of the AP payment line item.

Example: "Penalty"
object
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "description": "Payment for DOC Number: 22345",
  • "documentNumber": "22345",
  • "documentId": "22345"
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "3325",
    • "key": "3325",
    • "href": "/objects/accounts-payable/payment/3325"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a payment

delete/objects/accounts-payable/payment/{key}

Deletes a payment.

Permissions and other requirements
SubscriptionAccounts Payable
User typeBusiness
PermissionsList, View, Delete Payments
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the payment.

Example: 3323
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 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-payable/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 has (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 result set, 4000 maximum.

Example: 100
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "object": "accounts-payable/payment",
  • "fields": [
    • "id",
    • "baseCurrency.totalAmount",
    • "paymentMethod",
    • "href"
    ],
  • "filters": [
    • {
      • "$eq": {
        }
      },
    • {
      • "$gte": {
        }
      }
    ],
  • "filterExpression": "1 and 2",
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "id": "188",
      • "baseCurrency.totalAmount": "5934.08",
      • "paymentMethod": "Printed Check",
      • "href": "/objects/accounts-payable/payment/188"
      },
    • {
      • "id": "191",
      • "baseCurrency.totalAmount": "6591.89",
      • "paymentMethod": "Printed Check",
      • "href": "/objects/accounts-payable/payment/191"
      },
    • {
      • "id": "285",
      • "baseCurrency.totalAmount": "301.56",
      • "paymentMethod": "Printed Check",
      • "href": "/objects/accounts-payable/payment/285"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}