Skip to main content

PIN support

Overview

In the case of magnetic stripe or contactless transactions it is possible to provide custom logic for pin request. The default logic suitable for most of the markets is handled by the SDK and you shouldn’t need this, but if some market has special requirements, for example according the card bin, this interface is needed to add a custom logic to decide whether to ask or not PIN on magnetic or contactless card transactions.

Magnetic PIN decider

There is an interface PinDecider that may be implemented and provided when the Reader SDK is initialized.

Implements SwipePinDecider protocol, the decide method receives the card data and returns a boolean.

struct CustomtSwipePinDecider: SwipePinDecider {

func decide(card: TransactionCard) -> Bool {
//...
}
}

In the case of EMV transactions, the pin request is handled by the card reader configuration and the card capabilities. However, the Readers SDK informs in the Reader State object when PIN is being requested, in this way the user of the Readers SDK can find out that a pin is being requested and update it’s UI accordingly.