Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesA refund allows a merchant to send money back to the customer for a previous payment. There are restrictions to refunds:
sale or captureterminal. When not provided, other fields are required.This requires the reference of the original payment and optionally an amount if only a partial amount is to be refunded.
Example request
curl --basic --user apikey: -H "Content-Type: application/json" --data '{
"reference": "I240226130441921CB87E195.Y",
"description": "Refund of Order 123456"
}' https://api.psp.ccv.eu/api/v1/refund
Example response
{
"originalReference": "I240226130441921CB87E195.Y",
"lastUpdate": 1708952963599,
"created": 1708952963599,
"merchantOrderReference": "123456",
"details": {},
"amount": 9.99,
"reference": "I240226130923535CB87E19A.Y",
"description": "Refund of Order 123456",
"status": "success",
"method": "ideal",
"type": "refund",
"language": "eng",
"currency": "eur"
}
Refunds that require additional costs and result in a higher refund amount than the original amount are allowed. By default, a refund limit of 120% of the original amount is allowed.
In case the refund amount is too high, you receive an error message
{
"type": "process_error",
"message": "Refund request limit check: Original Amount: 9.99, Amount Already Refunded: 0.00, Current Refund Request: 11.99, Maximum Refundable Amount: 11.98",
"reference": "2d951ad9",
"failureCode": "refund_limit"
}
All the funds of all collecting payment methods define the merchant balance. It’s the sum of all incoming funds subtracted with all outgoing funds.
In case the refund amount is too high for the current balance, you receive an error message
{
"type": "process_error",
"message": "Refund request with amount 9.99 DENIED for originalReferenceId I240226130441921CB87E195.Y due to insufficient open amount",
"reference": "5c0a0487",
"failureCode": "unsufficient_balance",
"balance": {
"creditAmount": 0.35,
"debitAmount": 1.70,
"total": 1.35
}
}
The typo in unsufficient_balance is real
A merchant must process more sales or contact the support helpdesk in such a scenario.
When refunding terminal payments, the original payment link is not required.
However, you must provide the amount, currency, language, details and method fields in the refund request.
Note
Refunds for method terminal without a link to an original payment is not available yet.
example request for terminal refund
curl --basic --user apikey: -H "Content-Type: application/json" --data '{
"method": "TERMINAL",
"currency": "EUR",
"amount": 100.43,
"language": "ENG",
"merchantOrderReference" : "123456",
"details": {
"terminalId": "1234567",
"managementSystemId": "1234567",
"accessProtocol": "OPI_NL",
"ip": "192.168.1.154",
"port": "6235",
"operatingEnvironment": "ATTENDED",
"merchantLanguage": "ita"
},
"returnUrl" : "https://yourshop.com"
}' https://api.psp.ccv.eu/api/v1/refund