Refund Payment

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

Point de terminaison

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/v3.1/site/{site_id}/Payment/refund
Demande
Champ
Type
Requis
Description
id
String
L'identifiant de paiement.
amount
Number
Le montant remboursé en cents (par exemple 1035 = 10,35 $).
reason
String
--
Raison facultative du remboursement.
Sample Request
			
				{
  "id": "64fa4489fb1eaa8e5ae93475",
  "amount": 1035
}
			
		
Réponse
Champ
Type
Description
success
Boolean
Si le remboursement a été traité avec succès.
errors
String [ ]
A list of errors. Will only be returned if `success` is `false`.
Sample Response (Successful)
			
				{
  "success": true
}
			
		
Sample Response (Failed)
			
				{
  "success": false,
  "errors": [
    "NO PAYMENT FOUND",
    "Invalid refund amount"
  ]
}