clientCode.
Before you report
- The Receivable must exist. An allocation to a missing Receivable returns
409 dependency_missing. - The Receivable’s Source balance and working balance must match. If they differ, a new payment, refund or reversal returns
409 financial_operation_required. Read the Receivable and resolve the difference first. - Choose the payment’s ID once, and reuse it for every retry. See Safe retries.
Step 1: Send the payment
Allocate the money to one or more Receivables. A Receivable may appear once inallocations, and the total may not exceed amount.
201 Created. The response lists the resolved allocations, an allocationBasis of explicit, and the unappliedAmount. Money you do not allocate stays unapplied and does not reduce any Receivable.
Without allocations, a Client-approved allocation rule may apply. Otherwise the whole amount stays unapplied. PayPathIQ never assumes oldest-first.
Step 2: Check the Receivable
GET the Receivable. Its recoverableAmount has dropped by the allocated amount. financialPosition shows the Source, working and unreconciled amounts.
Step 3: Handle a lost response
If you got no response, repeat the identical request with the same ID.Refunds and reversals
Send"type": "refund" or "type": "reversal" with a new ID and relatedExternalPaymentObservationId set to the original payment. The amount can be partial. Its allocations return amounts to the Receivables that payment was allocated to. It records evidence and never executes a transfer. See Payment observations.