Skip to main content
Skip table of contents

Content acquisition

Summary

Once a user has decided to purchase a product, the client application must send a purchase request to the OpenTV Platform. Assuming that the purchase is authorised, the subscription then authorises any internal or external requests to enable playback to commence. For example, for an Open Device this could be the authorisation of a DRM license to be delivered to the device.

The SDP handles all purchase requests and maintains the subscription information.

See Subscription data for details on retrieving and using the subscription data.

Data models

Context

The context model is used to provide the SDP with details on the device, user and account making the purchase request. See Account, User and Device data for details on how to retrieve it. It can be altered by the UI application if required, for example, to purchase the content for a different device than the one currently used.

Context data model
Name
Type
Description
Localised
Always available
accessPointUidIntegerThe unique Access Point identifier within the SDP. Can be used to request the full Access Point details from the SDP using the Access Point service. An Access Point provides details on the location the device resides in and how it should connect to the platform.NoYes
accountNumberStringThe account number. Usually provided by the service provider.NoYes
accountOriginIdIntegerIn cases where the account number needs to be defined within the SDP for some reason, this field can be used to identify the system providing the account origin key information, if present.NoNo
accountOriginKeyStringIn cases where the account number needs to be defined within the SDP for some reason, this field can be used to define the original account number as provided by the service provider. Rarely used.NoNo
accountUidIntegerThe unique account identifier within the SDP. This identifier is not known externally to the SDP, so it should only be used for SDP API calls. Account number should be used for account identification wherever possible.NoYes
casnStringThe Conditional Access Serial Number of the device CA chipset. Only applicable to set top boxes. It can be changed by a firmware change, but this is not common, so it can be used as a device identifier for signon.NoNo
challengeIdString

The solution to a recent challenge obtained from the challengeAggregateService, where required.

This field is used in NAGRA Media PRM deployments that use challenges to provide additional security around purchasing and licensing. It only needs to be set when providing a Context object to an API that requires this additional security, such as those on bocPurchaseService.
The same challenge ID may be used multiple times until it expires, normally in the order of 30 seconds after issue. Once a challenge ID expires, you must to obtain a new challenge using challengeAggregateService.acquireSecureChallenge and refresh this field with the decrypted challenge ID.

NoNo
deviceOriginIdIntegerThe identifier of the external system that provisioned the device. Only used if deviceOriginKey is present.NoNo
deviceOriginKeyStringThe external identifier of the device. Not typically used, as external systems usually also identify devices by hardware identifiers such as CASN.NoNo
deviceProfileUidIntegerUnique device profile identifier. Can be used to retrieve device profile information from the Profile service.NoNo
deviceTypeString

The device type. Must be one of:

  • STB – set top box
  • MP – media player
NoYes
deviceUidIntegerCan be used to retrieve the full device information from the Device service.NoYes
drmInstanceIdStringThe ID of the DRM system the client wishes to use. Typically not needed, as the DRM system is usually determined by the content itself.NoNo
featureNameListList of stringsA list of the name of each Feature in the DeviceProfile associated with the request.
If the client does not supply a value for this field, it is derived from the featureUidList where possible.
NoNo
featureUidListList of longsA list of the uid of each Feature in the DeviceProfile associated with the request.
If the client does not supply a value for this field, it is derived from the deviceProfileUid where possible.
NoNo
mediaPlayerIdStringThe identifer of the open device. Only applicable to open devices. Usually created by the DRM system during device initialisation.NoNo
smartcardIdStringThe smartcardId of the device's smartcard, if there is one.NoNo
userUidIntegerThe user's unique identifier within the SDP.NoYes

8 reads

Offer specification

An OfferSpecification model allows the client application to specify any identifiers that it knows about a product to complete the purchase.

Offer specification data model
Name
Type
Description
Localized
Always available
polgrpOriginIdIntegerThe originId of the Entity (that is, the identifier used by SDP for the system that owns the object).No*
polgrpOriginKeyStringThe originKey of the Entity (that is, the identifier used for the object by the system that owns it).No*
polgrpCasIdStringId of the policy group provided by CAS.No*
polgrpCasInstanceIdStringId of the CAS instance for the policy group.No*
polgrpUidLongUnique Id of the policy group.No*
offerIdStringOffer id of the policy group.NoYes


* One of the following must be available:

  • polygrpUid
  • polgrpOriginId and polgrpOriginKey
  • polgrpCasId and polgrpCasInstanceId

Use cases

The use cases involve the bocPurchaseService and challengeAggregateService. This service provides APIs for purchase transactions, retrieval of payment methods, retrieval of purchase tokens, and challenge acquisition. The various use cases for this service are described below.

