post
https://sandbox.uk.rootplatform.com/v1/insurance/policies//payments/create-refund-payment
Create a refund payment on a policy. The refund is created as a pending, externally-collected payment for the negative of the supplied amount (i.e. money paid back to the policyholder). Optionally reference the original payment being refunded via refund_of_payment_id.
Supply invoice_id to tie this refund to an invoice. What the refund does depends on which way the invoice's money goes:
- An invoice the policyholder owes or paid is credited. It must belong to the same policy, be open or paid, and the
amountmust equal its full total; partial credits are not supported. A credit note is raised against the invoice once the refund is collected successfully, and the invoice moves torefunded. - An invoice the organization owes the policyholder (a negative total, for example a credit note raised over credits on the policy) is paid out. It must be open and belong to the same policy, and the
amountmust equal the full amount owed. The refund is linked to the invoice, which moves topaidwhen the refund succeeds. Like any refund, it cannot exceed the premiums received on the policy.
Either way, the request is rejected when another live refund payment, or a pending or processing policy-refund payout request, is already in flight for that invoice.