OpenTV ENTera & OpenTV Platform Documentation

Making a purchase

OpenTV Video Platform's Purchase Service enables the user to purchase products from the client app.

Request

To initiate a purchase, send a POST request to:

https://<host>:<port>/purchase_service/v1/user/product/actions/purchase

Headers

  • authorization – bearer token that the client received at signon

  • nv-tenant-id – the tenant ID

Mandatory arguments

  • productId – the ID of the product to be purchased

Other arguments

None

Example

A POST request with this payload initiates the purchase of the product with the specified ID:

{
  "productId": "1234DFG5sd"
}

Response

A successful request returns an HTTP 201 status.

A bad request returns an HTTP 400 status.

An unauthorised request returns an HTTP 401 status.

A forbidden request returns an HTTP 403 status.

If the specified product does not exist, the request returns an HTTP 404 status.

See the (23.12_Q1) Purchase Service API documentation for the specific error codes that are returned for the HTTP 4xx statuses.

Example

{
  "productId": "1234DFG5sd",
  "purchaseAuthRequestReference": "CRM_PARTNER_AUTH_REQUEST_REFERENCE/X-CORRELATION-ID"
}

See also