Get pay options for account

Fetch the payment options that are available to the specified Account.

All payment options supported by the Account's Service Provider are returned. The return objects include details of any credentials SDP holds for the Account.

If a payment option requires credentials but these are missing, the payment method cannot currently be used. The Account holder must contact the operator or payment provider to set up their credentials before they can use this payment option.

CODE
http://<server>:<port>/hue-gateway/gateway/http/js/bocPurchaseService/getPaymentOptionsForAccount

This API returns a list of PaymentProviderDetails, which contains the payment options available.


GET parameters
Name
Type
Description
Mandatory

pContext

ContextContext data model.Y

pAccountUid

LongThe uid of the Account that is making the purchase.Y

Purchase impulse or subscription product post-paid for account or smartcard

Subscribe to a Policy Group for postpaid scenario.

Different types of products, such as impulse or subscription, can be purchased using this API. The purchase can be linked either to the account or to the smartcard only by setting values in the parameter PurchaseFor.

CODE
http://<server>:<port>/hue-gateway/gateway/http/js/bocPurchaseService/purchasePolicy

This API on success returns a list of the uid of each Acquired Content List created as a result of the purchase.


GET parameters
Name
Type
Description
Mandatory

pContext

Context data modelA Context object with information about the client making the purchase.Y

pOffer

Offer Specification data modelAn OfferSpecification object containing information that identifies the Policy Group to be purchased.Y
pPurchaseForPurchaseForWhether to provide access across the whole Account or just to a single smart card. Value must be one of ACCOUNT or SMARTCARD.Y

Purchase impulse or subscription product at no cost account or smartcard

Subscribe to a Policy Group that is available at no cost. This method bypasses the normal payment processing, but verifies that the specified Policy Group has zero price. If the Policy Group must be paid for, an error is returned.

Different types of products, such as impulse or subscription, can be purchased using this API. The purchase can be linked either to the account or to the smartcard only by setting values in the parameter PurchaseFor.

CODE
http://<server>:<port>/hue-gateway/gateway/http/js/bocPurchaseService/acquireZeroPricedPolicy 

This API on success returns a list of the uid of each Acquired Content List created as a result of the purchase.


GET parameters
Name
Type
Description
Mandatory

pContext

Context data modelA Context object with information about the client making the purchase.Y

pOffer

Offer Specification data modelAn OfferSpecification object containing information that identifies the Policy Group to be purchased.Y
pPurchaseForPurchaseForWhether to provide access across the whole Account or just to a single smart card. One of ACCOUNT or SMARTCARD.Y

Purchase product post paid for account with challenge

This use case involves retrieving the challenge using the challenge aggregateService and using this challenge to purchase a product.

Get challenge using challengeAggregateService

The challenge received can only be decrypted by the device's encryption hardware. The license server identifies Set Top Boxes and Media Players using their caSN, derived from the information provided during signon.

A client that does not provide device information when it signed on cannot use this API. This also applies to clients that sign on anonymously.

Media Players that initially signed on without providing device information can update their status using signonService.updateTokenWithMediaPlayer, supplying their mediaPlayerId. SDP responds with a new token that should be used in subsequent requests.

CODE
http://<server>:<port>/hue-gateway/gateway/http/js/challengeAggregateService/acquireSecureChallenge

There are no input parameters for this API.

This API returns an encrypted or signed challenge, suitably encoded, of type String.

Purchase product with Challenge

Using the challenge received in Purchase impulse or subscription product post paid for account or smartcard, this challenge can be used until its expiry.

Purchase impulse product for account and pay with card or e-wallet

Subscribe to a Policy Group and process payment using the details supplied. The payment can be made through various means such as a card or e-wallet.

CODE
http://<server>:<port>/hue-gateway/gateway/http/js/bocPurchaseService/purchasePolicyAndPay

The response is a list of the uid of each Acquired Content List created as a result of the purchase.


GET parameters
Name
Type
Description
Mandatory

pContext

Context data modelA Context object with information about the client making the purchase.Y

pOffer

Offer Specification data modelAn OfferSpecification object containing information that identifies the Policy Group to be purchased.Y
pPurchaseForPurchaseForWhether to provide access across the whole Account or just to a single smart card. Value can be one of ACCOUNT OR SMARTCARD.Y
pPaydetailsPaymentDetailsA PaymentDetails object specifying how this purchase will be paid for. The required fields of this object depend on the payment type (for example, card or e-wallet) that has been chosen.

See also

The full SDP API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.