Record a completed external manual-payment refund without moving money

Requires payments:write, and payment records switched on for the environment (else 503). The key's account must be a sole practitioner or a team administrator. Records a refund you have already made against a payment recorded with POST /invoices/payment-records. Rehab Guru refunds nothing, raises no credit note and sends nothing to an accounting system. The amount must fit what is left of the payment (else 409 balance_conflict). A refund puts its amount back on the invoice as owed. Once every payment record on the invoice has been refunded in full, nothing is left on it and it can be voided, provided the other conditions of POST /invoices/{invoiceId}/void are met (among them no Healthcode connection and no Effra integration at the practice). Until then it cannot be voided, and there is no credit note through the API: after a part refund the practice closes the invoice in the web app with a credit note for what it still owes. From then on the invoice takes no further payment, refund or void record (422). An unknown payment answers 404; retry after recording the payment. refundDate is an RFC 3339 date-time of a real calendar date, no more than 24 hours in the future. Repeating a request with the same Idempotency-Key and body answers 200 with replayed true. 422 unsupported_configuration is answered when the practice has a live Xero connection or webhooks on invoices, payments, payment sources or payment lines, the invoice has a credit note or is linked to a payment provider, or the key's account holds a membership of a team role that no longer exists.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params
string
required
^\d+(\.\d{1,2})?$
string
required

Supported two-decimal ISO currency only.

date-time
required

RFC 3339 date-time of a real calendar date (31 February is refused), no more than 24 hours in the future.

string
required
length ≤ 200
string
length ≤ 500
Headers
string
required
length ≤ 100
Responses

400

Invalid fields, identifiers or monetary amount.

403

Current financial write authority or role refused.

404

Current payment or linked reference not accessible.

409

The amount is more than is left of the payment (balance_conflict), or the Idempotency-Key or externalReference was used with another request.

422

The practice or the invoice cannot take refund records (unsupported_configuration): see the description.

503

Payment records are not switched on for the environment, or the invoice is being written by another request: retry.

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