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 the query service to find objects that meet certain criteria and specify the properties that are returned.

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.

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
Deprecated
Default: "draft"

This field has been deprecated. Use the state field instead. 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"
state
string
Default: "draft"

Current state of the AP payment. The state can be modified through workflow operations like Submit and Reverse, but cannot be changed using the PATCH operation.

Enum: "approved" "confirmed" "declined" "delivered" "draft" "partiallyApproved" "printVoided" "quickDelivery" "submitted" "voided"
Example: "approved"
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 or null
Default: "useVendorPreference"

Specifies how payment requests are generated.

Enum: "generateOneRequestPerBill" "mergeRequestIntoOnePerVendorPayToContact" "mergeRequestsIntoOnePerVendor" null "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",
  • "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.

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": "uncleared",
    • "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.

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
Deprecated
Default: "draft"

This field has been deprecated. Use the state field instead. 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"
state
string
Default: "draft"

Current state of the AP payment. The state can be modified through workflow operations like Submit and Reverse, but cannot be changed using the PATCH operation.

Enum: "approved" "confirmed" "declined" "delivered" "draft" "partiallyApproved" "printVoided" "quickDelivery" "submitted" "voided"
Example: "approved"
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 or null
Default: "useVendorPreference"

Specifies how payment requests are generated.

Enum: "generateOneRequestPerBill" "mergeRequestIntoOnePerVendorPayToContact" "mergeRequestsIntoOnePerVendor" null "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.

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
    }
}