Returns
The returns are handled as a new operation with a couple of particularities, being the quantity and amount in negative and the reference of the sale line to be returned. Besides that both the API calls and user flow remains the same.
Regarding order identification, we recommend using always the QR provided by Wapping and optimally printed in the receipt (this has to be done using the field qrCode returned in the Commit response). The order can have another user identified or none at all. This doesn't change the fact that the benefits used/earned by the original customer will be rolled back, just the customer associated with the return operation.
For returns there is two ways to indicate the product line detail of the purchase. These forms would be as follows:
- Identification of the line code of the order line of the sale through a 'UUID' format. For this, when we make the sale, the 'LineCode' field of the order line should have the mentioned format. And when we perform the return, we will input it into the 'LineCodeSale' field.
- Identification of the order line of the sale through the combination of the fields 'LineCode', 'ShopCode', 'PosCode', and the 'OrderCode' of the sale.
Once the type of identification of the sales order lines is chosen, we must indicate the quantity of the products and the amount of the return order line as negative, as we can see in the following example.
As a result of this call, Wapping will inform us of the amount to be refunded to the customer after deducting the corresponding portion of the benefits they may have obtained during the sale.
The response of this will be processed exactly the same as any other Total Respose, bear in mind that some of the amounts can be in negative as it will be doing a refund of previously used cash
Be aware that the response has to be processed entirely, as Wapping could inform that the return amount of some line has to be less that what the customer paid, in case the benefits earned from the purchase are already used, and there is no other way to substract them.
