Download OpenAPI specification:Download
InPlayer equips you to run a detailed subscription business model, to build and grow your consumer base, and drive significant revenues. Our paywall supports recurring payments and billing cycles, consumer acquisition, subscriber lifecycle management, and provides you with consumer retention CRM tools.
Once you create an InPlayer Merchant Account, you are entitled to using our InPlayer dashboard for publishing, managing, and selling your premium content. Moreover, you can always integrate with our APIs for a full custom integration.
The InPlayer API follows the REST architectural style and uses standard HTTP response codes to indicate success requests (2xx) or API errors (4xx, 5xx). Each of the InPlayer Core Resources (Accounts & Authentication, Asset & Access, Payments & Subscriptions, Vouchers & Promotions, Branding, Restrictions & Rules, Reporting, Analytics, and Features) has their own URL and each of the operations involved (POST
, PUT
, PATCH
, GET
, and DELETE
) carries a specific meaning like creating, updating, fetching, deleting data, and much more.
All API requests should contain Content-Type:application/x-www-form-urlencoded header. The responses are always returned in JSON object(s), both for the successful requests and the failed attempts (errors).
The following section defines the domain language used across our platform. Proceed reading to introduce yourself to the terms employed for each of our Core Resources before you start working on your custom integration.
Accounts and Account Types
Term | Explanation |
---|---|
merchant | The Merchants are those who have ownership of the premium content. |
consumer | The Consumers are those who can view or buy the premium content. |
customer | The Customers are those who have made at least one purchase. |
uuid | Stands for the Unique Identifier of the Merchant. You can find it on the InPlayer's dashboard at the Account Details section as Account ID. |
Items/Assets and Item Types
Term | Explanation |
---|---|
items | The digital Assets that Merchants can protect and sell. Asset is an Item with applied pricing and access options. |
item_type | The type of the digital content that can be created in the InPlayer platform. According to the type of the premium content, we distinguish between a few item types. Currently, we support HTML/Text (where you can store HTML code or any IFRAME code), video, file, and RSS type of asset. |
content | The content of the Item is the premium content that you can store and protect. Once the Customer has access to the Item, they can view the content. |
metadata | An unlimited key-value store containing additional info of the Item concerned. |
Access Types
Term | Explanation |
---|---|
access_type | The supported types of granting access in the system (pay-per-view and subscription). |
period | The period of the access entitlement that consumers get after purchasing the asset. |
Access Fees
Term | Explanation |
---|---|
access_fee | The applied access_type and price to an Item. |
Items Packages
Term | Explanation |
---|---|
package | The Packages are a collection of multiple Items (a group of Items). You can set up a Package Access Fee as an additional pricing option for Items that are part of a given Package. Once the Customer buys the Package Access Fee, they will have access to every Item that belongs to that Package. |
To make the API as explorable as possible, we have two different environments for production related and testing purposes. There is no switch for changing between modes, so just refer to the URL you need.
InPlayer uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with InPlayer's servers.
Not all errors map cleanly onto HTTP response codes, however. For instance, when a request is valid but does not complete successfully (e.g. if asset access is not found), we return a 402 error code.
List of status codes
Status code | Explanation |
---|---|
200 | OK Everything worked as expected. |
201 | Created The resource has been created. |
202 | Accepted The request has been accepted for processing but the processing has not been completed. |
204 | No Content The server has fulfilled the request but does not need to return an entity-body. |
400 | Bad Request The request was unacceptable, often due to omission of a required parameter. |
401 | Unauthorized No valid access token provided. |
402 | Request Failed The parameters were valid but the request failed. |
404 | Not Found The requested resource does not exist. |
409 | Conflict The request conflicts with another request. |
429 | Too Many Requests Too many requests have been sent to the API in a short amount of time. We recommend using exponential backoff for your requests. |
500, 502, 503, 504 | Server Errors Something went wrong on InPlayer's end. |
Creates brand to be used as a theme for the paywall and email templates.
brand_name required | string The name of the brand |
paywall_cover_photo required | string URL for the paywall preview cover photo |
paywall_brand_logo required | string URL for the paywall brand logo |
paywall_primary_color required | string hexadecimal value for the primary color of the paywall |
paywall_secondary_color required | string hexadecimal value for the secondary color of the paywall |
paywall_buttons_bg_color required | string hexadecimal value for the buttons primary color of the paywall |
paywall_buttons_text_color required | string hexadecimal value for the buttons text color of the paywall |
preview_top_border required | boolean Boolean value used to hide/show the top border of the preview |
inplayer_protected_label required | boolean Boolean value used to hide/show the "protected by Inplayer" label |
paywall_footer required | string Custom html for the paywall footer |
default | boolean Default brand for the merchant |
template_id | integer Template id for the merchant |
terms_url | string Custom terms and conditions link |
curl -X POST https://services.inplayer.com/branding/paywall \ -H 'Authorization: Bearer Access-Token' \ -d paywall_cover_photo=img-url.jpg \ -d paywall_primary_color=#FFF \ -d paywall_secondary_color=#000 \ -d paywall_buttons_bg_color=#000 \ -d paywall_buttons_text_color=#000 \ -d preview_top_border=true \ -d preview_buttons_bg_color=#000 \ -d preview_buttons_text_color=#000 \ -d inplayer_protected_label=true \ -d template_id=1 \ -d terms_url=www.mytermsurl.com
{- "id": 12
}
id required | integer Brand id |
brand_name required | string The name of the brand |
paywall_cover_photo required | string URL for the paywall preview cover photo |
paywall_brand_logo required | string URL for the paywall brand logo |
paywall_primary_color required | string hexadecimal value for the primary color of the paywall |
paywall_secondary_color required | string hexadecimal value for the secondary color of the paywall |
paywall_buttons_bg_color required | string hexadecimal value for the buttons primary color of the paywall |
paywall_buttons_text_color required | string hexadecimal value for the buttons text color of the paywall |
preview_top_border required | boolean Boolean value used to hide/show the top border of the preview |
inplayer_protected_label required | boolean Boolean value used to hide/show the "protected by Inplayer" label |
paywall_footer required | string Custom html for the paywall footer |
default | boolean Default brand for the merchant |
template_id | integer Template id for the merchant |
terms_url | string Custom terms and conditions link |
curl -X PUT https://services.inplayer.com/branding/paywall \ -H 'Authorization: Bearer <token>' \ -d paywall_cover_photo=img-url.jpg \ -d paywall_brand_logo=img1-url.jpg \ -d paywall_primary_color=#000 \ -d paywall_secondary_color=#FFF \ -d paywall_buttons_bg_color=#000 \ -d paywall_buttons_text_color=#000 \ -d preview_top_border=true \ -d preview_buttons_bg_color=#000 \ -d preview_buttons_text_color=#000 \ -d preview_top_border=true \ -d template_id=1 \ -d terms_url=www.mytermsurl.com
{- "id": 12
}
curl -X DELETE https://services.inplayer.com/branding/paywall/{id} \ -H 'Authorization: Bearer <token>'
{- "code": 401,
- "message": "Invalid auth token"
}
id required | integer Example: 12 Brand id |
merchant_uuid required | string <uuid> Example: 528b1b80-5868-4abc-a9b6-4d3455d719c8 Merchant uuid |
curl https://services.inplayer.com/branding/paywall/{merchant_uuid}/{id}
{- "id": 14,
- "exists": true,
- "brand_name": "Acme Inc.",
- "paywall_cover_photo": "string",
- "paywall_primary_color": null,
- "paywall_secondary_color": null,
- "paywall_buttons_bg_color": null,
- "paywall_buttons_text_color": null,
- "preview_top_border": false,
- "inplayer_protected_label": true,
- "paywall_footer": "Foo bar",
- "default": true,
- "template_id": 1,
- "terms_url": "www.mytermsurl.com"
}
merchant_uuid required | string <uuid> Example: 528b1b80-5868-4abc-a9b6-4d3455d719c8 Merchant uuid |
curl https://services.inplayer.com/branding/paywall/{merchant_uuid}/default
{- "id": 14,
- "exists": true,
- "brand_name": "Acme Inc.",
- "paywall_cover_photo": "string",
- "paywall_primary_color": null,
- "paywall_secondary_color": null,
- "paywall_buttons_bg_color": null,
- "paywall_buttons_text_color": null,
- "preview_top_border": false,
- "inplayer_protected_label": true,
- "paywall_footer": "Foo bar",
- "default": true,
- "template_id": 1,
- "terms_url": "www.mytermsurl.com"
}