Yatta Checkout User Guide
REST API for licensing
Check licenses
This endpoint can be used to check if a specific account has purchased a license for a given product, including its expiry date.
Request
Headers
Content-Type |
Currently only application/json messages are accepted. |
Authorization |
Use basic authentication with your product ID (found in the integration details of your product) as user name and the vendor API key (found in the company information) as password, note that once your account's KYC is accepted, this will be changed from DEMO to a newly generated key. |
Attributes
environment |
Set to preview for your test systems (no real payments or licenses are processed). Set to live for production systems that only allow real licenses. |
accountId |
The account ID your IAM uses to identify Yatta Checkout accounts. Note: The account ID can be any unique string, UUID or hash. We recommend generating a new UUID for each account. |
productId |
The product ID can be found in product details in the Vendor Portal. |
durationMinutes |
Interval in which the license validity must be re-checked. Should be roughly the length of a typical user session, but can also be a timestamp in the far future. It must be rechecked at least once for each payment period (e.g., monthly). |
Response
Attributes
environment |
Will respond with the same environment as requested. |
validity |
Describes the current license state for the requested account. LICENSED The requested account owns an active license. EXPIRED The account used to have a license but it has expired UNLICENSED The account does not have a license for this product. INVALID_API_USAGE The call to the API was invalid. (E.g., too many API calls in a short period or invalid parameters.) |
accountId |
Requested account ID. |
licenseType |
PERSONAL Other license types are in development: FLOATING, TRIAL |
productId |
Requested product ID. |
checkedOutAt |
The timestamp for when the license check was executed. |
checkedOutUntil |
The checkedOut timestamp offset by the duration set in the request. If the license is not valid for the whole duration, this will be limited to the current license validity |
validFrom |
The date and time when the account purchased their current license. |
validUntil |
Date and time at which the current license will expire (unless it is renewed). |
Errors
401 —
404 —
Attributes
errorType |
Describes the error type: ACCOUNT_NOT_FOUND Account ID is wrong or could not be found. PRODUCT_NOT_FOUND Product ID is wrong or could not be found. |