Static QR Code
Payrexx enables you to create Static QR Codes with TWINT payment provider for your own webshop.
Last updated
Payrexx enables you to create Static QR Codes with TWINT payment provider for your own webshop.
Last updated
You can create a Static QR Code with our Merchant API. For simplicity, we will explain it with the example of the QR Code creation.
Create a QR Code with the mandatory parameters:
The webshopUrl is a mandatory field.
Your QR Code can be scanned using any QR Code scanner.
After Step 1, you will get a QR Code string in the response of your request. Use this string as src attribute in HTML image tag. Now your QR Code can be displayed as image.
If the buyer scans the QR Code using TWINT app, they will be redirected to your webshop URL with the following parameters.
qr_code_session_id
returnAppScheme (iOS)
returnAppPackage (Android)
Scanned using a TWINT app
iOS: https://{{webshopUrl}}?qr_code_session_id={{session}}&returnAppScheme={{appName}}
Android: https://{{webshopUrl}}?qr_code_session_id={{session}}&returnAppPackage={{appName}}
Scanned using a regular QR code scanner app
https://{{webshopUrl}}
In Gateway creation you need to pass the QR Code session ID and the "return app" parameter:
In the Gateway response you will get the TWINT app link:
Once you received the appLink in the response, you need to open it. So the TWINT app will be automatically opened for the buyer.
Other as in the TWINT app case you have to create the Gateway with the following redirect URLs.
Once the buyer has selected their products on your webshop and is ready to pay, you have to with the corresponding amount and currency (optional: basket).
Parallel to this you have to start a transaction polling using the transactionId in the response and the endpoint. You can perform the GET request every second until the transaction status changes from initiated
to confirmed
or cancelled
. Once the status has changed, you can show the corresponding result page on your webshop.
If the customer scans the QR Code other than TWINT app, they will also be redirected to your webshop url. But without special parameters. When the buyer is ready to pay in your webshop, you have to .
You will receive a link in the Gateway response as mentioned . You just need to open the link. The buyer will be redirected to Payrexx Gateway page. There the buyer can choose their preferred payment method and do the payment. Once the payment is done, they will be redirected to the URL which is set in the Gateway creation.
You can delete the QR Code using endpoint.
When cancelling the order process in your webshop you also have to destroy the session to prevent possible payments after cancellation. You can delete the QR Code Scan using endpoint by setting the session ID (see Step 3: Scan the QR Code).