sprain / php-swiss-qr-bill

A PHP library to create Swiss QR bills | QR-Rechnung in PHP erstellen
MIT License
277 stars 81 forks source link

Twint #129

Closed vincenttarrit closed 2 years ago

vincenttarrit commented 3 years ago

Hello, how could I do to use this QR creator to make it works with TWINT ? Thank you !


Current state (as of March 20, 2023): Twint currently does not seem to add new merchants. To issue qr invoices with Twint support, you can go through RaiseNow, if you are willing to become their customer. See this comment.

Technical answer: It's possible to use the AlternativeScheme to make the QrCodes work with Twint. Something like this should work:

$qrBill->addAlternativeScheme(AlternativeScheme::create(
        'twint/light/<TWINT QrCode String>'
    ));

To get a Twint QRCode String you need to be registered as a TWINT merchant. See https://www.twint.ch/en/business-customers/our-solutions/bill-via-twint-qr-code/swiss-qr-code/?lang=en

omueller commented 3 years ago

@vincenttarrit for me if I scan a QR code generated by the php-swiss-qr-bill library with Twint, I get "This swiss QR code is not yet compatible with Twint". Will this ever be the case ? I would guess no, as Twint will want to get 0.xxx% of the transaction.

Maybe you will have more luck via https://www.twint.ch/en/business-customers/products/qr-code-sticker/ ? (you then need to register as a merchant, etc.).

PS: ok, it should be possible according to https://www.twint.ch/en/press/new-qr-bills-can-also-be-paid-using-twint/?lang=en, but you need to have a contract with Twint first.

sprain commented 3 years ago

In order for the QR bill to be payayble with Twint, the corresponding AlternativeScheme must be integrated in the QR bill (which can be done with this library).

I have never actively tried to integrate Twint within one of my qr bills and do not know whether it really is possible already. But there is some more information available here:

Jul000 commented 2 years ago

Hello, does someone successfully make the qr works with TWINT ? Thanks

raisenow commented 2 years ago

It's possible with RaiseNow. Disclaimer, I am the CTO of RaiseNow. Check: https://www.raisenow.com/de-ch/produkte/twint and https://support.raisenow.com/hc/en-us/articles/360019765778-How-to-use-the-QR-Bill-TWINT-Extension

sprain commented 2 years ago

@raisenow Is your functionality somehow implementable with this library? If yes, how?

raisenow commented 2 years ago

My apologies, I didn't want to spam this with advertising but was trying to help. We do use this library. (And this approach works without being a RaiseNow customer. All you need is the TwintQr code).

As you described above, it's possible to use the AlternativeScheme to make the QrCodes work with twint. Something like this should work:

$qrBill->addAlternativeScheme(AlternativeScheme::create(
        'twint/light/<TWINT QrCode String>'
    ));

To get a TwintQR Code you need to be registered as a TWINT merchant. AFAIK this does not work for "Person to Person" payments.

sdespont commented 2 years ago

@raisenow the alternative scheme would only displays the Twint QR-Code string. I don't really understand how it would help the customer to pay with his Twint app because it is not scannable.

raisenow commented 2 years ago

@sdespont no it will also change the QR-Code itself and then it is scannable with the Twint app.

sdespont commented 2 years ago

@raisenow OK, but then when using this new QR-Code, it is only payable with Twint? Or it would also be usable by banking apps?

raisenow commented 2 years ago

@sdespont both, twint and banking app

sdespont commented 2 years ago

@raisenow Oh, the alternative scheme is part of the QR-Code. Sorry, I missed that point...

sprain commented 2 years ago

We do use this library.

👍😄

As you described above, it's possible to use the AlternativeScheme to make the QrCodes work with twint. To get a TwintQR Code you need to be registered as a TWINT merchant. AFAIK this does not work for "Person to Person" payments.

Thanks! This should be helpful for anybody wanting to integrate this functionality.

sprain commented 2 years ago

Twint handling is officially explained here: https://www.twint.ch/en/business-customers/our-solutions/bill-via-twint-qr-code/swiss-qr-code/?lang=en

h9k commented 1 year ago

Sorry to bother on a closed issue, but it is totally unclear to me what the "Twint QRcode string" is and where to get it from exactly. I have an account at https://portal.twint.ch/ but I cannot find information anywhere. I only can generate so called QR code stickers with a fixed amount or free amount, but that does not appear to be very helpful. Has anyone actually been successful at integrating Twint and wants to share what needs to be done Twint-side? Thank you!

sprain commented 1 year ago

The QR code stickers from Twint are something different than the QR bill.

To create a QR bill which is payable by Twint you need a specific string to be added as an AlternativeScheme to the QR bill (see original post of this issue). You need to contact Twint to get this string.

baerenklau commented 1 year ago

Thank you very much for php-swiss-qr-bill, saved me a lot of time and trouble. I stumbled over the Twint discussion and wanted to add the Twint possibility for the QR bill as well. I asked the Twint support a couple of times to for my QR-code-string. Either way it seems to be a very uncommon question or they are not happy to share the string or they do not share it at all. The last reaction was that they asked me to contact RaiseNow about the missing string/parameter. Can anyone verify that this would be an appropriate way or do I have to ask another question?

sprain commented 1 year ago

If you are a billing party with medium-sized volumes (fewer than 10,000 bills per month) and would like to offer the TWINT QR code bill, please contact your billing party software provider directly. (Source)

Looks like Twint only wants to deal with merchants with more than 10'000 bills per month.

The last reaction was that they asked me to contact RaiseNow about the missing string/parameter. Can anyone verify that this would be an appropriate way or do I have to ask another question?

You might have to ask RaiseNow about this. I suspect you are somehow connected to them, as a user or client?

ucola commented 1 year ago

hi @sprain same here, we became today an answer (after 2 month) that we need to contact RaisNow! Strange...

sprain commented 1 year ago

@raisenow Any ideas why Twint points people to you?

raisenow commented 1 year ago

Hey all, I'm happy to shed some light on the topic of Swiss QR codes enriched with TWINT technology.

TWINT itself does not have a ready-to-go product for enriching Swiss QR codes. Instead, they offer the base for technology providers/partners with a certified TWINT direct integration to come up with a solution. RaiseNow was the first provider in the market. And is still the only one as of today. There are certainly more providers to come.

The specific RaiseNow technology is very easy to get and set up. An organization/company go and set up a RaiseNow account on https://hub.raisenow.com/#/sign-up . After being approved by the KYC process of RaiseNow (which usually takes 1 to 2 business days) you can start enriching Swiss QR codes with TWINT-specific strings. The step-by-step guide is available here: EN: https://support.raisenow.com/hc/en-us/articles/4405492590993-How-to-use-the-QR-payment-slip-TWINT-extension

DE: https://support.raisenow.com/hc/de/articles/4405492590993-So-erweiterst-Du-den-QR-Einzahlungsschein-mit-TWINT FR: https://support.raisenow.com/hc/fr/articles/4405492590993-Bulletin-de-versement-QR-avec-TWINT

Depending on your price plan with RaiseNow the cost for this solution varies. For the simplest package, RaiseNow Free, you pay no setup fee, no monthly fix fee, just a payment transaction fee of 2.5% in case of successful payments. The funds are paid out to the organization on a weekly base, 2.5% is automatically deducted from the payout amount. For larger organization or organization with high invoice amounts, please contact us.

If you want to test the solution you can go to https://qr-rechnung.net/#/ , they offer a TWINT enrichment process based on our solution.

Hope it helps.

Marco Zaugg CEO of RaiseNow

On Fri, 17 Mar 2023 at 15:59, 'Manuel Reinhard' via Developers < @.***> wrote:

@raisenow https://github.com/raisenow Any ideas why Twint points people to you?

— Reply to this email directly, view it on GitHub https://github.com/sprain/php-swiss-qr-bill/issues/129#issuecomment-1473973343, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWEFTMZPA75DF5VU7UYIB3W4R34LANCNFSM45436U6A . You are receiving this because you were mentioned.Message ID: @.***>

sprain commented 1 year ago

Thanks for the clarification, @raisenow! So in a nutshell, Twint does not want to add each merchant individually, but points to third-parties like RaiseNow.

baerenklau commented 1 year ago

I don´t get the whole logic about it but probably there is some. I can create a QR-code that lets someone make a payment to my Twint-account if I use the app. This QR-code can be generated within the Twint account. Probably things like subject and amount could be added - maybe not. Does someone know whats the difference between a direct payment with Twint using the QR-code of the recipient and a QR-invoice link. What is the additional service of the payment service provider in this special case?

sprain commented 1 year ago

@baerenklau

Does someone know whats the difference between a direct payment with Twint using the QR-code of the recipient and a QR-invoice link.

The Twint QR code is to be used with Twint only. The QR invoice is mainly made to be used for bank transfers via your bank account.

However, there is a feature which allows the QR invoice to be paid through other means, if they support it AND the option is actively integrated into the QR invoice. Twint added this support and communicated it, but now does not really want to handle the work ;)

In my opinion, there are very few use cases where adding the Twint feature to the QR invoice makes sense. It can be neglected for normal business cases.

baerenklau commented 1 year ago

Thanks a lot for your comment. So if I use Twint with e.g. Postfinance the QR-Code link with Twint would be more a link to the PSP Postfinance with potentially more payment options than Twint? The case I thought would be nice is either a link to the Twint App with amount and subject or a QR code with the same information that allows a quick payment of an invoice (either PDF therefor the link or Paper with QR code). I think Twint is great for prepayment but would be also comfortable for invoice payment.

sprain commented 1 year ago

So if I use Twint with e.g. Postfinance the QR-Code link with Twint would be more a link to the PSP Postfinance with potentially more payment options than Twint?

No. The qr invoice contains no link. If the invoice supports Twint, the user still needs to decide in advance whether they want to use the app of their bank or the Twint app to scan and pay the qr invoice.

baerenklau commented 1 year ago

So probably a payment link that leads to the PSP payment site with a redirection to a "thank you" page would be more customer friendly at all. That is as far as I understand more or less the job that RaiseNow does. Or alternatively the QR-code for the twint app which could be generated in the Twint user interface. The only downside of this QR code is the missing amount and subject.

raisenow commented 1 year ago

Enriching a QR Bill format based on the Swiss QR Code standard with the alternative payment option TWINT makes a lot of sense in a B2C context. TWINT is the strongest digital payment option in Switzerland by now. More than 5m users are registered. BUT, TWINT is a dedicated consumer app only. Therefore, adding TWINT as an alternative payment to an invoice which is sent to a corporate recipient (B2B) doesn't make sense.

After scanning an enriched Swiss QR code with the TWINT app, you get redirected to a payment page which shows the exact payment amount, recipient data etc. As an invoice sender aka merchant you can brand this payment page. The feature is what @baerenklau is asking for. Technically, all information that is encoded in the Swiss QR code is read by the TWINT app and stored in your RaiseNow transaction. Especially, and most importantly, the unique QR reference numbers which you need to automatically reconcile the payment against your accounting subledger.

Adding a native TWINT QR next to a Swiss QR code is not recommended. People get confused with two special QR codes formats that are both not readable with your normal QR codes scanner or mobile device camera app. In addition, the risk of accidentally scanning the wrong qr code with the wrong app is high, leading to bad customer experience. That's why SIX invented the "alternative payment" enrichment possibility in their Swiss QR code standard.

On Sun, 19 Mar 2023 at 19:37, 'baerenklau' via Developers @.***> wrote:

So probably a payment link that leads to the PSP payment site with a redirection to a "thank you" page would be more customer friendly at all. That is as far as I understand more or less the job that RaiseNow does. Or alternatively the QR-code for the twint app which could be generated in the Twint user interface. The only downside of this QR code is the missing amount and subject.

— Reply to this email directly, view it on GitHub https://github.com/sprain/php-swiss-qr-bill/issues/129#issuecomment-1475356362, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWEFTJC2EQH2AXCYT723A3W45G5BANCNFSM45436U6A . You are receiving this because you were mentioned.Message ID: @.***>

sprain commented 1 year ago

Thanks for all your ideas, opinions and comments.

For further discussion, let's focus again on what's relevant for the technical aspects within this PHP library, as this is the purpose if this issue. The current state of things is summarized in the original post above.