InPlayer API (2.0.0)

Download OpenAPI specification:Download

INTRODUCTION

Our Paywall platform enables you up to create a detailed subscription business, allowing you to build a consumer base and drive significant revenues. Our paywall supports recurring payments and billing, consumer acquisition, subscriber lifecycle management and gives you consumer retention CRM tools.

Once you have an InPlayer Merchant Account you can use our dashboard at https://dashboard.inplayer.com to publish, manage and sell premium content. However, you can always integrate with our APIs for full custom integration.

INPLAYER API

The InPlayer API has REST architecture. It has mostly resource-oriented URLs, and uses standard HTTP response codes to indicate API errors or success requests. Every InPlayer Core Resource has its own URL and each operation (GET, POST, PUT, and DELETE) has a specific meaning

All API requests should be made with Content-Type:application/x-www-form-urlencoded header.

JSON is returned by all API responses, no matter if they are success or errors.

DOCS TERMINOLOGY

In the section bellow you can find explanation about the terms that are used for the Core Resources in the InPlayer Platform. Be sure to read it before you start with custom integration.

Reporting

Term Explanation
report type The type for the report.

API ENVIRONMENTS

To make the API as explorable as possible, we have 2 different environments for live or testing purposes. There is no switch for changing between modes, just use the different URLs of our API servers.

ERRORS

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. When a request is valid but does not complete successfully (e.g., 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 missing 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 doesn't exist.
409 Conflict The request conflicts with another request.
429 Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 Server Errors Something went wrong on InPlayer's end.

Authentication

bearerAuth

You can create a JSON Web Token (JWT) via the authenticate endpoint. Usage format: Bearer <JWT>

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

V1

All operations related to payments & subscriptions

Get Reports By Report Type

Returns reports by report type.

Authorizations:
path Parameters
report_type
required
string
Example: "subscription"

The type for the report

query Parameters
merchantID
required
number
Example: 23434

The ID of the merchant

Responses

202

Generating report message

400

Bad Request

401

Unauthorized

422

Unprocessable Entity

423

Locked

post /reporting/report/{report_type}
Staging Server
https://staging-v2.inplayer.com/reporting/report/{report_type}
Production Server
https://services.inplayer.com/reporting/report/{report_type}

Request samples

Copy
curl https://staging-v2.inplayer.com/reporting/reports/{report_type} \
-H "Authorization:Bearer <token>"

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "Generating report. Please wait."
}

Get Reports By Report Type

Returns reports by report type.

Authorizations:
path Parameters
report_type
required
string
Example: "subscription"

The type for the report

query Parameters
merchantID
required
number
Example: 23434

The ID of the merchant

Responses

200

An array of object holding collected all the information about report files

400

Bad Request

401

Unauthorized

422

Unprocessable Entity

get /reporting/reports/{report_type}
Staging Server
https://staging-v2.inplayer.com/reporting/reports/{report_type}
Production Server
https://services.inplayer.com/reporting/reports/{report_type}

Request samples

Copy
curl https://staging-v2.inplayer.com/reporting/reports/{report_type} \
-H "Authorization:Bearer <token>"

Response samples

application/json
Copy
Expand all Collapse all
{
  • "reports":
    [
    ]
}