If you are using Android Drop-in v5.0.0 or later:
This payment method requires no additional configuration.
Follow the Android Drop-in integration guide.
The focus of this page is on describing how to use the TwintComponent
of the native Twint SDK to enable Twint payments on Android Drop-in.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built your Android Drop-in integration. |
Setup steps | Before you begin, add TWINT in your test Customer Area. |
How it works
-
When a shopper on your app clicks the button to pay with Twint,
TwintComponent
makes a /payments request which containssubtype: sdk
. TheActionComponent
is triggered, which determines the transaction flow. -
The shopper is redirected to the Twint app on their device (or an error is displayed if a Twint app is not installed).
-
After the payment is processed, Twint app will return back to your app using the
redirectURL
, contained in the payment result. -
If the payment is successful a /payments/details request is made that contains
paymentData
, otherwise an error is shown.
Drop-in configuration
There is no required TWINT specific integration for Android Drop-in.
Recurring payments
To make recurring payments for TWINT, you need to:
Create a token
To create a token, include in your /payments request:
storePaymentMethod
: true- shopperReference: Your unique identifier for the shopper (minimum length three characters).
When the payment details have been stored, you receive a webhook containing:
type
: recurring.token.createdshopperReference
: your unique identifier for the shopper.eventId
: thepspReference
of the initial payment.storedPaymentMethodId
: the token that you need to make recurring payments for this shopper.
Make sure that your server is able to receive the Recurring tokens life cycle events webhook. You can set up this webhook in your Customer Area.
Make a payment with a token
Recurring payments can be made with Sessions or Advanced flow.
Test and go live
Check the status of TWINT test payments in your Customer Area > Transactions > Payments.
Before you can accept live TWINT payments, you need to submit a request for TWINT in your live Customer Area.