TWINT

Intro
TWINT is a Swiss real-time banking/prepaid payment system.
With over 3.5 million active users, TWINT is the most popular payment method in Switzerland. By linking their bank accounts, credit cards or prepaid cards with the TWINT app, your customers can pay low amount transactions easily (i.e. pay-by-phone parking, food ordering or invoicing).
You send a standard request to our platform to redirect your customers to the TWINT portal to open the app.
The integration is very easy, as you only need to send one additional parameter along with your request.
Key benefits
- Low PCI requirements (no sensitive or personal data shared)
- Easy integration
- Very popular in Switzerland
- Allows
- Authorisations
- Partial/full captures
- Partial/multiple/full refunds
- Full cancellations
- Recurring payments (User-on-File)
Integration
We offer this payment methods for the following integration modes. Learn in our dedicated guides about their individual differences:
Find a high level overview in the "Process flows" chapter.
Add the following properties to a standard CreateHostedCheckout/CreatePayment request:
{
"order":{
"amountOfMoney":{
"currencyCode":"CHF",
"amount":1700
},
"redirectPaymentMethodSpecificInput":{
"paymentProductId":5407,
"requiresApproval":false
}
}
}
Properties | Remarks |
---|---|
order.amountOfMoney |
amount: The gross amount you want to charge for this order. currencyCode: The ISO 4217 currency code for this amount. |
redirectPaymentMethodSpecificInput |
paymentProductId: The numeric identifier of the payment method on our platform. Find this id in the "Overview" chapter. For payments requested via CreateHostedCheckout, it instructs our platform to send your customers directly to the TWINT-branded version of our Hosted Checkout Page. If omitted, our platform sends your customers to the Hosted Checkout Page instead, allowing them to choose this or any other payment method that is active in your account. requiresApproval: Set to either "true" or "false" depending on whether you want to process payments in authorisation/direct sale mode. |
Find detailed information about this object and its properties in our CreateHostedCheckoutAPI/CreatePaymentAPI.
Process flows
Depending on your customers' device(s) used, differences apply:
With a desktop and a mobile device
This flow involves both your customers' mobile/tablet and desktop device interacting with each other.
- Your customers finalise an order on their desktop device in your shop and select TWINT.
- You send this CreateHostedCheckout request to our platform.
- You redirect your customers on their desktop device via the redirectUrl to our Hosted Checkout Page.
- Your customers scan the displayed QR code with their mobile/tablet device or type in displayed the code manually in their TWINT app.
- The mobile/tablet device opens the TWINT app. Your customers confirm the payment in the app.
- We receive the transaction result.
- The mobile/tablet device opens the standard browser and redirects your customers to your returnURL. We redirect your customers to your returnURL on their desktop device.
- You request the transaction result from our platform via GetHostedCheckout or receive the result via webhooks.
- If the transaction was successful, you can deliver the goods / service.
With a mobile device
- Your customers finalise an order in your shop and select TWINT.
- You send this CreateHostedCheckout request to our platform.
- You redirect your customers via the redirectUrl to our Hosted Checkout Page where they click on the "Switch to app" button.
- The mobile device opens the TWINT app. Your customers confirm the payment in the app.
- We receive the transaction result.
- The app redirects your customers to your returnURL
- You request the transaction result from our platform via GetHostedCheckout or receive the result via webhooks.
- If the transaction was successful, you can deliver the goods / service.
Testing
Refer to our Test cases for test data and detailed instructions.
- Make sure to use the right endpoint and switch back to the live URL as soon as you have finished your tests.
- The data in our Test cases ONLY work for payment requests in our test environment. Using this data in our production environment will lead to undesirable testing results.
Additional information
TWINT Recurring Payments (User-on-File)
TWINT Recurring Payments User-on-File (UoF) allows merchants to store your customers' TWINT identity as a token (alias), enabling you to bill them on a defined schedule without re-authentication.
This feature streamlines the checkout process for your customers and allows you to offer recurring payments, subscriptions, and instalments while keeping sensitive card data out of your scope.
To use this feature, you need to:
- Process a payment with token creation or create a standalone token for subscriptions.
- Use the token for subsequent Merchant-Initiated Transactions (MIT).
Payment with token creation
Process a payment and create a token simultaneously.
Set order.amountOfMoney.amount < 0 and redirectPaymentMethodSpecificInput.tokenise=true in your initial payment request:
{
"order": {
"amountOfMoney": {
"amount": 100,
"currencyCode": "CHF"
}
},
"hostedCheckoutSpecificInput": {
"returnUrl": "https://yourRedirectionUrl.com"
},
"redirectPaymentMethodSpecificInput": {
"paymentProductId": 5407,
"requiresApproval": true,
"tokenize": true
}
}
For this scenario, there are two possible outcomes:
Your customers either:
- Accept both the payment and the User-on-File (UoF) registration (thereby allowing the creation of the token).
- Accept the payment but decline the UoF registration (thereby preventing the creation of the token).
In scenario 2, our platform will process the transaction but not create a token. As a result, our platform will not include the property paymentOutput.redirectPaymentMethodSpecificOutput.token in the CreatePayment request response or in GetHostedCheckout/GetPaymentDetails requests. Ensure you handle this case accordingly.
Standalone token for subscriptions
Process a 0-amount transaction to create a token for later use only.
Set order.amountOfMoney.amount=0 and redirectPaymentMethodSpecificInput.tokenise=true in your initial payment request:
{
"order": {
"amountOfMoney": {
"amount": 0,
"currencyCode": "CHF"
}
},
"hostedCheckoutSpecificInput": {
"returnUrl": "https://yourRedirectionUrl.com"
},
"redirectPaymentMethodSpecificInput": {
"paymentProductId": 5407,
"requiresApproval": true,
"tokenize": true
}
}
Token usage for subsequent Merchant-initiated transactions (MIT)
Use an existing token for processing subsequent payments according to the Card On File (COF) framework.
{
"order":{
"amountOfMoney":{
"currencyCode":"CHF",
"amount":100
}
},
"redirectPaymentMethodSpecificInput":{
"paymentProductId":5407,
"requiresApproval":false,
"token":"your_TWINT_token"
}
}