Order Management
Handle returns

Handle returns

The method allows to submit a return or to make a price adjustment of goods purchased by a customer. The call is performed when the returned goods are received by the reseller or if some amount needs to be credited. All items submitted in the return call will be printed as negative invoice rows at the invoice.

API endpoint

POST /authorization/{id}/Return

Input Parameters

NameData TypeDefault ValueDescription
IDStringNone. Must be specified.AuthorizationID acquired from direct-invoice, invoice, loan or part-payment.
itemsClass List of ItemsNone. At least one item must be specified.A list of items representing the individual rows on an invoice. Individual items may have a negative value but the total sum of all items must be positive.
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 is generated by the calling party to identify the HTTP request. Although the property isn’t strictly required, we recommend generating a new random GUID and passing it. Technically, it can be any string.
trackingCodeStringAn empty stringGenerated code by the delivery company.
posIdStringPOS ID is the device number. It is visible on every printout from the POS terminal in the left top corner of the receipt below your contact details or on a sticker on the POS terminal.
productCodeStringAn empty stringPartners product group code product category.

Example request

{
  "items": [
    {
      "description": "string",
      "notes": "string",
      "amount": 0,
      "taxCode": "string",
      "taxAmount": 0,
      "productGroup": "string",
      "quantity": 0
    }
  ],
  "orderReference": "ue12345",
  "tranId": "123456",
  "trackingCode": "123456",
  "posId": "Id123456"
}

Return Value

If successful, the method returns an HTTP status code 200 (OK) with no additional content.

If not successful, the method will return HTTP status code 422 and error description in body.

[
  {
    "ErrorCode": "13101",
    "ErrorMessage": "Purchase denied - insufficient Customer Balance"
  }
]

Error Messages

Item amount must be positive Item description must be specified and must not be longer than 35 characters or empty. Return denied – insufficient Purchase Balance Duplicity order error Purchase is not in a completed state Return error – Finnish bank cannot refund money back to the customer account directly The Sum of items has to be a positive amount. Invalid or missing external ID.