# Choice Cards

## Intro

Choice Cards control the logic around:

- Whether the user should be offered the choice of purchasing the content at all
- Whether the user has previously purchased the content and is still within their grace period
- Whether the user has enough points to purchase the content
- The user interface for presenting the choices to the user
- Whether the choice card includes a timer, and if so for how long
- Recording the user selection, including recording purchases
- Calling back the integrating application with instruction on path to take

Note: In some situations the actual Choice Card UI will not show at all, the calling client will simply be instructed to continue.

## When to call it

presentChoiceCard should be called prior to watching a long form on-demand stream when the user is logged in. The client should wait for a callback before proceeding.

presentChoiceCard is not required for Live, VPPO clips or ShowMS clips. When called for non-valid content or when no user logged in it will simply return the onWatchStandard callback.

## How to call it

###### Default code sample

`Nonstop.default.presentChoiceCard('VDKA4220171', containerElement);`

- contentId - the Partner API Id of the content the user has selected to watch
- element - The element in which to present the choice card

Present Choice Card

## Events

### Watch Nonstop

###### Default code sample

`document.addEventListener(Nonstop.default.Events.OnWatchNonstop, function(event) {
// client should play the stream with Nonstop ad load
});`

When the client application receives this callback it means that the user should watch the selected content Nonstop. This could be for a number of reasons:

- because they purchased via the choice card
- because they are within their grace period for this piece of content
- because this piece of content has been given to all users by a particular sponsor

### Watch Standard

###### Default code sample

`document.addEventListener(Nonstop.default.Events.OnWatchStandard, function(event) {
// client should play the stream with normal ad load
});`

When the client application receives this callback it means that the user should watch the selected content with the standard ad load. This could be for a number of reasons:

- this piece of content is not eligible to watch Nonstop
- the user could not afford to watch the content Nonstop
- the choice card timer elapsed and the user did not make a selection
- an error has occurred that is best to be handled by just playing the stream with standard ad load