DealPayment
One payment recorded on a deal. A deal paid in full has one; a payment plan has one per payment.
DealPaymentFields
Recorded gross amount of this payment before refunds, in major units (97 means $97), in the deal's currency; a payment carries no currency of its own.
When a later payment of a payment plan is due (ISO 8601). Null for any other payment. A due date is a day: it is stored at noon UTC, so read its date in UTC.
When the money arrived (ISO 8601). Null while pending.
Cumulative amount returned from this payment, in the same major units as amount. Zero when no refund is recorded. Net value is amount - min(max(amount, 0), max(refundedAmount, 0)). The amount field keeps its recorded gross value.
The sale record this payment is. REST and the call.closed webhook send
the same id as sale_id.
paid once the money arrived, pending while it is still due,
cancelled when it was cancelled before it was paid (it stays in the list
and is neither paid nor owed), refunded when the money was given back.
Other values are legacy or provider statuses.