Use of loyalty

If a merchant have a loyalty agreement with MobilePay, this can be utilized through the POS API to recalculate payments/reservations based on the loyalty. To do this, payments/reservations must be initialised with loyalty-flow. Payment can be started with loaylty-flow before the user checks in, or after the user checks in. It can also be used in the reserve/capture-flow.

User checks-in before paymentStart

When payment is initiated after user has checked in, payment must be started as loyalty-flow (set customerTokenCalc to 0), so that payment can be recalculated after CustomerToken is received through the response. Updating the payment is done with a new PaymentStart where action is set to Update. After this, user can accept the payment.

  • User checks-in
  • Make PaymentStart:
    • Action: Start
    • CustomerTokenCalc: 0
  • Response:

    {
    "ReCalc":0,
    "CustomerToken": value,
    "CustomerReceiptToken":null
    }

  • Update payment with new PaymentStart:
    • Action: Update
    • Amount: insert updated amount
    • CustomerTokenCalc: 1

PaymentStart before user checks-in

Payment must be started as loyalty-flow (set CustomerTokenCalc to 0) to be able to recalculate after CustomerToken is received. Wait for user to check in and payment to change to status 60. After this, payment can be recalculated and user can accept the payment. 

  • Make PaymentStart:
    • Action: Start
    • CustomerTokenCalc: 0
  • User checks-in
  • Make GetPaymentStatus
    • "PaymentStatus": 60 (AwaitTokenRecalc)
    • "CustomerToken": value of token
  • Make new PaymentStart to recalculate payment
    • Action: update
    • Amount: insert updated amount
    • CustomerTokenCalc: 1

Reserve/capture-flow

With reserve/capture flow, CustomerToken is received through ReservationStart or GetReservationStatus. After user have swiped to accept reservation, amount according to loyalty can be captured.