Skip to end of banner
Go to start of banner

Licenses v4 API

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

Introduction

User's access to services provided by the AminoTV API are handled by Licenses. In order to use a service, the user must first be issued a License to a Product granting access to the requested service.

Entities overview

See /wiki/spaces/MAPI/pages/49676828

EntityPurpose
ProductA Product represents a collection of services to which a user may be granted access. Products are defined by the service provider.
License

A License grants access for one user to the services granted by one Product. A user may have several licenses. Licenses can be purchased, revoked and expired.

Purchasing

Endpoints overview

EndpointHTTP methodPurpose
/api/license/v4/users/{user_id}POSTIssue a license to a user. This implies some method of payment is provided.

A user may purchase a License for themselves by calling the create license endpoint. In order to create a license, some method of payment must be provided. At the moment only one method of payment is supported: "billing". With this payment method, no further payment details are necessary, but the user is charged through the service provider's billing system.

Purchase restrictions

User restrictions

Some users may have restrictions set on their account that prevent them from making purchases. These users are marked with the user flag "LICENSE_PURCHASE_RESTRICTED". SeeĀ User flags for more information.

Product restrictions

Only Products marked as "visible" may be purchased through the License v4 API. Other Products should not be shown to users as purchasable options.

In Channel API v2, products including a listed channel is included in the response under the "categories" field. The "visible" field shows whether the Product is considered "visible".

The "price" field can be used to show the purchasing price of the product to the user.


Billing

If the service provider supports billing as a payment method, then they are responsible for handling the billing of the customer separately. A list of all purchased licenses can be obtained through the management API, see License Management Endpoints#/Licenses/GetLicenses. The order ID of a license uniquely identifies each purchase. This identifier should be used to make sure the user is not billed multiple times for the same purchase.

  • No labels