9. Payments
The payment methods read and write collection, payment, service invoice and balance adjustment records. All methods are POST, with the address prefix {base_url}/api/v1/integ/payments/.
| Method | Function | Required role |
|---|---|---|
getPay | Returns collection/payment slips with their line items (legacy format, underscore field names) | Integration.Payments.GetPayments |
GetPayment | Returns collection/payment slips with their line items | Integration.Payments.GetPayment |
GetServiceInvoice | Returns service invoices | Integration.Payments.GetServiceInvoice |
BalanceEqualizing | Returns balance adjustment records | Integration.Payments.BalanceEqualizing |
add | Adds a collection/payment slip | Integration.Payments.Add |
Update | Updates a collection/payment slip | Integration.Payments.Update |
Cancel | Cancels a slip | Integration.Payments.Cancel |
AddServiceInvoice | Adds a service invoice | Integration.Payments.AddServiceInvoice |
UpdateServiceInvoice | Updates a service invoice | Integration.Payments.UpdateServiceInvoice |
The Integration.Payments role grants access to all of these methods. The distributor permission applies to the read methods (section 2).
Common codes
| Field | Values |
|---|---|
direction | Collection = collection, Payment = payment |
paymentType | Cash = cash, CreditCard = credit card, BankTransfer = bank transfer, Check = check, Bond = promissory note |
Values are case-sensitive; an unrecognized value is treated as Collection and Cash.
Read methods mark records as "exported". getPay, GetPayment, GetServiceInvoice and BalanceEqualizing mark the records they return. When you call again with exported: false, the next page is returned. Records that are updated or canceled revert to "not exported" and are returned again.
Methods in this chapter
- 9.1 getPay — Pulls new collections and payments.
- 9.2 GetPayment, GetServiceInvoice, BalanceEqualizing — Queries payments, service invoices and balance adjustments with filters.
- 9.3 add and Update (writing collections/payments) — Adds a new collection/payment or updates an existing one.
- 9.4 Cancel — Cancels a collection/payment record.
- 9.5 AddServiceInvoice and UpdateServiceInvoice — Adds or updates a service invoice.