Refund Payment

Use this to give money back on a payment that has already settled.

The following endpoint can be used to refund a Payment within the Hyfin application.


Endpoint

The following endpoint can be used to refund a Payment. You must replace the {base_url} and {site_id} variables with the appropriate values.

POST
{base_url}/api/v4/site/{site_id}/payment/refund
Request
Field
Type
Description
id
String
The payment id. The payment must be paid and processed by us. A payment recorded from another system is rejected with Cannot refund external payment. A payment takes one refund or void in total, so a second request is rejected.
amount
Number
The amount to refund, in whole cents (e.g. 1035 = $10.35). Send less than the payment amount for a partial refund. A decimal or an amount above the payment amount is rejected. This endpoint always sends a refund, never a void. Use the void endpoint to cancel a payment that has not settled. On sites set to wait for ACH settlement, an unsettled ACH payment moves to refundRequested and is refunded once it settles.
reason
String
Optional reason for the refund.
Sample Request
			
{
  "id": "64fa4489fb1eaa8e5ae93475",
  "amount": 1035
}


		
Response
Field
Type
Description
success
Boolean
Whether the refund processed successfully.
errors
String [ ]
A list of errors. Will only be returned if success is false.
			
{
  "success": true
}


		

Related