Redeem a Transit pass

Passes can be redeemed in the following way:

You can optionally require extra security when users redeem or access their pass. For details, see Protect with Screen Lock.

Barcode scan

Help your customers scan their Pass by attaching a barcode.

Static barcode

You can display a static barcode by setting object.barcode. The API provides a variety of barcode types. For more details, see the Barcode type.

Rotating barcode

For additional security, you can display a rotating barcode by setting object.rotatingBarcode. Rotating barcodes look just like regular barcodes but change periodically, typically every minute, and the terminal/reader is programmed to only accept the most recent one. This reduces the risks associated with barcode screenshotting, in particular ticket theft or unauthorized ticket resale. For more details, see the RotatingBarcode type.

Security animation

Another way to prevent screenshot abuse is by displaying the barcode security animation, which supports human-verification of a pass.

The physical manifestation of a security animation is a shimmering outline around the barcode of the pass. This shimmering animation triggers only when the device is in motion so one can test the pass’ validity by tilting the device. On the other hand holding the device still will only animate the colorful security animation in loop.

To enable security animation for a pass, in the pass class, set the SecurityAnimation field’s AnimationType to FOIL_SHIMMER. Note that security animation is not compatible with rotating barcodes, only static barcodes.

See Figure 1. below for an example of how the security animation appears when it is enabled:

Security animation shimmer

Figure 1.

Protect with Screen Lock

To protect your customer's access to their Pass, you can require a screen lock each time they add or access their pass. This can be done by setting class.viewUnlockRequirement. For more details, see the ViewUnlockRequirement type.