Amazon FireTV

Prerequisites

We need to connect the middleware to Amazon, before proceeding with fireTV application.

In order to do so, please continue with the following steps,

  1. Setting up Amazon account and creating an application.

  2. Adding test products - see the tutorial.

Important notes for setting up products compatible with Cleeng:

  • Item ID (SKU) should be the reference of Cleeng Offer ID example S123123123_US
  • Use subscription purchasable item for subscriptions for a specific period of time. It means that the application must rely on Cleeng when checking entitlement.
  1. In order to validate receipt Cleeng requires Amazon “Shared Secret”. The shared secret can be found on the Shared Key page for your developer account with the Amazon Appstore link

General Amazon IAP FAQ.

Communication with receipt endpoint

Receipt Endpoint

📘

Production URL: https://cleeng.com/amazon/payment
Sandbox URL: http://sandbox.cleeng.com/amazon/payment

Request

  1. Request method: POST
  2. Required headers:
  • Content-Type: application/json
  • X-Publisher-Token: publisher_token
  1. Json payload example
{
    "customerEmail": "[email protected]",
    "offerId": "S598742062_US",
    "receipt": {
    "receiptId": "CM8NBdCpsfsdfJHKAlMQadkMzZMRi2t0dc5aYS1tw=",
    "userId": "YHSmjGja82Qf1TwrfghdfFmIhA1a7SlfIaFusML0="
    },
    "ipAddress": "192.168.1.1"
}
  1. Available Parameters

Parameters

Description

customerEmail

Customer email

offerId

an identifier for Cleeng offer (eg E123123123_US)

receiptId

receipt ID of the purchase returned by Amazon

userId

user ID of the purchase returned by Amazon

ipAddress

viewer IP address, optional parameter

  1. Example Response,
{
  "message": "OK"
}
  1. Response Description

message - Processing result

  1. Error Codes

Code

Description

400

Invalid Parameters

401

Invalid Authentication (Broadcaster and Viewer)

422

Unprocessable Entity

200

OK

500

Internal Server Error

Validate Access

Receipt processing is an asynchronous process that may take up to 30 seconds, therefore application needs to poll Cleeng API getAccessStatus() method until the transaction is completed and access is granted.

Updated 8 days ago


Amazon FireTV


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.