# Refund Payments
A sale is a completed payment. A captured payment is an authorized and captured payment. You can refund both sales and captured payments.
There are two types of refunds you might need to process:
Full refund A full refund returns the total amount of the transaction to the customer — it can only be performed once.
Partial refund A partial refund returns a sum less than the captured amount. A payment can be refunded multiple times, but cannot exceed the original payment amount.
TIP
- Refunds can be made in via the Dashboard or by using this API endpoint . Once processed, it is not possible to cancel a refund.
- Any refunds for less than the original captured amount will be considered partial refunds.
Request example
- Shell
- JavaScript
curl -X POST \
https://api.ompay.com/v1/merchants/w3z8dfhkzvfq0j9n/payment/W94Q5D31NWIRD90XYUI8/refund \
-H 'authorization: Basic ODZidWQ0Y2JremlxOXZmYzoweHI1ZDkwOHo2bmo4a2h6' \
-H 'content-type: application/json' \
-d '{
"amount": "110.00",
"invoice_number":"123456",
"custom":{
"field1":"this is a test"
}
}
Response example
{
"id": "U1Y04VFRJ249D7XKJ6D8",
"reference_id": "W94Q5D31NWIRD90XYUI8",
"state": "refunded",
"result": {
"code": "0000",
"description": "Approved"
},
"transaction": {
"amount": {
"currency": "USD",
"total": "110.00"
},
"mode": "1",
"invoice_number": "123455"
},
"create_time": "2023-09-05T09:16:38Z"
}
# Request
# Header parameters
The request require a Basic
authentication in the header. For more information about HTTP request headers, see HTTP request headers.
# Request parameters
Parameter | Type | Description |
---|---|---|
merchant_id required | string | Encrypted Merchant account identifier for the Merchant |
reference_id required | string | Id of the initial transaction, usually this correspond to the authorisation ID. |