PaymentModel
Less than to read
A Payment represents money sent from one company to another. A single payment may contain payments for
one or more invoices; it is also possible for payments to be made in advance of an invoice, for example,
as a deposit. The creator of the Payment is identified by the CustomerId
field, and the recipient of
the Payment is identified by the CompanyId
field. Most Payments are uniquely identified both by a
Sage Network ID number and a customer ERP “key” that was generated by the system that originated
the Payment. Payments that have not been fully applied have a nonzero UnappliedAmount
value, which
represents a deposit that has been paid and not yet applied to an Invoice.
Methods
The following API methods use this data model.
- Retrieve Payment
- Update Payment
- Create Payments
- Query Payments
Read-Only Fields
These fields are assigned by the API server and cannot be changed.
groupKey
uuid, read-only
The GroupKey uniquely identifies a single Sage Network account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created.
For more information, see Accounts and GroupKeys.
paymentId
uuid, read-only
The unique ID of this record, automatically assigned by Sage Network when this record is added to the Sage Network.
For the ID of this record in its originating financial system, see ErpKey
.
erpWriteStatus
ErpWriteStatuses, read-only
Possible statuses for a record that supports ERP write.
erpWriteStatusName
string, nullable, read-only
The name of the ErpWriteStatus for this Payment
created
date-time, read-only
The date on which this record was created.
createdUserId
uuid, read-only
The ID of the user who created this payment.
modified
date-time, read-only
The date on which this record was last modified.
modifiedUserId
uuid, read-only
The ID of the user who last modified this payment.
appEnrollmentId
uuid, nullable, read-only
The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
serviceFabricStatus
string, nullable, read-only
The status of this payment within Service Fabric. “UNAUTHORISED” “PENDING” “PAID” “PAID_OFFLINE” “FAILED” “CANCELLED” “REJECTED” “REFUNDED” “PARTIALLY” “PARTIALLY_REFUNDED”
sourceModifiedDate
date-time, nullable, read-only
The date on which this record was last modified in source ERP.
Required Fields
companyId
uuid, min 1 characters
The ID of the company to which this payment belongs.
paymentType
string, 1-20 characters
The type of payment, AR Payment or AP Payment.
Recognized PaymentType values are:
AR Payment
- A payment made by a Customer to the CompanyAP Payment
- A payment made by the Company to a Vendor
tenderType
string, 1-25 characters
Cash, check, credit card, wire transfer.
Recognized TenderType values are:
Cash
- A cash payment or other direct transfer.Check
- A check payment.Credit Card
- A payment made via a credit card.Wire Transfer
- A payment made via wire transfer from another financial institution.Other
- A payment made via another method not listed above.
isOpen
True if this payment includes some unassigned amount that has not yet been applied to an invoice. If this
value is true, the field UnappliedAmount
will be nonzero.
paymentDate
date, min 1 characters
The date when this payment was received. This typically is the date when an accounting employee recorded that they received notification that the payment had occurred, whether they were notified by email, postal mail, or financial transaction notification.
postDate
date, min 1 characters
The date when a payment was posted to a ledger. This date is often determined by a company’s accounting practices and may be different than the date when the payment was received. This date may be affected by issues such as temporary holds on funds transferred, bank holidays, or other actions.
paymentAmount
Total amount of this payment in it’s received currency.
unappliedAmount
Unapplied balance of this payment in it’s received currency. If this amount is nonzero, the field IsOpen
will be true.
isVoided
Is the payment voided?
inDispute
Is the payment in dispute?
currencyRate
The Currency Rate used to get from the account’s base currency to the payment amount.
baseCurrencyPaymentAmount
Total amount of this payment in the group’s base currency.
baseCurrencyUnappliedAmount
Unapplied balance of this payment in the group’s base currency. If this amount is nonzero, the field IsOpen
will be true.
Optional Fields
erpKey
string, nullable, max 255 characters
The unique ID of this record as it was known in its originating financial system.
If this company record was imported from a financial system, it will have the value ErpKey
set to the original primary key number of the record as it was known in the originating financial
system. If this record was not imported, this value will be null
.
For more information, see Identity Columns.
memoText
string, nullable, 0-50 characters
Memo or reference text (ex. memo field on a check).
currencyCode
string, nullable, max 3 characters
The ISO 4217 currency code for this payment.
For a list of ISO 4217 currency codes, see Query Currencies.
referenceCode
string, nullable, max 100 characters
Reference code for the payment for the given Erp system.
Included Collections
These fields are available when using Retrieve or Query API calls if you specify the associated Include
parameter.
applications
PaymentAppliedModel[], nullable, read-only
All applications this payment is associated with.
To retrieve this collection, specify Applications
in the “Include” parameter for your query.
notes
NoteModel[], nullable, read-only
A collection of notes linked to this record. To retrieve this collection, specify Notes
in the
include
parameter when retrieving data.
To create a note, use the Create Note
endpoint with the TableKey
to Payment
and the ObjectKey
set to the PaymentId
for this record. For
more information on extensibility, see linking extensible metadata to objects.
attachments
AttachmentModel[], nullable, read-only
A collection of attachments linked to this record. To retrieve this collection, specify Attachments
in
the include
parameter when retrieving data.
To create an attachment, use the Upload Attachment
endpoint with the TableKey
to Payment
and the ObjectKey
set to the PaymentId
for this record. For
more information on extensibility, see linking extensible metadata to objects.
customFieldDefinitions
CustomFieldDefinitionModel[], nullable, read-only
A collection of custom fields linked to this record. To retrieve this collection, specify
CustomFieldDefinitions
in the include
parameter when retrieving data.
To create a custom field, use the Create Custom Field
endpoint with the TableKey
to Payment
and the ObjectKey
set to the PaymentId
for this record. For
more information on extensibility, see linking extensible metadata to objects.
customFieldValues
CustomFieldValueModel[], nullable, read-only
A collection of custom fields linked to this record. To retrieve this collection, specify
CustomFieldValues
in the include
parameter when retrieving data.
To create a custom field, use the Create Custom Field
endpoint with the TableKey
to Payment
and the ObjectKey
set to the PaymentId
for this record. For
more information on extensibility, see linking extensible metadata to objects.