> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayar.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify License SaaS Subscription

> Endpoint to verify license by providing license code and product ID in Saas Subscription Product.

```bash Request Example theme={null}
curl --request POST 'https://api.mayar.id/saas/v1/license/verify' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--header 'Content-Type: application/json' \
--data '{
    "licenseCode": "YOUR-LICENSE-CODE",
    "productId": "YOUR-PRODUCT-ID"
}'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "isLicenseActive": true,
    "licenseCode": {
        "licenseCode": "LICENSECODE12345",
        "status": "ACTIVE",
        "expiredAt": "2025-12-12T19:46:24.000Z",
        "transactionId": "994d4071-a81e-4558-a854-47530eea9b6d",
        "productId": "84d1d247-a8b3-4c7d-96f0-cf276edb7c33",
        "customerId": "6a38cf26-6bab-42c8-92be-72f3a9fd4c33",
        "customerName": "John Doe",
        "customerEmail": "johndoe@gmail.com",
        "activationLimit": "Tidak terbatas",
        "useCount": 10,
        "createdAt": "2024-02-12T08:41:13.579Z",
        "updatedAt": "2024-02-12T08:57:36.047Z",
        "membershipTierId": "c96850f9-b379-4ed3-bcf2-6d88a87bd20c",
        "membershipTierName": "Master Black Belt Membership"
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/saas/v1/license/verify
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/saas/v1/license/verify
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-API-Key-Here`

## Request Body

**licenseCode** `string` *required*

The license code to be verify.

**productId** `string` *required*

The ID of the product associated with the license.

### Response

Successful Response

### Main Structure (Root)

**statusCode** `integer`

Status code form API.

**isLicenseActive** `boolean`

Shows whether the license is currently active (`true` or `false`).

**licenseCode** `array of object`

Detailed information about the license code.

### licenseCode Structure (Array Of Object)

**licenseCode** `string`

The license code value.

**status** `string`

License status (example: `"ACTIVE"`).

**expiredAt** `string (ISO 8601 datetime)`

License expiration date.

**transactionId** `string\<uuid\>`

Related transaction ID.

**productId** `string\<uuid\>`

ID of the associated product.

**customerId** `string\<uuid\>`

Customer ID linked to the license.

**customerName** `string`

Customer’s full name.

**customerEmail** `string`

Customer’s email address.

**activationLimit** `string`

Maximum number of allowed activations (example: `"Tidak terbatas"` → means “Unlimited”).

**useCount** `number`

Number of times the license has been used.

**createdAt** `string (ISO 8601 datetime)`

License creation timestamp.

**updatedAt** `string (ISO 8601 datetime)`

Last updated timestamp.

**membershipTierId** `string\<uuid\>`

ID of the membership tier associated with the license.

**membershipTierName** `string`

Name of the membership tier.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.