POST /CheckOut2Api/Commerce/Refund
The method allows merchant to refund money for undelivered goods.
Input Parameters
Name | Data Type | Default Value | Description |
---|---|---|---|
ExternalId | String | None. Must be specified. | An ID acquired when initializing a Check-Out session. |
Amount | Decimal | None. Must be specified. | The item amount,must be Greater than 0. |
OrderReference | String | None. Must be specified. | An ID that identifies the order for which the purchase is to be made. |
TranId | String (max. length 36 characters) | An empty string | A random unique ID generated by the calling party that identifies the HTTP request. Although the property isn’t strictly required , we recommend to generate a new random GUID and pass it. Technically, it can be any string. |
Example request
{
"ExternalId": "19ac0d1ee909c302d212b4324d9194b5",
"Amount": 10.0,
"TranId": "123456",
"OrderReference": "ue12345"
}
Return Value
If successful, the method returns a HTTP status code 200 (OK) with no additional content.
Not successful this method will return HTTP status code 400 and error description in body.
[
{
"ErrorCode": "16100",
"ErrorMessage": "Refund denied - insufficient Customer Balance"
}
]
Error Messages
Refund denied – insufficient Customer Balance Duplicity order error Purchase is not in completed state Refund error – Finnish bank cannot refund money back to customer account directly Invalid or missing external ID.