Glase preliminary payments
Glase Preliminary Payment allows you to reserve some amount on customer’s account for future payment when exact amount is unknown at the beginning of payment flow.
- Implement the required methods.
- Install test mobile app.
- Test your implementation against preliminary payment flow.
- Introduce your implementation to your system.
- Verify your integration.
- Go live!
Implement the required methods
The methods required in a basic integration are:
|registerTerminal||Registers a new terminal in Glase server (required in POS systems)|
|unregisterTerminal||Unregisters an already registered terminal (required in POS systems)|
|assignSeqrId||Assigns a Glase ID to a terminal (required in POS systems)|
|sendInvoice||Sends an invoice to Glase server|
|getPaymentStatus||Obtains status of a previously submitted invoice|
|updateInvoice||Updates an already sent invoice with new set of invoice rows or attributes|
|commitReservation||commits reservation with final amount to be taken from customer’s account|
|cancelInvoice||Cancels an unpaid invoice (required in POS systems)|
For an extended integration, also these methods can be used:
|refundPayment||Refunds a previous payment, partly or the whole sum|
|markTransactionPeriod||Marks the end of one and the beginning of a new transaction period; used in reporting|
|executeReport||Executes a report on Glase server|
Main difference is to additionally implement commitReservation method.
Other differences are:
- in sendInvoice request paymentMode is RESERVATION_REQUIRED_PRELIMINARY_AMOUNT and you have to set commitReservationTimeout;
- when reservation is confirmed payment goes to RESERVED status;
- Merchant send sendInvoice request to Glase backend.
- If OK starts polling with getPaymentStatus requests. Payment status is ISSUED at this moment.
- User scan QR code and confirm payment (or just confirm if Glase app was open from merchant’s app).
- Merchant gets RESERVED in response to getPaymentStatus and stops polling.
- After service/shopping is complete merchant update informations about order with updateInvoice request.
- Merchant end payment flow with commitReservation request with final transaction amount.