Payment records
Learn how to track and keep a history of payments.
Overview
Payment records are a way to track the payment history of payables (bills) and accounts receivable invoices. The /payment_records
endpoint allows you to take note of every payment made towards a payable or an invoice.
If you use Monite payment rails together with account payables or accounts receivable, Monite automatically stores all payment information for payables and receivable invoices. However, when using external payment rails, you must manually create records for each payment instance - full or partial - made towards invoices.
Roles and permissions
To use the /payment_records*
endpoints with an entity user token, this entity user must have a role with the payment_record
permission.
If using a partner-level token, no special permissions are needed.
Create a payment record
To create a payment record for a payable or receivable invoice, call POST /payment_records
. You must provide the external payment reference number or transaction ID for the payment made using the payment_intent_id
field as shown below. The object.type
field defines the invoice type for which the payment was made - payable
or receivable
. The object.id
field represents the UUID of the payable or receivable.
Monite automatically updates the status
of the specified invoice to reflect the payment made and returns the old and new statuses in the response. The response also contains a unique id
assigned to this payment record.
Retrieve a payment record
Monite stores all of an entity’s payment records. This includes payment records created manually via the POST /payment_records
endpoint and those automatically created when an entity uses Monite payment rails. To retrieve an existing payment record, call GET /payment_records/{payment_record_id}
as shown:
The successful response contains complete details of the payment record requested:
The is_external
field in the response indicates whether the payment record was created manually (true
) or automatically triggered via Monite’s payment rails (false
).
Get all payment records
To get a list of all payment records, send a GET
request to the /payment_records
endpoint as shown:
The successful request returns a paginated history of all payment records—internal or external.
You can sort and filter the results of this request by the order, limit, object UUID, and other fields. For the full list of available sort and filter parameters, see the description of the GET /payment_records
endpoint.
Get all payment records for a payable or receivable
To retrieve all payment records associated with a payable or receivable, call GET /payment_records
and include the object_id
query parameter. For example, the following snippet will return all payment records associated with a particular invoice:
Get all internal or external payment records
To filter payment records by their origin, call GET /payment_records
and include the is_external
query parameter. For example, the following snippet will return payment records created using Monite’s payment rails: