About TWINT

General information about TWINT

TWINT is the leading and one of the most popular payment app in Switzerland. Ninety-seven percent of the Swiss population are aware of TWINT and half of the Swiss population uses it on a regular basis. Ninety percent of all bank account holders in Switzerland are able to connect their accounts directly to the TWINT app.

Please note: In order for a merchant to receive a TWINT account, he must be able to show that his company is based in Switzerland.


Logo

Info

Pay easily and absolutely secure with the TWINT E-Wallet solution using the leading payment app in Switzerland.

All you need to do is to scan a QR code and verify your identify using your smartphone.

Type

Payments by eWallet


Further information you will find also on the TWINT webpage (https://www.twint.ch/).


How it works

When a user decides to pay with TWINT and taps corresponding payment button, either QR is presented for user to scan (Web payment) or TWINT app opens automatically to confirm payment (in-app payment or browsing on smartphone).

Please follow next link for overview how to pay online with TWINT:

https://www.twint.ch/en/private-customers/functions/onlineshop/?lang=en

Before you start

Once you have decided to support TWINT, there's a set of steps have to be completed:

  1. Register your company within TWINT here: https://portal.twint.ch.

    1. (info) If you'd like to have a test merchant and perform TWINT transaction in test mode, you can also register you company and create a shop on TWINT's integration environment https://portal-int.twint.ch the same way as described below.

  2. Create your Online shop from the home page of TWINT portal:

  3. On the second step of the shop registration in the "Integration" section choose PSP (payment service provider) option and select  from the list of providers: 

  4. After store has been created, provide store's UUID to and ask to activate payment method TWINT:


Process flow chart



Use Cases

Supported use cases

Supported interfaces

Use case

Description

Simple process

S-2-S

Form-based

Batch

Analytics
PayByLink

HPPCTSF

Authorization + Capture

Merchant wants to authorize payment and capture on delivery

  • Merchant has to complete capture within 7 days after authorization

(tick)

(tick)

Sale

Merchant wants to collect money from customer

  • Merchant's shop initiates payment request

  • Customer gets redirected to get QR code displayed
  • Customer scans QR-Code and confirms payment

  • Merchant's shop gets a notification about successful payment


(tick)

(tick)

full or partial Credit

Merchant wants to credit some money back to customer after a payment has been successfully completed

  • Merchant initiates credit request

  • collects details from referred payment and initiates credit

  • Merchant's shop gets a notification about successful credit

(tick)


(tick)




full or partial Reversal

Merchant wants to cancel a payment which has not been completed

  • only supported for payment processes that have not been completed

  • for completed payment processes use Credit instead

(tick)




CTSFCTSF for reconcilliation
  • download settlement file from service provider
  • create CTSF for merchant





coming soon

On this page


interface


Payment with TWINT over  form interface

To make a TWINT payment over  form, please use the following URL:

twint.aspx

 

Key

Format

CND

Description

Beschreibung

RefNr

ans..40

O

Merchant’s unique reference number. Only characters a-zA-Z0-9,-_ are allowed.

Eindeutige Referenznummer des Händlers. Nur die Zeichen a-zA-Z0-9,-_ sind erlaubt.

Key

Format

CND

Description

Beschreibung

Currency

a3

M

Currency, three digits DIN / ISO 4217, e.g. EUR, USD, GBP. Only CHF allowed. Please find an overview here: A1 Currency table EN

Währung, drei Zeichen DIN / ISO 4217, z.B. EUR, USD, GBP. Nur CHF zulässig. Hier eine Übersicht: A1 Währungstabelle

Key

Format

CND

Description

Beschreibung

OrderDesc

ans..768

M

Description of delivered products, services etc.

Beschreibung der gelieferten Produkte, Dienstleistungen usw.

Parameters for TWINT


(info)  Please note that the final notification may be delayed by approx. 30-35 minutes or up to 60-65 minutes if the customer completes the payment and closes the browser immediately afterwards. The reason for this is that the payment status can only be read in via the browser callback and if this is not done, the status is requested downstream by our at the above-mentioned interval. Due to the missing callback, the redirect to the URLSuccess/URLFailure is also not processable.

Key

Format

CND

Description

Beschreibung

RefNr

ans..40

O

Merchant’s unique reference number. Only characters a-zA-Z0-9,-_ are allowed.

Eindeutige Referenznummer des Händlers. Nur die Zeichen a-zA-Z0-9,-_ sind erlaubt.

Statusa..50M

OK or AUTHORIZE_REQUEST (URLSuccess) as well as FAILED (URLFailure)

If has activated Sale-transactions, "PAYMENT_IMMEDIATE" is triggered and the Status ist mostly OK or FAILED and only in some special cases AUTHORIZE_REQUEST. checks all AUTHORIZE_REQUEST payments from Twint, requests the status again and if the status does not change, a Cancel is executed. This typically is completed within 30 minutes after initial transaction.

If has not activated Sale-transactions, "PAYMENT_DEFERRED" is triggered and the Status ist always AUTHORIZE_REQUEST, because Twint waits für the merchant Confirmation (capture.aspx). Payments shall be captured within 7 days. Only then does the higher-level payment status changes to OK or FAILED.

OK oder AUTHORIZE_REQUEST (URLSuccess) sowie FAILED (URLFailure)

Wenn Sale-Transaktionen aktiviert hat, wird "PAYMENT_IMMEDIATE" ausgelöst und der Status ist meistens OK oder FAILED und nur in einigen Sonderfällen AUTHORIZE_REQUEST. prüft alle Zahlungen mit AUTHORIZE_REQUEST von Twint, fordert den Status erneut an und wenn sich der Status nicht ändert, wird eine Stornierung ausgeführt. Dieser Vorgang ist typischerweise innerhalb von 30 Minuten nach initialer Transaktion beendet.

Wenn Sale-Transaktionen nicht aktiviert hat, wird "PAYMENT_DEFERRED" ausgelöst und der Status ist immer AUTHORIZE_REQUEST, da Twint auf die Händlerbestätigung (capture.aspx) wartet. Die Bestätigung (capture) sollte innerhalb von 7 Tagen erfolgen. Erst dann ändert sich der übergeordnete Zahlungsstatus auf OK oder FAILED.

Key

Format

CND

Description

Beschreibung

TransactionID

an..20

O

Unique transaction number with TWINT (OrderUuid)

Eindeutige Transaktionsnummer bei TWINT (OrderUuid)

Return parameters for URLSuccess, URLFailure and URLNotify with TWINT

 


Capture

If your  MID isn't configured for Sale operation, every initial TWINT payment (call to twint.aspx) should be confirmed using capture.aspx endpoint or canceled via reverse.aspx.

Captures (or confirmations in terms of TWINT) are possible via a Server-to-Server connection. To carry out a Capture via a Server-to-Server connection, please use the following URL:

capture.aspx

 

Key

Format

CND

Description

Beschreibung

CompleteType

ans..3

O

Specifies whether only a partial amount is being confirmed and authorization should be kept open. If <YES> is transferred, the possible open order is closed on capture.

Gibt an, ob nur ein Teilbetrag bestätigt wird und die Autorisierung offengehalten werden soll. Wenn <YES> übermittelt wird, wird die möglicherweise offene Bestellung bei der Buchung geschlossen.

Parameters for captures with TWINT via socket connection


Response parameters for captures with TWINT via socket connection


Reversal

Reversals are possible via a Server-to-Server connection. In order to cancel a payment via a server-to-server communication, please use the following URL:

reverse.aspx

 

Parameters for reversals with TWINT via socket connection


Response parameters for reversals with TWINT via socket connection


Credit with reference

credit.aspx

 

Notice: Please note that TWINT limits refunds in the production environment as well as on the test system production mode: 180 days / test mode: 7 days.

Key

Format

CND

Description

Beschreibung

RefNr

ans..40

O

Merchant’s unique reference number. Only characters a-zA-Z0-9,-_ are allowed.

Eindeutige Referenznummer des Händlers. Nur die Zeichen a-zA-Z0-9,-_ sind erlaubt.

Parameters for credit payments with TWINT via socket connection

 

Key

Format

CND

Description

Beschreibung

RefNr

ans..40

O

Merchant’s unique reference number. Only characters a-zA-Z0-9,-_ are allowed.

Eindeutige Referenznummer des Händlers. Nur die Zeichen a-zA-Z0-9,-_ sind erlaubt.

Response parameters for credit payments with TWINT via socket connection

 


Batch processing via the interface

This section describes the parameters which must be transferred within the data set (Record) for executing a Twint payment and information can be found within the response file about the payment status.

For Batch calls there must be considered batch versions, from which optional parameters depend. All version designations starting with „2.“ pertain calls for a group of enterprises. That means within a batch file for a particular MerchantID can be transferred transactions for other merchants with a separate Sub-MID

Following table gives an overview of all batch versions that are possible for a specific action an their specialities:

Action

Version

Description

Beschreibung

Credit

1.0 / 2.0

Standard version without return of parameter Code

Standardversion ohne Rückgabe von Parameter Code


1.x / 2.x

with RefNr (valid for all versions other than 1.0)

mit RefNr (gilt für alle Versionen außer 1.0)

Description of the possible batch versions


The structure for a Twint payment within a Batch file to be submitted is as follows:

HEAD,<MerchantID>,<Date>,<Version>
Twint,Capture,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>
Twint,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>
Twint,Reverse,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>
FOOT,<CountRecords>,<SumAmount>


Example for Master MID function:

HEAD,[Master]MerchantID,Date,2.x
Type,Action,[Slave]MID,Amount,Currency,TransID,Data (depends on Action)
FOOT,CountRecords,SumAmount

Key

Format

CND

Description

Beschreibung

Type

a..11

M

HEAD for Header, FOOT for Footer, Twint for Twint

HEAD für Header, FOOT für Footer, Twint für Twint

Action

a..20

M

The parameter Action defines the type of transaction:

Capture

Credit

Reverse

Der Action-Parameter definiert die Art der Transaktion:

Capture (Buchung)

Credit (Gutschrift)

Reverse (Storno)

Key

Format

CND

Description

Beschreibung

RefNr

ans..40

O

Merchant’s unique reference number. Only characters a-zA-Z0-9,-_ are allowed.

Eindeutige Referenznummer des Händlers. Nur die Zeichen a-zA-Z0-9,-_ sind erlaubt.

Description of fields within the record for Batch files


The record area within the response file for Batch transactions looks as follows:

HEAD,<MerchantID>,<Date>,<Version>
Twint,Capture,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code>
Twint,Credit,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code>
Twint,Reverse,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code>
FOOT,<CountRecords>,<SumAmount>

Key

Format

CND

Description

Beschreibung

Action

a..20

M

The parameter Action defines the type of transaction:

Capture

Credit

Reverse

Der Action-Parameter definiert die Art der Transaktion:

Capture (Buchung)

Credit (Gutschrift)

Reverse (Storno)

Description of result parameters within the record for Batch files