This is the program flow for loyalty program for my mobile app. The mobile app has voucher information already downloaded from the server. Now when user wants to redeem the voucher there is two approaches Approach 1 and Approach 2 as illustrated in the figure.
In approach 1 the request is sent with two parameters: voucher id and voucher points. The server reduces the user points according to the points supplied in the request and updates the user points in the backend. This approach has one disadvantage it has slightly more payload and may hamper bandwidth.
In approach 2 the request is sent with one parameters: voucher id . The server will get the points data from the voucher id through database. And then substract the user points according to it and updates user points in the database. Now this approach reduces the payload. But increases the processing overhead to the server.
I need to know which approach is best to implement.