Create a 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 amount must 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 to refunded.
  • 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 amount must equal the full amount owed. The refund is linked to the invoice, which moves to paid when 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.

Path Params
string
required

Must be a UUID. The unique identifier of the policy.

Body Params
integer
required
≥ 0

The refund amount as a positive integer in cents. The created payment is recorded as the negative of this amount.

string
required

A description of the refund payment.

string

Optional. Must be a UUID. The id of the original payment that this refund relates to.

string

Optional. Must be a UUID. The id of the invoice this refund credits or, for an invoice owed to the policyholder, pays out. Rejected with a 400 if the invoice is on another policy, is in a status it cannot take a refund in, if amount is not its full amount, or if another refund or payout request is already in flight for it.

Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json