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

# Get License

## Endpoint Overview

**GET** `https://api.unibee.dev/merchant/get_license`

Get License

***

## Authorization

All UniBee Merchant API requests require authentication via API key.

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | Bearer `<your_api_key>`               |
| `Content-Type`  | Yes      | `application/json` (for request body) |

***

## Parameters

Path, query, and request body parameters are defined in the schema below. Use the interactive Try it panel to see the full request structure.

Path, query, and request body parameters are defined in the schema below. Use the interactive Try it panel to see the full request structure.

***

## Request examples

### cURL

```bash theme={null}
curl -X GET "https://api.unibee.dev/merchant/get_license" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
```

### Sandbox

```bash theme={null}
curl -X GET "https://api-sandbox.unibee.top/merchant/get_license" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json"
```

***

## Response

Success responses return a JSON envelope with `code`, `data`, `message`, `redirect`, and `requestId`. `code` `0` indicates success.

| Field                     | Type    | Description                  |
| ------------------------- | ------- | ---------------------------- |
| `code`                    | integer | Response code. `0` = success |
| `data`                    | object  | Response payload             |
| `data.APIRateLimit`       | integer | APIRateLimit                 |
| `data.currentMemberCount` | integer | CurrentMemberCount           |
| `data.license`            | object  |                              |
| `data.memberLimit`        | integer | MemberLimit, -1=Unlimited    |
| `data.merchant`           | object  |                              |
| `message`                 | string  | Human-readable message       |
| `requestId`               | string  | Request ID for support       |

***

## Error handling

| HTTP status | Meaning                                                                   |
| ----------- | ------------------------------------------------------------------------- |
| 400         | Bad request — invalid or missing parameters. Check `message` in the body. |
| 401         | Unauthorized — missing or invalid API key.                                |
| 404         | Not found — invalid path or resource.                                     |
| 500         | Server error — retry with backoff.                                        |

When `code` in the response body is non-zero, check `message` for details. Use `requestId` when contacting support.


## OpenAPI

````yaml get /merchant/get_license
openapi: 3.0.0
info:
  description: UniBee Api Server
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: OpenAPI UniBee
  version: daily,buildtime:202607240926
servers:
  - url: https://api.unibee.dev
  - url: https://api-sandbox.unibee.top
security:
  - Authorization: []
paths:
  /merchant/get_license:
    get:
      tags:
        - Merchant
      summary: Get License
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      APIRateLimit:
                        description: APIRateLimit
                        format: int
                        properties: {}
                        type: integer
                      currentMemberCount:
                        description: CurrentMemberCount
                        format: int
                        properties: {}
                        type: integer
                      license:
                        $ref: >-
                          #/components/schemas/unibee.internal.logic.middleware.license.License
                      memberLimit:
                        description: MemberLimit, -1=Unlimited
                        format: int
                        properties: {}
                        type: integer
                      merchant:
                        $ref: '#/components/schemas/unibee.api.bean.Merchant'
                    type: object
                  merchantId:
                    format: int64
                    properties: {}
                    type: integer
                  message:
                    format: string
                    properties: {}
                    type: string
                  redirect:
                    format: string
                    properties: {}
                    type: string
                  requestId:
                    format: string
                    properties: {}
                    type: string
                type: object
          description: ''
