polyright payment - URI Scheme Integration

The polyright PaymentTerminal application allows payments on any polyright system through the polyright platform. The application is available for desktop, tablet and smartphone.

Getting Started

Prerequisites

Installation

  1. Install application from App Store
  2. Launch application
  3. Activate Payment Terminal
  4. Ready!

Integration

URI Scheme is supported by Payment Terminal to allow simplified integration of polyright payment from other applications and websites. For full integration and best user experience, use the REST API and CardReader SDK provided by polyright.

Supported URI Schemes

URI Scheme Description
pay://transaction Start a new transaction
pay://transaction/validate Validate the current transaction
pay://transaction/cancel Cancel the current transaction
Parameters
Parameters Description
amount Amount with point as decimal separator
purpose Transaction description for the end user
externalId Your transaction ID. This must be unique
paymentMode Enabled payment modes. Remains empty to enable all supported payment modes.
Supported modes:
  • Epurse: polyright electronic wallet
  • Twint: Swiss mobile payment mode
validationCallback URI Scheme called to validate transaction when person was found. This allows you to apply a discount before processing the transaction by Payment Terminal.
The properties of the person are added as Query String of the URI Scheme
successCallback URI Scheme called when the transaction was successfully processed
cancelCallback URI Scheme called when the transaction was cancelled
errorCallback URI Scheme called when an error occurred while processing the transaction

Sequence diagrams





Callbacks

Callbacks are used by the payment terminal to send the result back of operations to calling application. It can be done through URI Scheme of an application or a URL of a web page. Results are passed as Query String in the URI.

Allowing callbacks in an application

Examples

Samples

HTML

This simple web page shows how to start a transaction and receive the result from the callback URL

FAQ

Why the application does not launch from Google Chrome?

This is a bug in Google Chrome, try:

  1. Close Google Chrome application and system tray
  2. Open %LOCALAPPDATA%\Google\Chrome\User Data\Profile 1\Preferences file
  3. Search excluded_schemes section
  4. Add "pay":false
  5. Save and launch sample
  6. Done!