Created with Sketch.
Created with Sketch.

Refund

POST /CheckOut2Api/Commerce/Refund

The method allows merchant to refund money for undelivered goods.

Input Parameters

NameData TypeDefault ValueDescription
ExternalIdStringNone. Must be specified.An ID acquired when initializing a Check-Out session.
AmountDecimalNone. Must be specified.The item amount,must be Greater than 0.
OrderReferenceStringNone. Must be specified.An ID that identifies the order for which the purchase is to be made.
TranIdString (max. length 36 characters)An empty stringA 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.