components:
  schemas:
    unibee.internal.logic.middleware.license.License:
      properties:
        isPaid:
          format: bool
          properties: {}
          type: boolean
        license:
          description: License, Premium Version will contain License
          format: string
          properties: {}
          type: string
        ownerEmail:
          description: OwnerEmail
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        version:
          $ref: >-
            #/components/schemas/unibee.internal.logic.middleware.license.MerchantVersion
      type: object
    unibee.api.bean.Merchant:
      properties:
        companyLogo:
          description: company_logo
          format: string
          properties: {}
          type: string
        companyName:
          description: company_name
          format: string
          properties: {}
          type: string
        countryCode:
          description: Country Code
          format: string
          properties: {}
          type: string
        countryName:
          description: Country Name
          format: string
          properties: {}
          type: string
        homeUrl:
          format: string
          properties: {}
          type: string
        id:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        name:
          description: name
          format: string
          properties: {}
          type: string
        timeZone:
          description: merchant default time zone
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.Plan:
      properties:
        amount:
          description: amount, cent, without tax
          format: int64
          properties: {}
          type: integer
        autoChargeConfig:
          $ref: '#/components/schemas/unibee.api.bean.AutoChargeConfig'
        autoUpgradePlanId:
          description: >-
            Target plan id for auto-upgrade; stored in additional settings JSON;
            0 if unset
          format: int64
          properties: {}
          type: integer
        bindingAddonIds:
          description: binded recurring addon planIds，split with ,
          format: string
          properties: {}
          type: string
        bindingOnetimeAddonIds:
          description: binded onetime addon planIds，split with ,
          format: string
          properties: {}
          type: string
        cancelAtTrialEnd:
          description: >-
            whether cancel at subscription first trial end，0-false | 1-true,
            will pass to cancelAtPeriodEnd of subscription
          format: int
          properties: {}
          type: integer
        checkoutTemplateId:
          description: Checkout template id, stored in plan additional settings
          format: int64
          properties: {}
          type: integer
        checkoutUrl:
          description: CheckoutUrl built from checkoutTemplateId and planId
          format: string
          properties: {}
          type: string
        compareAtAmount:
          description: >-
            optional compare-at / strikethrough display price for regular plan
            amount in minor units (plan currency); UI only, not used in billing;
            stored in plan additional settings JSON with multiTrials
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          format: string
          properties: {}
          type: string
        disableAutoCharge:
          description: >-
            1=auto-charge off; for main recurring plans with amount>0 also 0=may
            auto-charge. Always 1 when amount=0 or plan type is not main (those
            plans never use subscription auto-charge).
          format: int
          properties: {}
          type: integer
        externalPlanId:
          description: external_user_id
          format: string
          properties: {}
          type: string
        extraMetricData:
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        homeUrl:
          description: home_url
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        imageUrl:
          description: image_url
          format: string
          properties: {}
          type: string
        internalName:
          description: PlanInternalName
          format: string
          properties: {}
          type: string
        intervalCount:
          description: period unit count
          format: int
          properties: {}
          type: integer
        intervalUnit:
          description: period unit,day|month|year|week
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        metricLimits:
          description: Plan's MetricLimit List
          format: '[]*bean.PlanMetricLimitParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricLimitParam'
          properties: {}
          type: array
        metricMeteredCharge:
          description: Plan's MetricMeteredCharge
          format: '[]*bean.PlanMetricMeteredChargeParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
          properties: {}
          type: array
        metricRecurringCharge:
          description: Plan's MetricRecurringCharge
          format: '[]*bean.PlanMetricMeteredChargeParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
          properties: {}
          type: array
        multiCurrencies:
          description: Plan's MultiCurrencies
          format: '[]*bean.PlanMultiCurrency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrency'
          properties: {}
          type: array
        multiTrials:
          description: >-
            multi-step trials for this plan; when non-empty, the first item also
            defines the effective trialAmount & trialDurationTime
          format: '[]*bean.PlanMultiTrial'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiTrial'
          properties: {}
          type: array
        planName:
          description: PlanName
          format: string
          properties: {}
          type: string
        productId:
          description: product id
          format: int64
          properties: {}
          type: integer
        publishStatus:
          description: 1-UnPublish,2-Publish, Use For Display Plan At UserPortal
          format: int
          properties: {}
          type: integer
        status:
          description: status，1-editing，2-active，3-inactive，4-soft archive, 5-hard archive
          format: int
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage 1000 = 10%
          format: int
          properties: {}
          type: integer
        trialAmount:
          description: >-
            price of trial period; may be overridden by
            multiTrials[0].trialPrice
          format: int64
          properties: {}
          type: integer
        trialDemand:
          format: string
          properties: {}
          type: string
        trialDurationTime:
          description: >-
            duration of trial (seconds); may be overridden by
            multiTrials[0].trialDuration
          format: int64
          properties: {}
          type: integer
        type:
          description: type，1-main plan，2-addon plan
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      type: object
    unibee.api.bean.Subscription:
      properties:
        addonData:
          description: plan addon json data
          format: string
          properties: {}
          type: string
        amount:
          description: amount, cent
          format: int64
          properties: {}
          type: integer
        billingCycleAnchor:
          description: billing_cycle_anchor
          format: int64
          properties: {}
          type: integer
        cancelAtPeriodEnd:
          description: whether cancel at period end，0-false | 1-true
          format: int
          properties: {}
          type: integer
        cancelOrExpireTime:
          description: >-
            the cancel or expire time, utc time, 0 if subscription not in
            cancelled or expired status
          format: int64
          properties: {}
          type: integer
        cancelReason:
          format: string
          properties: {}
          type: string
        countryCode:
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        currentPeriodEnd:
          description: current_period_end, utc time
          format: int64
          properties: {}
          type: integer
        currentPeriodPaid:
          description: current period paid or not, 1-paid, other-the utc time to expire
          format: int64
          properties: {}
          type: integer
        currentPeriodStart:
          description: current_period_start, utc time
          format: int64
          properties: {}
          type: integer
        defaultPaymentMethodId:
          format: string
          properties: {}
          type: string
        dunningTime:
          description: dunning_time, utc time
          format: int64
          properties: {}
          type: integer
        externalSubscriptionId:
          description: external_subscription_id
          format: string
          properties: {}
          type: string
        features:
          description: features
          format: string
          properties: {}
          type: string
        firstPaidTime:
          description: first success payment time
          format: int64
          properties: {}
          type: integer
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayStatus:
          description: >-
            gateway
            status，Stripe：https://stripe.com/docs/billing/subscriptions/webhooks 
            Paypal：https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_get
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        lastUpdateTime:
          format: int64
          properties: {}
          type: integer
        latestInvoiceId:
          description: latest_invoice_id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        multiTrial:
          $ref: '#/components/schemas/unibee.api.bean.SubscriptionMultiTrial'
        originalPeriodEnd:
          description: original_period_end, utc time
          format: int64
          properties: {}
          type: integer
        pendingUpdateId:
          format: string
          properties: {}
          type: string
        planId:
          description: plan id
          format: int64
          properties: {}
          type: integer
        productId:
          description: product id
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        returnUrl:
          format: string
          properties: {}
          type: string
        status:
          description: >-
            status，1-Pending｜2-Active｜3-PendingInActive | 4-Cancel | 5-Expire |
            6- Suspend| 7-Incomplete | 8-Processing | 9- Failed
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        taskTime:
          description: task_time
          format: '*gtime.Time'
          properties: {}
          type: string
        taxPercentage:
          description: TaxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        testClock:
          description: >-
            test_clock, simulator clock for subscription, if set , sub will out
            of cronjob controll
          format: int64
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        type:
          description: sub type, 0-gateway sub, 1-unibee sub
          format: int
          properties: {}
          type: integer
        userId:
          description: userId
          format: int64
          properties: {}
          type: integer
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.internal.logic.middleware.license.MerchantVersion:
      properties:
        endTime:
          description: EndTime,UTC, The End Time Of Plan,0 for free
          format: int64
          properties: {}
          type: integer
        expired:
          description: Expired
          format: bool
          properties: {}
          type: boolean
        isPaid:
          description: IsPaid
          format: bool
          properties: {}
          type: boolean
        name:
          description: Name
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.internal.logic.middleware.license.Plan'
        startTime:
          description: StartTime,UTC, The Start Time Of Plan,0 for free
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.AutoChargeConfig:
      properties:
        autoChargeLeadTime:
          description: >-
            plan-level auto-charge lead time before period end (seconds); nil =
            fall back to merchant TryAutomaticPaymentBeforePeriodEnd; value must
            be >= 300.
          format: '*int64'
          properties: {}
          type: integer
        autoChargeMaxRetryCount:
          description: >-
            plan-level max auto-charge attempts for one invoice, including the
            first automatic attempt; nil = fall back; 0 = unlimited.
          format: '*int64'
          properties: {}
          type: integer
        autoChargeRetryInterval:
          description: >-
            plan-level retry interval after a failed auto-charge (seconds); nil
            = fall back to merchant/system default; value must be >= 300.
          format: '*int64'
          properties: {}
          type: integer
        incompleteExpireTime:
          description: >-
            plan-level incomplete/expire grace time after period/trial end
            (seconds); nil = fall back to merchant/system default; 0 = no grace
            period, expire immediately after period/trial end.
          format: '*int64'
          properties: {}
          type: integer
      type: object
    interface:
      properties: {}
      type: object
    unibee.api.bean.PlanMetricLimitParam:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMetricMeteredChargeParam:
      properties:
        chargeType:
          description: ChargeType,0-standard pricing 1-graduated pricing
          format: int
          properties: {}
          type: integer
        graduatedAmounts:
          description: GraduatedAmounts, used for graduated pricing
          format: '[]*bean.MetricPlanChargeGraduatedStep'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
          properties: {}
          type: array
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        standardAmount:
          description: StandardAmount, cent, used for standard pricing,cent
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: StandardStartValue, used for standard pricing
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMultiCurrency:
      properties:
        amount:
          description: >-
            exchanged amount preview for this plan & currency; plan-level
            override not available in billing logic
          format: int64
          properties: {}
          type: integer
        autoExchange:
          description: >-
            using https://app.exchangerate-api.com/ to update exchange rate if
            true, the exchange APIKey need setup first; plan-level override not
            available
          format: bool
          properties: {}
          type: boolean
        currency:
          description: target currency
          format: string
          properties: {}
          type: string
        disable:
          description: disable currency exchange for this plan & currency
          format: bool
          properties: {}
          type: boolean
        exchangeRate:
          description: >-
            exchange rate; plan-level override not available, real billing FX
            always comes from merchant's multi-currency config
          format: float64
          properties: {}
          type: number
        fixedAmount:
          description: >-
            locked billing amount for this plan & currency; when > 0, locks the
            main plan price only
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMultiTrial:
      properties:
        intervalCount:
          description: >-
            for stage 2+: must be > 0 when intervalUnit is set; for stage 1
            (index 0) used with intervalUnit to set TrialDurationTime at save
          format: int64
          properties: {}
          type: integer
        intervalUnit:
          description: >-
            for stage 2+: billing; for stage 1 (index 0) converted to plan
            TrialDurationTime at save (day/week/month≈30d/year≈365d)
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: >-
            optional metadata for this trial stage; persisted to subscription
            multi-trial snapshot and exposed in webhook payloads
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: >-
            optional display name for this trial stage; when set, used instead
            of plan name in multi-trial invoices
          format: string
          properties: {}
          type: string
        trialCompareAtPrice:
          description: >-
            optional compare-at / strikethrough display price in minor units
            (plan currency); UI only, not used in billing
          format: int64
          properties: {}
          type: integer
        trialDuration:
          description: >-
            trial duration in seconds; first stage: at least 86400 unless valid
            intervalUnit+intervalCount is set
          format: int64
          properties: {}
          type: integer
        trialPrice:
          description: >-
            trial price; only the first trial is allowed to be 0, subsequent
            trials must be > 0
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.USVATConfig:
      properties:
        active:
          format: bool
          properties: {}
          type: boolean
        fromAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        nexusAddresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
        sellOnUSOnly:
          format: bool
          properties: {}
          type: boolean
        taxCode:
          format: string
          properties: {}
          type: string
        toAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
      type: object
    unibee.api.bean.SubscriptionMultiTrial:
      properties:
        currency:
          format: string
          properties: {}
          type: string
        currentIndex:
          format: int
          properties: {}
          type: integer
        finished:
          format: bool
          properties: {}
          type: boolean
        planId:
          format: int64
          properties: {}
          type: integer
        regularPrice:
          description: >-
            main plan recurring total ex tax in subscription currency; API only,
            not in link
          format: int64
          properties: {}
          type: integer
        startedAt:
          format: int64
          properties: {}
          type: integer
        trials:
          format: '[]*bean.SubscriptionMultiTrialItem'
          items:
            $ref: '#/components/schemas/unibee.api.bean.SubscriptionMultiTrialItem'
          properties: {}
          type: array
        version:
          format: int
          properties: {}
          type: integer
      type: object
    unibee.internal.logic.middleware.license.Plan:
      properties:
        amount:
          format: '*int64'
          properties: {}
          type: integer
        bindingAddonIds:
          format: '*string'
          properties: {}
          type: string
        bindingOnetimeAddonIds:
          format: '*string'
          properties: {}
          type: string
        cancelAtTrialEnd:
          format: '*int32'
          properties: {}
          type: integer
        createTime:
          format: '*int64'
          properties: {}
          type: integer
        currency:
          format: '*string'
          properties: {}
          type: string
        description:
          format: '*string'
          properties: {}
          type: string
        externalPlanId:
          format: '*string'
          properties: {}
          type: string
        extraMetricData:
          format: '*string'
          properties: {}
          type: string
        gasPayer:
          format: '*string'
          properties: {}
          type: string
        homeUrl:
          format: '*string'
          properties: {}
          type: string
        id:
          format: '*int64'
          properties: {}
          type: integer
        imageUrl:
          format: '*string'
          properties: {}
          type: string
        intervalCount:
          format: '*int32'
          properties: {}
          type: integer
        intervalUnit:
          format: '*string'
          properties: {}
          type: string
        merchantId:
          format: '*int64'
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: '*map[string]interface {}'
          properties: {}
          type: object
        planName:
          format: '*string'
          properties: {}
          type: string
        productId:
          format: '*int64'
          properties: {}
          type: integer
        publishStatus:
          format: '*int32'
          properties: {}
          type: integer
        status:
          format: '*int32'
          properties: {}
          type: integer
        taxPercentage:
          format: '*int32'
          properties: {}
          type: integer
        trialAmount:
          format: '*int64'
          properties: {}
          type: integer
        trialDemand:
          format: '*string'
          properties: {}
          type: string
        trialDurationTime:
          format: '*int64'
          properties: {}
          type: integer
        type:
          format: '*int32'
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MetricPlanChargeGraduatedStep:
      properties:
        endValue:
          description: EndValue, -1 = infinity value(∞)
          format: int64
          properties: {}
          type: integer
        flatAmount:
          description: FlatAmount,cent
          format: int64
          properties: {}
          type: integer
        perAmount:
          description: PerAmount,cent
          format: int64
          properties: {}
          type: integer
        startValue:
          description: StartValue
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.USAddress:
      properties:
        address:
          format: string
          properties: {}
          type: string
        city:
          format: string
          properties: {}
          type: string
        countryCode:
          format: string
          properties: {}
          type: string
        state:
          format: string
          properties: {}
          type: string
        verified:
          format: bool
          properties: {}
          type: boolean
        zipCode:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.SubscriptionMultiTrialItem:
      properties:
        compareAtPrice:
          description: >-
            optional compare-at / strikethrough (same currency as Price); UI
            only
          format: int64
          properties: {}
          type: integer
        duration:
          format: int64
          properties: {}
          type: integer
        intervalCount:
          format: int64
          properties: {}
          type: integer
        intervalUnit:
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          format: string
          properties: {}
          type: string
        price:
          format: int64
          properties: {}
          type: integer
      type: object
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````