components:
  schemas:
    github.com.gogf.gf.v2.encoding.gjson.Json:
      properties: {}
      type: object
    interface:
      properties: {}
      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
    unibee.api.bean.CheckoutSignIn:
      properties:
        DuplicateSubscription:
          description: whether contain active or incomplete subscription or not
          format: bool
          properties: {}
          type: boolean
        redirect:
          description: should redirect to sign in page
          format: bool
          properties: {}
          type: boolean
        url:
          description: redirect url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.CreditAccount:
      properties:
        amount:
          description: credit amount, in cent if type is main
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        currencyAmount:
          description: currency amount, in cent
          format: int64
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，multiply by 100 saved, 1 currency =
            1 credit * (exchange_rate/100), main account fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        payoutEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        rechargeEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        totalDecrementAmount:
          description: the total decrement amount
          format: int64
          properties: {}
          type: integer
        totalIncrementAmount:
          description: the total increment amount
          format: int64
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-gift account
          format: int
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.CreditConfig:
      properties:
        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
        discountCodeExclusive:
          description: discount code exclusive when purchase, default no, 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，multiply by 100 saved, 1 currency =
            1 credit * (exchange_rate/100), main account fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        logo:
          description: logo image base64, show when user purchase
          format: string
          properties: {}
          type: string
        logoUrl:
          description: logo url, show when user purchase
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        payoutEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        previewDefaultUsed:
          description: is default used when in purchase preview, default no, 0-no,
            1-yes
          format: int
          properties: {}
          type: integer
        rechargeEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        recurring:
          description: apply to recurring, default no, 0-no,1-yes
          format: int
          properties: {}
          type: integer
        totalDecrementAmount:
          description: the total decrement amount
          format: int64
          properties: {}
          type: integer
        totalIncrementAmount:
          description: the total increment amount
          format: int64
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-promo credit account
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.CreditConfigStatistics:
      properties:
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        totalDecrementAmount:
          description: the total decrement amount
          format: int64
          properties: {}
          type: integer
        totalIncrementAmount:
          description: the total increment amount
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.CreditPayout:
      properties:
        creditAmount:
          description: credit amount, scale = 100
          format: int64
          properties: {}
          type: integer
        currencyAmount:
          description: currency amount,cent
          format: int64
          properties: {}
          type: integer
        exchangeRate:
          description: exchange rate, keep two decimal places，scale = 100, 1 currency
            = 1 credit * (exchange_rate/100), main account fixed rate to 100
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.CreditRecharge:
      properties:
        accountType:
          description: type of credit account, 1-main recharge account, 2-promo credit
            account
          format: int
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        creditId:
          description: id of credit account
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: recharge description
          format: string
          properties: {}
          type: string
        gatewayId:
          description: payment gateway id
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice_id
          format: string
          properties: {}
          type: string
        name:
          description: recharge name
          format: string
          properties: {}
          type: string
        paidTime:
          description: paid time
          format: int64
          properties: {}
          type: integer
        paymentAmount:
          description: the payment amount for recharge
          format: string
          properties: {}
          type: string
        paymentId:
          description: paymentId
          format: string
          properties: {}
          type: string
        rechargeId:
          description: unique recharge id for credit account
          format: string
          properties: {}
          type: string
        rechargeStatus:
          description: recharge status, 10-in charging，20-recharge success，30-recharge
            failed
          format: int
          properties: {}
          type: integer
        totalAmount:
          description: recharge total amount, cent
          format: int64
          properties: {}
          type: integer
        totalRefundAmount:
          description: total refund amount,cent
          format: int64
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.CreditTransaction:
      properties:
        accountType:
          description: type of credit account, 1-main recharge account, 2-promo credit
            account
          format: int
          properties: {}
          type: integer
        bizId:
          description: business id
          format: string
          properties: {}
          type: string
        by:
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        creditAmountAfter:
          description: the credit amount after transaction,cent
          format: int64
          properties: {}
          type: integer
        creditAmountBefore:
          description: the credit amount before transaction,cent
          format: int64
          properties: {}
          type: integer
        creditId:
          description: id of credit account
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        deltaAmount:
          description: delta amount,cent
          format: int64
          properties: {}
          type: integer
        deltaCurrencyAmount:
          description: delta currency amount, in cent
          format: int64
          properties: {}
          type: integer
        description:
          description: recharge transaction description
          format: string
          properties: {}
          type: string
        exchangeRate:
          description: ExchangeRate for transaction, keep two decimal places，multiply
            by 100 saved, 1 currency = 1 credit * (exchange_rate/100), main account
            fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice_id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        name:
          description: recharge transaction title
          format: string
          properties: {}
          type: string
        transactionId:
          description: unique id for timeline
          format: string
          properties: {}
          type: string
        transactionType:
          description: transaction type。1-recharge income，2-payment out，3-refund income，4-withdraw
            out，5-withdraw failed income, 6-admin change，7-recharge refund out
          format: int
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.Currency:
      properties:
        Currency:
          format: string
          properties: {}
          type: string
        Scale:
          format: int
          properties: {}
          type: integer
        Symbol:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.EmailGatewayConnectionAPIKeys:
      properties:
        apiKey:
          description: The API key of Email Gateway, used for sendgrid
          format: string
          properties: {}
          type: string
        apiSecret:
          description: The API key of Email Gateway
          format: string
          properties: {}
          type: string
        authType:
          description: The auth type
          format: string
          properties: {}
          type: string
        oauthToken:
          description: The OAuth token of Email Gateway
          format: string
          properties: {}
          type: string
        password:
          description: The password of Email Gateway
          format: string
          properties: {}
          type: string
        skipTLSVerify:
          description: Skip TLS verification
          format: bool
          properties: {}
          type: boolean
        smtpHost:
          description: The SMTP host
          format: string
          properties: {}
          type: string
        smtpPort:
          description: The SMTP port
          format: int
          properties: {}
          type: integer
        useTLS:
          description: The use TLS
          format: bool
          properties: {}
          type: boolean
        username:
          description: The username of Email Gateway
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.EmailGatewayConnectionAPIKeysUpdate:
      properties:
        apiKey:
          description: The API key of Email Gateway, used for sendgrid
          format: '*string'
          properties: {}
          type: string
        apiSecret:
          description: The API key of Email Gateway
          format: '*string'
          properties: {}
          type: string
        authType:
          description: The auth type
          format: '*string'
          properties: {}
          type: string
        oauthToken:
          description: The OAuth token of Email Gateway
          format: '*string'
          properties: {}
          type: string
        password:
          description: The password of Email Gateway
          format: '*string'
          properties: {}
          type: string
        skipTLSVerify:
          description: Skip TLS verification
          format: '*bool'
          properties: {}
          type: boolean
        smtpHost:
          description: The SMTP host
          format: '*string'
          properties: {}
          type: string
        smtpPort:
          description: The SMTP port
          format: '*int'
          properties: {}
          type: integer
        useTLS:
          description: The use TLS
          format: '*bool'
          properties: {}
          type: boolean
        username:
          description: The username of Email Gateway
          format: '*string'
          properties: {}
          type: string
      type: object
    unibee.api.bean.EmailLocalizationTemplate:
      properties:
        content:
          format: string
          properties: {}
          type: string
        language:
          format: string
          properties: {}
          type: string
        title:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.EventMetricCharge:
      properties:
        chargeAmount:
          description: ChargeAmount
          format: int64
          properties: {}
          type: integer
        chargePricing:
          $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        currentValue:
          description: CurrentUsedValue
          format: int64
          properties: {}
          type: integer
        graduatedStep:
          $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        totalChargeAmount:
          description: TotalChargeAmount
          format: int64
          properties: {}
          type: integer
        unitAmount:
          description: UnitAmount
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.ExternalDiscountParam:
      properties:
        cycleLimit:
          description: the count limitation of subscription recurring cycle, recurring
            need enable if cycleLimit set
          format: '*int'
          properties: {}
          type: integer
        discountAmount:
          description: Amount of discount
          format: '*int64'
          properties: {}
          type: integer
        discountPercentage:
          description: Percentage of discount, 100=1%, ignore if discountAmount set
          format: '*int64'
          properties: {}
          type: integer
        endTime:
          description: end of discount available utc time
          format: '*int64'
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        recurring:
          description: Discount recurring enable, default false
          format: '*bool'
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.GatewayCurrencyExchange:
      properties:
        exchange_amount:
          description: the exchange amount of gateway
          format: int64
          properties: {}
          type: integer
        exchange_rate:
          description: the exchange rate of gateway, set to 0 if using https://app.exchangerate-api.com/
            instead of fixed exchange rate
          format: float64
          properties: {}
          type: number
        from_currency:
          description: the currency of gateway exchange from
          format: string
          properties: {}
          type: string
        to_currency:
          description: the currency of gateway exchange to
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.GroupPlanIntervalSelector:
      properties:
        intervalCount:
          description: 'Number Of IntervalUnit，em: day|month|year|week'
          format: int
          properties: {}
          type: integer
        intervalUnit:
          description: 'Plan Interval Unit，em: day|month|year|week'
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.GroupPlanSelector:
      properties:
        currency:
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        groupPlanIntervalSelector:
          format: '[]*bean.GroupPlanIntervalSelector'
          items:
            $ref: '#/components/schemas/unibee.api.bean.GroupPlanIntervalSelector'
          properties: {}
          type: array
        type:
          description: 1-main plan，2-addon plan,3-onetime
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.bean.ImportProrationBase:
      properties:
        lastPaidAmount:
          description: Historical paid amount in minor units (cent), used directly
            as the proration credit base
          format: int64
          properties: {}
          type: integer
        startTime:
          description: Optional. Historical period start time (utc seconds). When
            > 0, overrides the proration window PeriodStart
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.Invoice:
      properties:
        PaymentMethodId:
          format: string
          properties: {}
          type: string
        autoCharge:
          description: Invoice auto-charge source flag. True means this invoice was
            created by system auto-renew/auto-billing flow (createFrom=AutoRenew).
            It does NOT guarantee the invoice was finally paid by system auto-charge.
          format: bool
          properties: {}
          type: boolean
        billingCycleAnchor:
          description: billing_cycle_anchor
          format: int64
          properties: {}
          type: integer
        bizType:
          description: biz type from payment 1-onetime payment, 3-subscription
          format: int
          properties: {}
          type: integer
        countryCode:
          format: string
          properties: {}
          type: string
        createFrom:
          description: create from
          format: string
          properties: {}
          type: string
        creditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        creditPayout:
          $ref: '#/components/schemas/unibee.api.bean.CreditPayout'
        cryptoAmount:
          description: crypto_amount, cent
          format: int64
          properties: {}
          type: integer
        cryptoCurrency:
          description: crypto_currency
          format: string
          properties: {}
          type: string
        currency:
          format: string
          properties: {}
          type: string
        data:
          format: string
          properties: {}
          type: string
        dayUtilDue:
          description: day util due after finish
          format: int64
          properties: {}
          type: integer
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          format: int64
          properties: {}
          type: integer
        discountCode:
          format: string
          properties: {}
          type: string
        finishTime:
          format: int64
          properties: {}
          type: integer
        gatewayId:
          format: int64
          properties: {}
          type: integer
        id:
          format: int64
          properties: {}
          type: integer
        invoiceId:
          format: string
          properties: {}
          type: string
        invoiceName:
          format: string
          properties: {}
          type: string
        lines:
          format: '[]*bean.InvoiceItemSimplify'
          items:
            $ref: '#/components/schemas/unibee.api.bean.InvoiceItemSimplify'
          properties: {}
          type: array
        link:
          description: invoice link
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        originAmount:
          format: int64
          properties: {}
          type: integer
        paidTime:
          description: settlement utc time (seconds)
          format: int64
          properties: {}
          type: integer
        partialCreditPaidAmount:
          description: partial credit paid amount
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: paymentId
          format: string
          properties: {}
          type: string
        paymentLink:
          description: invoice payment link
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
        periodEnd:
          format: int64
          properties: {}
          type: integer
        periodStart:
          format: int64
          properties: {}
          type: integer
        planSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.InvoicePlanSnapshot'
        productName:
          format: string
          properties: {}
          type: string
        promoCreditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        promoCreditDiscountAmount:
          description: promo credit discount amount
          format: int64
          properties: {}
          type: integer
        promoCreditPayout:
          $ref: '#/components/schemas/unibee.api.bean.CreditPayout'
        promoCreditTransaction:
          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
        prorationDate:
          format: int64
          properties: {}
          type: integer
        prorationScale:
          format: int64
          properties: {}
          type: integer
        refundId:
          description: refundId
          format: string
          properties: {}
          type: string
        sendNote:
          description: send_note
          format: string
          properties: {}
          type: string
        sendStatus:
          description: email send status，0-No | 1- YES| 2-Unnecessary
          format: int
          properties: {}
          type: integer
        status:
          description: status，1-pending｜2-processing｜3-paid | 4-failed | 5-cancelled
          format: int
          properties: {}
          type: integer
        subscriptionAmount:
          format: int64
          properties: {}
          type: integer
        subscriptionAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
        taxAmount:
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        totalAmount:
          format: int64
          properties: {}
          type: integer
        totalAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        userMetricChargeForInvoice:
          $ref: '#/components/schemas/unibee.api.bean.UserMetricChargeInvoiceItemEntity'
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.InvoiceItemSimplify:
      properties:
        amount:
          format: int64
          properties: {}
          type: integer
        amountExcludingTax:
          format: int64
          properties: {}
          type: integer
        currency:
          format: string
          properties: {}
          type: string
        description:
          format: string
          properties: {}
          type: string
        discountAmount:
          format: int64
          properties: {}
          type: integer
        discountCode:
          format: string
          properties: {}
          type: string
        fromAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        lineId:
          format: string
          properties: {}
          type: string
        metricCharge:
          $ref: '#/components/schemas/unibee.api.bean.UserMetricChargeInvoiceItem'
        name:
          format: string
          properties: {}
          type: string
        nexusAddresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
        originAmount:
          format: int64
          properties: {}
          type: integer
        originUnitAmountExcludeTax:
          format: int64
          properties: {}
          type: integer
        pdfDescription:
          format: string
          properties: {}
          type: string
        periodEnd:
          format: int64
          properties: {}
          type: integer
        periodStart:
          format: int64
          properties: {}
          type: integer
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        planMetricChargeConfigs:
          description: Metric charge configurations bound to this plan/addon
          format: '[]*bean.InvoiceMetricCharge'
          items:
            $ref: '#/components/schemas/unibee.api.bean.InvoiceMetricCharge'
          properties: {}
          type: array
        planMetricLimitConfigs:
          description: Metric limit configurations bound to this plan/addon
          format: '[]*bean.InvoiceMetricLimit'
          items:
            $ref: '#/components/schemas/unibee.api.bean.InvoiceMetricLimit'
          properties: {}
          type: array
        proration:
          format: bool
          properties: {}
          type: boolean
        prorationDate:
          format: int64
          properties: {}
          type: integer
        prorationScale:
          format: int64
          properties: {}
          type: integer
        quantity:
          format: int64
          properties: {}
          type: integer
        tax:
          format: int64
          properties: {}
          type: integer
        taxCode:
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: Tax Percentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        toAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        unitAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
        ustaxAlert:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.InvoiceMetricCharge:
      properties:
        chargeType:
          description: 'Charge type: 0-standard pricing, 1-graduated pricing'
          format: int
          properties: {}
          type: integer
        metricCode:
          description: Metric code
          format: string
          properties: {}
          type: string
        metricId:
          description: Metric ID
          format: int64
          properties: {}
          type: integer
        metricName:
          description: Metric name
          format: string
          properties: {}
          type: string
        metricType:
          description: 'Metric type: 2-charge_metered, 3-charge_recurring'
          format: int
          properties: {}
          type: integer
        standardAmount:
          description: Standard amount per unit (cent), used when chargeType=0
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: Start value for standard pricing
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.InvoiceMetricLimit:
      properties:
        metricCode:
          description: Metric code
          format: string
          properties: {}
          type: string
        metricId:
          description: Metric ID
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: Limit value for this metric
          format: int64
          properties: {}
          type: integer
        metricName:
          description: Metric name
          format: string
          properties: {}
          type: string
        metricType:
          description: 'Metric type: 1-limit_metered, 4-limit_recurring'
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.InvoicePlanSnapshot:
      properties:
        addons:
          description: Addons associated with the current plan.
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        autoCharge:
          description: Invoice source flag. True means the invoice snapshot comes
            from system auto-renew/auto-billing flow (createFrom=AutoRenew), not the
            final payment result.
          format: bool
          properties: {}
          type: boolean
        chargeType:
          description: 'Billing charge type. 0: One-time, 1: New Subscription, 2:
            Upgrade, 3: Downgrade, 4: Renewal, 5: Billing Cycle Charge.'
          format: bean.InvoiceSnapshotChargeType
          properties: {}
          type: integer
        multiCurrencySnapshot:
          $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrencySnapshot'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        previousAddons:
          description: Addons from the previous plan, relevant for upgrade or downgrade
            (paidType = 2 or 3).
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        previousPlan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
      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.MerchantBatchDiscountCode:
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set true
          format: bool
          properties: {}
          type: boolean
        billingType:
          description: billing_type, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        childCodeCount:
          description: Number of generated child codes
          format: int64
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        codePrefix:
          description: codePrefix
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of discount, available when discount_type is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: the count limitation of subscription cycle , 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: amount of discount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: percentage of discount, 100=1%, available when discount_type
            is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: end of discount available utc time, 0-invalid
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: Invoice ID where the code was used
          format: string
          properties: {}
          type: string
        isDeleted:
          description: 0-UnDeleted，> 0, Deleted, the deleted utc time
          format: int
          properties: {}
          type: integer
        isRedeemed:
          description: Whether the code has been redeemed
          format: bool
          properties: {}
          type: boolean
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        parentTemplateCode:
          description: parentTemplateCode
          format: string
          properties: {}
          type: string
        paymentId:
          description: Payment ID where the code was used
          format: string
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups(Billing Period
            Included), 4-Apply to Plans except by Groups(Billing Period Included)
          format: int
          properties: {}
          type: integer
        planId:
          description: Plan ID from subscription where this code was used
          format: int64
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planName:
          description: Plan name from subscription where this code was used
          format: string
          properties: {}
          type: string
        quantity:
          description: quantity of code, 0-no limit
          format: int64
          properties: {}
          type: integer
        redeemedAt:
          description: UTC timestamp when code was redeemed, 0 if not redeemed
          format: int64
          properties: {}
          type: integer
        redeemedByEmail:
          description: Email of user who redeemed the code
          format: string
          properties: {}
          type: string
        startTime:
          description: start of discount available utc time
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-editable, 2-active, 3-deactivate, 4-expire, 10-archive
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: Subscription ID where the code was used
          format: string
          properties: {}
          type: string
        type:
          description: type, 1-external discount code, 2-batch code template, 3-batch
            code
          format: int
          properties: {}
          type: integer
        upgradeLongerOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except upgrade
            to longer plan if set true
          format: bool
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except same
            interval upgrade action if set true
          format: bool
          properties: {}
          type: boolean
        usedChildCodeCount:
          description: Number of used child codes
          format: int64
          properties: {}
          type: integer
        userEmail:
          description: Email of the user this child code is bound to, empty if no
            restriction
          format: string
          properties: {}
          type: string
        userId:
          description: Id of user this child code is bound to (user restriction),
            0 if no restriction
          format: int64
          properties: {}
          type: integer
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited
          format: int
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantBatchDiscountCodeTemplate:
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set true
          format: bool
          properties: {}
          type: boolean
        billingType:
          description: billing_type, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        childCodeCount:
          description: Number of generated child codes
          format: int64
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        codePrefix:
          description: codePrefix
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of discount, available when discount_type is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: the count limitation of subscription cycle , 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: amount of discount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: percentage of discount, 100=1%, available when discount_type
            is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: end of discount available utc time, 0-invalid
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        isDeleted:
          description: 0-UnDeleted，> 0, Deleted, the deleted utc time
          format: int
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups(Billing Period
            Included), 4-Apply to Plans except by Groups(Billing Period Included)
          format: int
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: quantity of code, 0-no limit
          format: int64
          properties: {}
          type: integer
        startTime:
          description: start of discount available utc time
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-editable, 2-active, 3-deactivate, 4-expire, 10-archive
          format: int
          properties: {}
          type: integer
        type:
          description: type, 1-external discount code, 2-batch code template, 3-batch
            code
          format: int
          properties: {}
          type: integer
        upgradeLongerOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except upgrade
            to longer plan if set true
          format: bool
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except same
            interval upgrade action if set true
          format: bool
          properties: {}
          type: boolean
        usedChildCodeCount:
          description: Number of used child codes
          format: int64
          properties: {}
          type: integer
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited
          format: int
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantBatchExportTemplate:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        exportColumns:
          description: ExportColumns, the export file column list, will export all
            columns if not specified
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        format:
          description: The format of export file, xlsx|csv, will be xlsx if not specified
          format: string
          properties: {}
          type: string
        memberId:
          description: member_id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        name:
          description: name
          format: string
          properties: {}
          type: string
        payload:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Payload
          format: map[string]interface {}
          properties: {}
          type: object
        task:
          description: Task,InvoiceExport|UserExport|SubscriptionExport|TransactionExport|DiscountExport|UserDiscountExport|PlanExport
          format: string
          properties: {}
          type: string
        templateId:
          description: templateId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantBatchTask:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        downloadUrl:
          description: download_file_url
          format: string
          properties: {}
          type: string
        failureReason:
          description: reason of failure
          format: string
          properties: {}
          type: string
        finishTime:
          description: task_finish_time
          format: int64
          properties: {}
          type: integer
        format:
          description: format of file
          format: string
          properties: {}
          type: string
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        lastUpdateTime:
          description: last update utc time
          format: int64
          properties: {}
          type: integer
        memberId:
          description: member_id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        payload:
          description: payload(json)
          format: string
          properties: {}
          type: string
        startTime:
          description: task_start_time
          format: int64
          properties: {}
          type: integer
        status:
          description: Status。0-Pending，1-Processing，2-Success，3-Failure
          format: int
          properties: {}
          type: integer
        successCount:
          description: success_count
          format: int64
          properties: {}
          type: integer
        taskCost:
          description: task cost time(second)
          format: int
          properties: {}
          type: integer
        taskName:
          description: task_name
          format: string
          properties: {}
          type: string
        taskType:
          description: type，0-download，1-upload
          format: int
          properties: {}
          type: integer
        uploadFileUrl:
          description: the file url of upload type task
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantCheckout:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        data:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout config data
          format: map[string]interface {}
          properties: {}
          type: object
        description:
          description: description
          format: string
          properties: {}
          type: string
        id:
          description: ID
          format: int64
          properties: {}
          type: integer
        isDefault:
          description: is default
          format: bool
          properties: {}
          type: boolean
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        name:
          description: name
          format: string
          properties: {}
          type: string
        stagingData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout staging config data
          format: map[string]interface {}
          properties: {}
          type: object
        updateTime:
          description: update utc time
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantCountryConfig:
      properties:
        countryCode:
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        name:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantCurrencyConfig:
      properties:
        autoExchange:
          description: using https://app.exchangerate-api.com/ to update exchange
            rate if true, the exchange APIKey need setup first
          format: bool
          properties: {}
          type: boolean
        currency:
          description: target currency
          format: string
          properties: {}
          type: string
        exchangeRate:
          description: the exchange rate of gateway, no setup required if AutoExchange
            is true
          format: float64
          properties: {}
          type: number
      type: object
    unibee.api.bean.MerchantDiscountCode:
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set true
          format: bool
          properties: {}
          type: boolean
        billingType:
          description: billing_type, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of discount, available when discount_type is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: the count limitation of subscription cycle , 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: amount of discount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: percentage of discount, 100=1%, available when discount_type
            is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: end of discount available utc time, 0-invalid
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        isDeleted:
          description: 0-UnDeleted，> 0, Deleted, the deleted utc time
          format: int
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups(Billing Period
            Included), 4-Apply to Plans except by Groups(Billing Period Included)
          format: int
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: quantity of code, 0-no limit
          format: int64
          properties: {}
          type: integer
        startTime:
          description: start of discount available utc time
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-editable, 2-active, 3-deactivate, 4-expire, 10-archive
          format: int
          properties: {}
          type: integer
        upgradeLongerOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except upgrade
            to longer plan if set true
          format: bool
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except same
            interval upgrade action if set true
          format: bool
          properties: {}
          type: boolean
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited
          format: int
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantEmailTemplate:
      properties:
        VariableGroups:
          format: '[]*bean.TemplateVariableGroup'
          items:
            $ref: '#/components/schemas/unibee.api.bean.TemplateVariableGroup'
          properties: {}
          type: array
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gatewayTemplateId:
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        languageData:
          format: '[]*bean.EmailLocalizationTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.EmailLocalizationTemplate'
          properties: {}
          type: array
        localizationVersions:
          format: '[]*bean.MerchantLocalizationVersion'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationVersion'
          properties: {}
          type: array
        merchantId:
          format: int64
          properties: {}
          type: integer
        status:
          format: string
          properties: {}
          type: string
        templateAttachName:
          format: string
          properties: {}
          type: string
        templateContent:
          format: string
          properties: {}
          type: string
        templateDescription:
          format: string
          properties: {}
          type: string
        templateName:
          format: string
          properties: {}
          type: string
        templateTitle:
          format: string
          properties: {}
          type: string
        updateTime:
          description: update utc time
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantLocalizationEmailTemplate:
      properties:
        activate:
          format: bool
          properties: {}
          type: boolean
        attach:
          format: string
          properties: {}
          type: string
        localizations:
          format: '[]*bean.EmailLocalizationTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.EmailLocalizationTemplate'
          properties: {}
          type: array
        templateDescription:
          format: string
          properties: {}
          type: string
        templateName:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantLocalizationVersion:
      properties:
        activate:
          format: bool
          properties: {}
          type: boolean
        localizations:
          format: '[]*bean.EmailLocalizationTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.EmailLocalizationTemplate'
          properties: {}
          type: array
        versionId:
          format: string
          properties: {}
          type: string
        versionName:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantMember:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        email:
          description: email
          format: string
          properties: {}
          type: string
        firstName:
          description: first name
          format: string
          properties: {}
          type: string
        id:
          description: userId
          format: int64
          properties: {}
          type: integer
        isOwner:
          description: Check Member is Owner
          format: bool
          properties: {}
          type: boolean
        lastName:
          description: last name
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantMemberDevice:
      properties:
        currentDevice:
          description: Is CurrentDevice
          format: bool
          properties: {}
          type: boolean
        identity:
          description: Identity
          format: string
          properties: {}
          type: string
        ipAddress:
          description: IP Address
          format: string
          properties: {}
          type: string
        lastActiveTime:
          description: Last Active Time
          format: int64
          properties: {}
          type: integer
        lastLoginTime:
          description: Last Login Time
          format: int64
          properties: {}
          type: integer
        lastTotpVerificationTime:
          description: Last Totp Verification Time
          format: int64
          properties: {}
          type: integer
        name:
          description: Name
          format: string
          properties: {}
          type: string
        status:
          description: true-Active, false-Offline
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.MerchantMetric:
      properties:
        aggregationProperty:
          description: aggregation property
          format: string
          properties: {}
          type: string
        aggregationType:
          description: 1-count，2-count unique, 3-latest, 4-max, 5-sum
          format: int
          properties: {}
          type: integer
        archived:
          description: archived
          format: bool
          properties: {}
          type: boolean
        carryoverProrationEnabled:
          description: Enable carryover proration for this metric (false when not
            set)
          format: bool
          properties: {}
          type: boolean
        code:
          description: code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gmtModify:
          description: update time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: map[string]interface {}
          properties: {}
          type: object
        metricDescription:
          description: metric description
          format: string
          properties: {}
          type: string
        metricName:
          description: metric name
          format: string
          properties: {}
          type: string
        prorationRefundEnabled:
          description: Enable proration refund for this metric, i.e. reclaim metric
            limit on upgrade (false when not set)
          format: bool
          properties: {}
          type: boolean
        type:
          description: 1-limit_metered，2-charge_metered，3-charge_recurring，4-limit_recurring
          format: int
          properties: {}
          type: integer
        unit:
          description: unit
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantMetricEvent:
      properties:
        aggregationPropertyData:
          description: aggregation property data (Json)
          format: string
          properties: {}
          type: string
        aggregationPropertyInt:
          description: aggregation property int, use for metric of max|sum type
          format: int64
          properties: {}
          type: integer
        aggregationPropertyString:
          description: aggregation property string, use for metric of count|count_unique
            type
          format: string
          properties: {}
          type: string
        chargeInvoiceId:
          description: charge invoice id
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        eventCharge:
          $ref: '#/components/schemas/unibee.api.bean.EventMetricCharge'
        externalEventId:
          description: external_event_id, should be unique
          format: string
          properties: {}
          type: string
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metricId:
          description: metric_id
          format: int64
          properties: {}
          type: integer
        metricLimit:
          format: int64
          properties: {}
          type: integer
        subscriptionIds:
          format: string
          properties: {}
          type: string
        subscriptionPeriodEnd:
          description: matched subscription's current_period_end
          format: int64
          properties: {}
          type: integer
        subscriptionPeriodStart:
          description: matched subscription's current_period_start
          format: int64
          properties: {}
          type: integer
        used:
          format: int64
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantMultiCurrencyConfig:
      properties:
        currencyConfigs:
          format: '[]*bean.MerchantCurrencyConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantCurrencyConfig'
          properties: {}
          type: array
        defaultCurrency:
          format: string
          properties: {}
          type: string
        lastUpdateTime:
          description: Last Update UTC Time
          format: int64
          properties: {}
          type: integer
        name:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantProfile:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        companyLogo:
          description: company_logo
          format: string
          properties: {}
          type: string
        companyName:
          description: company_name
          format: string
          properties: {}
          type: string
        companyRegistryCode:
          description: Country Registry Code
          format: string
          properties: {}
          type: string
        companyVatNumber:
          description: Country Vat Number
          format: string
          properties: {}
          type: string
        countryCode:
          description: Country Code
          format: string
          properties: {}
          type: string
        countryName:
          description: Country Name
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        email:
          description: email
          format: string
          properties: {}
          type: string
        homeUrl:
          format: string
          properties: {}
          type: string
        host:
          description: merchant user portal host
          format: string
          properties: {}
          type: string
        id:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        location:
          description: location
          format: string
          properties: {}
          type: string
        name:
          description: name
          format: string
          properties: {}
          type: string
        phone:
          description: phone
          format: string
          properties: {}
          type: string
        timeZone:
          description: merchant default time zone
          format: string
          properties: {}
          type: string
        type:
          description: type
          format: int
          properties: {}
          type: integer
        userId:
          description: create_user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantRole:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        permissions:
          description: permissions
          format: '[]*bean.MerchantRolePermission'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRolePermission'
          properties: {}
          type: array
        role:
          description: role
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantRolePermission:
      properties:
        group:
          description: Group
          format: string
          properties: {}
          type: string
        permissions:
          description: Permissions
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.bean.MerchantUsVatGatewayCalculateHistory:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gatewayName:
          description: gateway_name
          format: string
          properties: {}
          type: string
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        mark:
          description: mamo
          format: string
          properties: {}
          type: string
        request:
          description: request(json)
          format: string
          properties: {}
          type: string
        requestId:
          description: request_id
          format: string
          properties: {}
          type: string
        response:
          description: response(json)
          format: string
          properties: {}
          type: string
        userId:
          description: user id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantUserBatchTask:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        downloadUrl:
          description: download_file_url
          format: string
          properties: {}
          type: string
        failureReason:
          description: reason of failure
          format: string
          properties: {}
          type: string
        finishTime:
          description: task_finish_time
          format: int64
          properties: {}
          type: integer
        format:
          description: format of file
          format: string
          properties: {}
          type: string
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        lastUpdateTime:
          description: last update utc time
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        payload:
          description: payload(json)
          format: string
          properties: {}
          type: string
        startTime:
          description: task_start_time
          format: int64
          properties: {}
          type: integer
        status:
          description: Status。0-Pending，1-Processing，2-Success，3-Failure
          format: int
          properties: {}
          type: integer
        successCount:
          description: success_count
          format: int64
          properties: {}
          type: integer
        taskCost:
          description: task cost time(second)
          format: int
          properties: {}
          type: integer
        taskName:
          description: task_name
          format: string
          properties: {}
          type: string
        taskType:
          description: type，0-download，1-upload
          format: int
          properties: {}
          type: integer
        uploadFileUrl:
          description: the file url of upload type task
          format: string
          properties: {}
          type: string
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantVatNumberVerifyHistory:
      properties:
        companyAddress:
          description: company_address
          format: string
          properties: {}
          type: string
        companyName:
          description: company_name
          format: string
          properties: {}
          type: string
        countryCode:
          description: country_code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        manualValidate:
          description: manual_validate
          format: bool
          properties: {}
          type: boolean
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 0-Invalid，1-Valid
          format: int64
          properties: {}
          type: integer
        validateGateway:
          description: validate_gateway
          format: string
          properties: {}
          type: string
        validateMessage:
          description: validate_message
          format: string
          properties: {}
          type: string
        vatNumber:
          description: vat_number
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantVatRule:
      properties:
        gatewayNames:
          format: string
          properties: {}
          type: string
        ignoreVatNumber:
          format: bool
          properties: {}
          type: boolean
        taxPercentage:
          format: '*int64'
          properties: {}
          type: integer
        validCountryCodes:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantWebhookEndpoint:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gmtModify:
          description: update time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: webhook url
          format: int64
          properties: {}
          type: integer
        productIds:
          description: product id filter, empty means all products, 0 means default
            product
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        type:
          description: webhook type,0-Webhook,1-zapier
          format: int
          properties: {}
          type: integer
        webhookEvents:
          description: webhook_events,split dot
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        webhookUrl:
          description: webhook url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantWebhookLog:
      properties:
        body:
          description: body(json)
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        endpointId:
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        mamo:
          description: mamo
          format: string
          properties: {}
          type: string
        merchantId:
          description: webhook url
          format: int64
          properties: {}
          type: integer
        reconsumeCount:
          format: int
          properties: {}
          type: integer
        requestId:
          description: request_id
          format: string
          properties: {}
          type: string
        response:
          description: response
          format: string
          properties: {}
          type: string
        webhookEvent:
          description: webhook_event
          format: string
          properties: {}
          type: string
        webhookUrl:
          description: webhook url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.MerchantZapierCredential:
      properties:
        endpointIds:
          description: Zapier endpoint IDs (type=1)
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      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.MetricPlanChargeLine:
      properties:
        amount:
          description: Amount,cent
          format: int64
          properties: {}
          type: integer
        flatAmount:
          description: FlatAmount,cent
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Quantity
          format: int64
          properties: {}
          type: integer
        step:
          description: Step
          format: string
          properties: {}
          type: string
        unitAmount:
          description: UnitAmount,cent
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.NewUser:
      properties:
        address:
          description: Address
          format: string
          properties: {}
          type: string
        city:
          description: city
          format: string
          properties: {}
          type: string
        companyName:
          description: company name
          format: string
          properties: {}
          type: string
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        firstName:
          description: First Name
          format: string
          properties: {}
          type: string
        language:
          description: User Language, en|ru|cn|vi|bp
          format: string
          properties: {}
          type: string
        lastName:
          description: Last Name
          format: string
          properties: {}
          type: string
        phone:
          description: Phone
          format: string
          properties: {}
          type: string
        registrationNumber:
          description: RegistrationNumber
          format: string
          properties: {}
          type: string
        state:
          description: State
          format: string
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: int64
          properties: {}
          type: integer
        userName:
          description: UserName
          format: string
          properties: {}
          type: string
        vatNumber:
          description: vat number
          format: string
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.bean.Oauth:
      properties:
        email:
          format: string
          properties: {}
          type: string
        emailVerified:
          format: bool
          properties: {}
          type: boolean
        image:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        provider:
          format: string
          properties: {}
          type: string
        providerId:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.Payment:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        authorizeComment:
          format: string
          properties: {}
          type: string
        authorizeReason:
          description: gateway authorization or user-action hint
          format: string
          properties: {}
          type: string
        authorizeStatus:
          description: authorize status，0-waiting authorize，1-authorized，2-authorized_request
          format: int
          properties: {}
          type: integer
        autoCharge:
          description: 'Final system auto-charge result flag for this payment. True
            only when: automatic=1, gatewayPaymentMethod not empty, and no hosted
            payment link visit evidence (meta_data.plCount==0).'
          format: bool
          properties: {}
          type: boolean
        automatic:
          format: int
          properties: {}
          type: integer
        balanceAmount:
          description: balance_amount
          format: int64
          properties: {}
          type: integer
        billingReason:
          format: string
          properties: {}
          type: string
        cancelTime:
          description: cancel time, utc time
          format: int64
          properties: {}
          type: integer
        countryCode:
          description: country code
          format: string
          properties: {}
          type: string
        createTime:
          description: create time, utc time
          format: int64
          properties: {}
          type: integer
        cryptoAmount:
          description: crypto_amount, cent
          format: int64
          properties: {}
          type: integer
        cryptoCurrency:
          description: crypto_currency
          format: string
          properties: {}
          type: string
        currency:
          description: currency，“SGD” “MYR” “PHP” “IDR” “THB”
          format: string
          properties: {}
          type: string
        externalPaymentId:
          description: external_payment_id
          format: string
          properties: {}
          type: string
        failureReason:
          description: immutable reason captured when payment enters a terminal state
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        gatewayCurrencyExchange:
          $ref: '#/components/schemas/unibee.api.bean.GatewayCurrencyExchange'
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayPaymentId:
          description: gateway_payment_id
          format: string
          properties: {}
          type: string
        gatewayPaymentType:
          description: gateway_payment_type
          format: string
          properties: {}
          type: string
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        lastError:
          description: mutable latest gateway diagnostic error
          format: string
          properties: {}
          type: string
        link:
          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
        paidTime:
          description: paid time, utc time
          format: int64
          properties: {}
          type: integer
        paymentAmount:
          description: payment_amount
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: payment id
          format: string
          properties: {}
          type: string
        refundAmount:
          description: total refund amount
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: return url
          format: string
          properties: {}
          type: string
        splitSequence:
          description: split payment sequence，start from 1，0 = not spilit payment。The
            serial number is determined by the time of successful payment. The first
            one to successfully make the payment will be assigned serial number 1.
          format: int
          properties: {}
          type: integer
        status:
          description: status  10-pending，20-success，30-failure, 40-cancel
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        totalAmount:
          description: total amount
          format: int64
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PaymentItem:
      properties:
        amount:
          description: amount
          format: int64
          properties: {}
          type: integer
        bizType:
          description: biz_type 1-onetime payment, 3-subscription
          format: int
          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
        id:
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        name:
          description: name
          format: string
          properties: {}
          type: string
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        status:
          description: 0-pending, 1-success, 2-failure
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        uniqueId:
          description: unique id
          format: string
          properties: {}
          type: string
        unitAmount:
          description: unit_amount
          format: int64
          properties: {}
          type: integer
        userId:
          description: userId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PaymentMethod:
      properties:
        data:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        id:
          format: string
          properties: {}
          type: string
        isDefault:
          format: bool
          properties: {}
          type: boolean
        type:
          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.PlanAddonDetail:
      properties:
        addonPlan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        quantity:
          description: Quantity
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanAddonParam:
      properties:
        addonPlanId:
          description: AddonPlanId
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Quantity，Default 1
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMetricLimitOverrideParam:
      properties:
        metricCode:
          description: MetricCode, optional when metricId provided
          format: string
          properties: {}
          type: string
        metricId:
          description: MetricId, optional when metricCode provided
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
      required:
      - metricLimit
      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.PlanMultiCurrencyRate:
      properties:
        from:
          description: Source currency (plan default currency)
          format: string
          properties: {}
          type: string
        rate:
          description: Exchange rate from 'from' to 'to' at the time of billing
          format: float64
          properties: {}
          type: number
        to:
          description: Target charge currency (usually invoice currency)
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.PlanMultiCurrencySnapshot:
      properties:
        chargeCurrency:
          description: Invoice charge currency used for this snapshot
          format: string
          properties: {}
          type: string
        rates:
          description: FX rates from various default currencies into chargeCurrency
          format: '[]*bean.PlanMultiCurrencyRate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrencyRate'
          properties: {}
          type: array
      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.PlanProductParam:
      properties:
        description:
          description: Description
          format: string
          properties: {}
          type: string
        name:
          description: Name
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.PlanTagFilter:
      properties:
        mode:
          description: 'Tag match mode: any|all. Default any when tagIds is non-empty.'
          format: string
          properties: {}
          type: string
        tagIds:
          description: Plan tag ids. Omit planTagFilter or pass empty tagIds to skip
            tag filtering.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.bean.Product:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        description:
          description: description
          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
        isDeleted:
          description: 0-UnDeleted，1-Deleted
          format: int
          properties: {}
          type: integer
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metaData:
          description: meta_data(json)
          format: string
          properties: {}
          type: string
        productName:
          description: PlanName
          format: string
          properties: {}
          type: string
        status:
          description: status，1-active，2-inactive, default active
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      type: object
    unibee.api.bean.PublicDiscount:
      properties:
        currency:
          description: Discount currency, available when discountType is fixed_amount.
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: Subscription cycle count limit for this discount, 0 = no limit.
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: Configured discount amount, available when discountType is
            fixed_amount, minor units.
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: Configured discount percentage, 100 = 1%, available when discountType
            is percentage.
          format: int64
          properties: {}
          type: integer
        discountType:
          description: 1-percentage, 2-fixed_amount.
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PublicMerchant:
      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.PublicPlan:
      properties:
        amount:
          description: amount, cent, without tax
          format: int64
          properties: {}
          type: integer
        autoUpgradePlanId:
          description: Target plan id for auto-upgrade (non-sensitive relation id);
            0 if unset
          format: int64
          properties: {}
          type: integer
        bindingAddonIds:
          description: binded recurring addon planIds，split with , (non-sensitive
            relation ids)
          format: string
          properties: {}
          type: string
        bindingOnetimeAddonIds:
          description: binded onetime addon planIds，split with , (non-sensitive relation
            ids)
          format: string
          properties: {}
          type: string
        checkoutTemplateId:
          description: Checkout template id (non-sensitive relation id; checkoutUrl
            already derives from it)
          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
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          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
        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
        multiCurrencies:
          description: Plan's public MultiCurrencies
          format: '[]*bean.PublicPlanMultiCurrency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PublicPlanMultiCurrency'
          properties: {}
          type: array
        multiTrials:
          description: multi-step trials for this plan; metadata intentionally omitted
          format: '[]*bean.PublicPlanMultiTrial'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PublicPlanMultiTrial'
          properties: {}
          type: array
        planName:
          description: PlanName
          format: string
          properties: {}
          type: string
        productId:
          description: product id
          format: int64
          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.PublicUSVATConfig'
      type: object
    unibee.api.bean.PublicPlanAddonDetail:
      properties:
        addonPlan:
          $ref: '#/components/schemas/unibee.api.bean.PublicPlan'
        quantity:
          description: Quantity
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PublicPlanMultiCurrency:
      properties:
        amount:
          description: exchanged amount preview for this plan & currency
          format: int64
          properties: {}
          type: integer
        currency:
          description: target currency
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.PublicPlanMultiTrial:
      properties:
        intervalCount:
          description: 'for stage 2+: must be > 0 when intervalUnit is set'
          format: int64
          properties: {}
          type: integer
        intervalUnit:
          description: 'for stage 2+: billing; for stage 1 converted to TrialDurationTime'
          format: string
          properties: {}
          type: string
        name:
          description: optional display name for this trial stage
          format: string
          properties: {}
          type: string
        trialCompareAtPrice:
          description: optional compare-at / strikethrough display price in minor
            units
          format: int64
          properties: {}
          type: integer
        trialDuration:
          description: trial duration in seconds
          format: int64
          properties: {}
          type: integer
        trialPrice:
          description: trial price; only the first trial is allowed to be 0
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PublicProduct:
      properties:
        description:
          description: description
          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
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        productName:
          description: ProductName
          format: string
          properties: {}
          type: string
        status:
          description: status，1-active，2-inactive, default active
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.PublicUSVATConfig'
      type: object
    unibee.api.bean.PublicUSVATConfig:
      properties:
        active:
          format: bool
          properties: {}
          type: boolean
        sellOnUSOnly:
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.Refund:
      properties:
        adminMemberId:
          description: admin member id who initiated refund
          format: int64
          properties: {}
          type: integer
        countryCode:
          description: country code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        externalRefundId:
          description: external_refund_id
          format: string
          properties: {}
          type: string
        gatewayCurrencyExchange:
          $ref: '#/components/schemas/unibee.api.bean.GatewayCurrencyExchange'
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayRefundId:
          description: gateway refund id
          format: string
          properties: {}
          type: string
        invoiceId:
          description: 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
        paymentId:
          description: relative payment id
          format: string
          properties: {}
          type: string
        refundAmount:
          description: refund amount, cent
          format: int64
          properties: {}
          type: integer
        refundComment:
          description: refund comment
          format: string
          properties: {}
          type: string
        refundCommentExplain:
          description: refund comment
          format: string
          properties: {}
          type: string
        refundId:
          description: refund id (system generate)
          format: string
          properties: {}
          type: string
        refundTime:
          description: refund success time
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: return url after refund success
          format: string
          properties: {}
          type: string
        status:
          description: status。10-pending，20-success，30-failure, 40-cancel
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        type:
          description: 1-gateway refund,2-mark refund
          format: int
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.Sender:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        name:
          description: name
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.SplitPaymentInfo:
      properties:
        createTime:
          description: Payment creation time (UTC timestamp)
          format: int64
          properties: {}
          type: integer
        currency:
          description: Payment currency
          format: string
          properties: {}
          type: string
        gatewayId:
          description: The gateway id
          format: int64
          properties: {}
          type: integer
        gatewayName:
          description: The gateway name (e.g., stripe, paypal)
          format: string
          properties: {}
          type: string
        link:
          description: Payment link for checkout
          format: string
          properties: {}
          type: string
        paidTime:
          description: Payment success time (UTC timestamp, 0 if not paid)
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: The payment id
          format: string
          properties: {}
          type: string
        splitSequence:
          description: Split payment sequence number (1, 2, 3...)
          format: int
          properties: {}
          type: integer
        status:
          description: Payment status (10-pending, 20-success, 30-failure, 40-cancel)
          format: int
          properties: {}
          type: integer
        totalAmount:
          description: Payment amount in cents
          format: int64
          properties: {}
          type: integer
      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.api.bean.SubscriptionConfig:
      properties:
        autoChargeMaxRetryCount:
          description: AutoChargeMaxRetryCount, max automatic-charge attempts for
            one invoice including the first automatic attempt; 0 = unlimited (current
            behavior)
          format: int64
          properties: {}
          type: integer
        autoChargeRetryInterval:
          description: AutoChargeRetryInterval, seconds to wait before retrying a
            failed auto-charge within the window, default 12h (43200)
          format: int64
          properties: {}
          type: integer
        discountNewUserIgnoreFreeZeroInvoice:
          description: 'DiscountNewUserIgnoreFreeZeroInvoice, when true ignore only
            true free-plan zero invoices (no discount code / discount amount / promo
            credit) for new-user discount scope; default false (legacy: any paid subscription
            invoice counts as not new)'
          format: bool
          properties: {}
          type: boolean
        downgradeEffectImmediately:
          description: DowngradeEffectImmediately, whether subscription update should
            effect immediately or at period end, default at period end
          format: bool
          properties: {}
          type: boolean
        downgradeNonImmediatelyEffectBeforePeriodEnd:
          description: DowngradeNonImmediatelyEffectBeforePeriodEnd, for non-immediate
            downgrade, can take effect before period end (in seconds), default 30
            minutes (1800)
          format: int64
          properties: {}
          type: integer
        fiatExchangeApiKey:
          format: string
          properties: {}
          type: string
        gatewayVATRule:
          format: string
          properties: {}
          type: string
        incompleteExpireTime:
          description: IncompleteExpireTime, em.. default 1day for plan of month type
          format: int64
          properties: {}
          type: integer
        invoiceEmail:
          description: InvoiceEmail, whether to send invoice email to user, default
            yes
          format: bool
          properties: {}
          type: boolean
        invoicePdfGenerate:
          description: InvoicePdfGenerate, whether to generate invoice pdf to user,
            default yes
          format: bool
          properties: {}
          type: boolean
        showZeroInvoice:
          description: ShowZeroInvoice, show zero invoice or not, default no
          format: bool
          properties: {}
          type: boolean
        tryAutomaticPaymentBeforePeriodEnd:
          description: TryAutomaticPaymentBeforePeriodEnd, default 30 min
          format: int64
          properties: {}
          type: integer
        upgradeProration:
          description: UpgradeProration, whether subscription update generation proration
            invoice or not, default yes
          format: bool
          properties: {}
          type: boolean
        upgradeResetBillingCycle:
          description: 'UpgradeResetBillingCycle, for same-interval upgrades only:
            when true (default), credit unused old plan, charge full new plan cycle
            from upgrade time and reset billing anchor; when false, prorate new plan
            to current period end (legacy fixed-end). No effect when billing interval
            changes.'
          format: bool
          properties: {}
          type: boolean
      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.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
    unibee.api.bean.SubscriptionOnetimeAddon:
      properties:
        addonId:
          description: onetime addonId
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        isDeleted:
          description: 0-UnDeleted，1-Deleted
          format: int
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        paymentLink:
          description: PaymentLink
          format: string
          properties: {}
          type: string
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-create, 2-paid, 3-cancel, 4-expired
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.Tag:
      properties:
        bindingCount:
          description: Active binding count for this tag (plan now; user/discount_code
            later by scope)
          format: int
          properties: {}
          type: integer
        color:
          format: string
          properties: {}
          type: string
        description:
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        merchantId:
          format: int64
          properties: {}
          type: integer
        name:
          format: string
          properties: {}
          type: string
        scope:
          description: 0-plan, 1-user, 2-discount_code
          format: int
          properties: {}
          type: integer
        sortOrder:
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.TemplateVariable:
      properties:
        variableName:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.TemplateVariableGroup:
      properties:
        groupName:
          format: string
          properties: {}
          type: string
        variables:
          format: '[]*bean.TemplateVariable'
          items:
            $ref: '#/components/schemas/unibee.api.bean.TemplateVariable'
          properties: {}
          type: array
      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.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.USVATGatewayConnectionAPIKeys:
      properties:
        apiKey:
          format: string
          properties: {}
          type: string
        apiSecret:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.USVATGatewayProductTaxCode:
      properties:
        category:
          format: string
          properties: {}
          type: string
        description:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        taxCode:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.USVATGlobalConfig:
      properties:
        active:
          format: bool
          properties: {}
          type: boolean
        availableGatewayNames:
          description: Used for response
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        checkAddressViaGateway:
          format: bool
          properties: {}
          type: boolean
        defaultGatewayName:
          format: string
          properties: {}
          type: string
        fromAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        nexusAddresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
        taxCode:
          format: string
          properties: {}
          type: string
        toAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        uploadInvoiceToGateway:
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.UserAccount:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        avatarUrl:
          description: avator url
          format: string
          properties: {}
          type: string
        billingType:
          description: 1-recurring,2-one-time
          format: int
          properties: {}
          type: integer
        birthday:
          description: brithday
          format: string
          properties: {}
          type: string
        city:
          description: city
          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
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        custom:
          description: Custom
          format: string
          properties: {}
          type: string
        email:
          description: email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: external_user_id
          format: string
          properties: {}
          type: string
        facebook:
          description: facebook
          format: string
          properties: {}
          type: string
        firstName:
          description: first name
          format: string
          properties: {}
          type: string
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          format: string
          properties: {}
          type: string
        gender:
          description: gender
          format: string
          properties: {}
          type: string
        id:
          description: userId
          format: int64
          properties: {}
          type: integer
        isRisk:
          description: is risk account (deperated)
          format: int
          properties: {}
          type: integer
        isSpecial:
          description: is special account（0.no，1.yes）- deperated
          format: int
          properties: {}
          type: integer
        language:
          description: User Language, en|ru|cn|vi|bp
          format: string
          properties: {}
          type: string
        lastLoginAt:
          description: last login time, utc time
          format: int64
          properties: {}
          type: integer
        lastName:
          description: last name
          format: string
          properties: {}
          type: string
        linkedIn:
          description: linkedin
          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
        mobile:
          description: mobile
          format: string
          properties: {}
          type: string
        otherSocialInfo:
          format: string
          properties: {}
          type: string
        paymentMethod:
          format: string
          properties: {}
          type: string
        phone:
          description: phone
          format: string
          properties: {}
          type: string
        recurringAmount:
          description: total recurring amount, cent
          format: int64
          properties: {}
          type: integer
        registrationNumber:
          description: RegistrationNumber
          format: string
          properties: {}
          type: string
        school:
          description: school
          format: string
          properties: {}
          type: string
        state:
          description: State
          format: string
          properties: {}
          type: string
        status:
          description: 0-Active, 2-Suspend
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        subscriptionName:
          description: subscription name
          format: string
          properties: {}
          type: string
        subscriptionStatus:
          description: sub status， 1-Pending｜2-Active｜3-PendingInActive | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: int
          properties: {}
          type: integer
        taxPercentage:
          description: taxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        telegram:
          description: telegram
          format: string
          properties: {}
          type: string
        tikTok:
          description: tictok
          format: string
          properties: {}
          type: string
        timeZone:
          format: string
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: int64
          properties: {}
          type: integer
        userName:
          description: user name
          format: string
          properties: {}
          type: string
        vATNumber:
          description: vat number
          format: string
          properties: {}
          type: string
        version:
          description: version
          format: int
          properties: {}
          type: integer
        weChat:
          description: wechat
          format: string
          properties: {}
          type: string
        whatsAPP:
          description: whats app
          format: string
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.UserMetricChargeInvoiceItem:
      properties:
        CurrentUsedValue:
          description: CurrentUsedValue
          format: int64
          properties: {}
          type: integer
        chargePricing:
          $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
        description:
          description: Description
          format: string
          properties: {}
          type: string
        lines:
          description: Lines
          format: '[]*bean.MetricPlanChargeLine'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeLine'
          properties: {}
          type: array
        maxEventId:
          format: int64
          properties: {}
          type: integer
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        minEventId:
          format: int64
          properties: {}
          type: integer
        name:
          description: Name
          format: string
          properties: {}
          type: string
        totalChargeAmount:
          description: TotalChargeAmount
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      type: object
    unibee.api.bean.UserMetricChargeInvoiceItemEntity:
      properties:
        meteredChargeStats:
          description: MeteredChargeStats
          format: '[]*bean.UserMetricChargeInvoiceItem'
          items:
            $ref: '#/components/schemas/unibee.api.bean.UserMetricChargeInvoiceItem'
          properties: {}
          type: array
        recurringChargeStats:
          description: RecurringChargeStats
          format: '[]*bean.UserMetricChargeInvoiceItem'
          items:
            $ref: '#/components/schemas/unibee.api.bean.UserMetricChargeInvoiceItem'
          properties: {}
          type: array
      type: object
    unibee.api.bean.ValidResult:
      properties:
        companyAddress:
          format: string
          properties: {}
          type: string
        companyName:
          format: string
          properties: {}
          type: string
        countryCode:
          format: string
          properties: {}
          type: string
        underMaintenance:
          format: bool
          properties: {}
          type: boolean
        valid:
          format: bool
          properties: {}
          type: boolean
        validateMessage:
          format: string
          properties: {}
          type: string
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.VatCountryRate:
      properties:
        countryCode:
          format: string
          properties: {}
          type: string
        countryName:
          format: string
          properties: {}
          type: string
        gateway:
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        isEU:
          format: bool
          properties: {}
          type: boolean
        mamo:
          description: mamo
          format: string
          properties: {}
          type: string
        standardTaxPercentage:
          format: int64
          properties: {}
          type: integer
        vatSupport:
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.detail.CreditAccountDetail:
      properties:
        amount:
          description: credit amount, in cent if type is main
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        currencyAmount:
          description: currency amount, in cent
          format: int64
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，multiply by 100 saved, 1 currency =
            1 credit * (exchange_rate/100), main account fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        totalDecrementAmount:
          description: the total decrement amount
          format: int64
          properties: {}
          type: integer
        totalIncrementAmount:
          description: the total increment amount
          format: int64
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-gift account
          format: int
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.CreditNoteDetail:
      properties:
        adminMember:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMember'
        bizType:
          format: int
          properties: {}
          type: integer
        countryCode:
          format: string
          properties: {}
          type: string
        createFrom:
          description: create from
          format: string
          properties: {}
          type: string
        createTime:
          format: int64
          properties: {}
          type: integer
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          description: DiscountAmount,Cents
          format: int64
          properties: {}
          type: integer
        discountCode:
          format: string
          properties: {}
          type: string
        finishTime:
          format: int64
          properties: {}
          type: integer
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        gatewayId:
          description: Id
          format: int64
          properties: {}
          type: integer
        id:
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: InvoiceId
          format: string
          properties: {}
          type: string
        invoiceName:
          description: InvoiceName
          format: string
          properties: {}
          type: string
        lines:
          description: lines json data
          format: '[]*bean.InvoiceItemSimplify'
          items:
            $ref: '#/components/schemas/unibee.api.bean.InvoiceItemSimplify'
          properties: {}
          type: array
        link:
          description: Link
          format: string
          properties: {}
          type: string
        merchantId:
          description: MerchantId
          format: int64
          properties: {}
          type: integer
        message:
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        originAmount:
          description: OriginAmount,Cents
          format: int64
          properties: {}
          type: integer
        originalPaymentInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        paidTime:
          format: int64
          properties: {}
          type: integer
        partialCreditPaidAmount:
          description: partial credit paid amount
          format: int64
          properties: {}
          type: integer
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        periodEnd:
          description: period_end
          format: int64
          properties: {}
          type: integer
        periodStart:
          description: period_start
          format: int64
          properties: {}
          type: integer
        planSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.InvoicePlanSnapshot'
        productName:
          format: string
          properties: {}
          type: string
        promoCreditDiscountAmount:
          description: promo credit discount amount
          format: int64
          properties: {}
          type: integer
        promoCreditTransaction:
          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
        refundId:
          description: refundId
          format: string
          properties: {}
          type: string
        refundSource:
          $ref: '#/components/schemas/unibee.api.bean.detail.RefundSource'
        status:
          description: Status，1-pending｜2-processing｜3-paid | 4-failed | 5-cancelled
          format: int
          properties: {}
          type: integer
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        subscriptionAmount:
          description: SubscriptionAmount,Cents
          format: int64
          properties: {}
          type: integer
        subscriptionAmountExcludingTax:
          description: SubscriptionAmountExcludingTax,Cents
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        taxAmount:
          description: TaxAmount,Cents
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: TotalAmount,Cents
          format: int64
          properties: {}
          type: integer
        totalAmountExcludingTax:
          description: TotalAmountExcludingTax,Cents
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        userSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.CreditTransactionDetail:
      properties:
        accountType:
          description: type of credit account, 1-main recharge account, 2-promo credit
            account
          format: int
          properties: {}
          type: integer
        adminMember:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMember'
        bizId:
          description: business id
          format: string
          properties: {}
          type: string
        by:
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        creditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        creditAmountAfter:
          description: the credit amount after transaction,cent
          format: int64
          properties: {}
          type: integer
        creditAmountBefore:
          description: the credit amount before transaction,cent
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        deltaAmount:
          description: delta amount,cent
          format: int64
          properties: {}
          type: integer
        deltaCurrencyAmount:
          description: delta currency amount, in cent
          format: int64
          properties: {}
          type: integer
        description:
          description: recharge transaction description
          format: string
          properties: {}
          type: string
        exchangeRate:
          description: ExchangeRate for transaction, keep two decimal places，multiply
            by 100 saved, 1 currency = 1 credit * (exchange_rate/100), main account
            fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice_id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        name:
          description: recharge transaction title
          format: string
          properties: {}
          type: string
        transactionId:
          description: unique id for timeline
          format: string
          properties: {}
          type: string
        transactionType:
          description: transaction type。1-recharge income，2-payment out，3-refund income，4-withdraw
            out，5-withdraw failed income, 6-admin change，7-recharge refund out
          format: int
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.Gateway:
      properties:
        IsSetupFinished:
          description: Whether the gateway finished setup process
          format: bool
          properties: {}
          type: boolean
        archive:
          format: bool
          properties: {}
          type: boolean
        autoChargeEnabled:
          format: bool
          properties: {}
          type: boolean
        bank:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayBank'
        companyIssuer:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCompanyIssuer'
        countryConfig:
          additionalProperties:
            format: bool
            properties: {}
            type: boolean
          format: map[string]bool
          properties: {}
          type: object
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: 'The currency of wire transfer '
          format: string
          properties: {}
          type: string
        currencyExchange:
          description: The currency exchange for gateway payment, effect at start
            of payment creation when currency matched
          format: '[]*detail.GatewayCurrencyExchange'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCurrencyExchange'
          properties: {}
          type: array
        currencyExchangeEnabled:
          description: whether to enable currency exchange
          format: bool
          properties: {}
          type: boolean
        defaultGatewayPaymentType:
          $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
        description:
          description: The description of gateway
          format: string
          properties: {}
          type: string
        displayName:
          description: The gateway display name, used at user portal
          format: string
          properties: {}
          type: string
        gatewayIcons:
          description: The gateway display name, used at user portal
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewayId:
          format: int64
          properties: {}
          type: integer
        gatewayKey:
          format: string
          properties: {}
          type: string
        gatewayLogo:
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The gateway name, stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        gatewayPaymentTypes:
          description: gatewayPaymentTypes
          format: '[]*_interface.GatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
          properties: {}
          type: array
        gatewaySecret:
          format: string
          properties: {}
          type: string
        gatewayType:
          description: 'gateway type: 1-Card | 2-Crypto | 3-Wire Transfer | 4-PayPal
            | 5-Credit | 6-Alipay+ | 7-Hyperswitch | 8-External'
          format: int64
          properties: {}
          type: integer
        gatewayWebhookIntegrationLink:
          description: The gateway webhook integration guide link, gateway webhook
            need setup if not blank
          format: string
          properties: {}
          type: string
        gatewayWebsiteLink:
          description: The gateway website link
          format: string
          properties: {}
          type: string
        isDefault:
          format: bool
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        minimumAmount:
          description: The minimum amount of wire transfer
          format: int64
          properties: {}
          type: integer
        name:
          description: The name of gateway
          format: string
          properties: {}
          type: string
        privateSecretName:
          format: string
          properties: {}
          type: string
        publicKeyName:
          format: string
          properties: {}
          type: string
        setupGatewayPaymentTypes:
          description: The total list of gateway payment types, used for setup
          format: '[]*_interface.GatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
          properties: {}
          type: array
        sort:
          description: The sort value of payment gateway, The higher the value, the
            lower the ranking
          format: int64
          properties: {}
          type: integer
        subGateway:
          format: string
          properties: {}
          type: string
        subGatewayName:
          format: string
          properties: {}
          type: string
        webhookEndpointUrl:
          description: 'The endpoint url of gateway webhook '
          format: string
          properties: {}
          type: string
        webhookSecret:
          description: The secret of gateway webhook
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.GatewayBank:
      properties:
        ABARoutingNumber:
          description: 'The ABARoutingNumber of wire transfer '
          format: string
          properties: {}
          type: string
        CNAPS:
          description: 'The CNAPS of wire transfer '
          format: string
          properties: {}
          type: string
        Remarks:
          description: 'The Remarks additional content '
          format: string
          properties: {}
          type: string
        accountHolder:
          description: 'The AccountHolder of wire transfer '
          format: string
          properties: {}
          type: string
        accountNumber:
          description: The Account Number
          format: string
          properties: {}
          type: string
        address:
          description: 'The address of wire transfer '
          format: string
          properties: {}
          type: string
        bankName:
          description: The Bank Name
          format: string
          properties: {}
          type: string
        bic:
          description: 'The BIC of wire transfer '
          format: string
          properties: {}
          type: string
        bsbCode:
          description: The BSB Code
          format: string
          properties: {}
          type: string
        iban:
          description: 'The IBAN of wire transfer '
          format: string
          properties: {}
          type: string
        swiftCode:
          description: The Swift Code
          format: string
          properties: {}
          type: string
      required:
      - accountHolder
      - address
      type: object
    unibee.api.bean.detail.GatewayCompanyIssuer:
      properties:
        issueAddress:
          format: string
          properties: {}
          type: string
        issueCompanyName:
          format: string
          properties: {}
          type: string
        issueLogo:
          format: string
          properties: {}
          type: string
        issueRegNumber:
          format: string
          properties: {}
          type: string
        issueVatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.GatewayCurrencyExchange:
      properties:
        exchange_rate:
          description: the exchange rate of gateway, set to 0 if using https://app.exchangerate-api.com/
            instead of fixed exchange rate
          format: float64
          properties: {}
          type: number
        from_currency:
          description: the currency of gateway exchange from
          format: string
          properties: {}
          type: string
        to_currency:
          description: the currency of gateway exchange to
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.GatewaySort:
      properties:
        gatewayId:
          description: The gateway id
          format: int64
          properties: {}
          type: integer
        gatewayName:
          description: Required, The gateway name, stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        sort:
          description: Required, The sort value of payment gateway, should greater
            than 0, The higher the value, the lower the ranking
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.InvoiceDetail:
      properties:
        PaymentMethodId:
          format: string
          properties: {}
          type: string
        autoCharge:
          description: Invoice auto-charge source flag. True means this invoice was
            created by system auto-renew/auto-billing flow (createFrom=AutoRenew).
            It does NOT guarantee the invoice was finally paid by system auto-charge.
          format: bool
          properties: {}
          type: boolean
        billingCycleAnchor:
          description: billing_cycle_anchor
          format: int64
          properties: {}
          type: integer
        bizType:
          format: int
          properties: {}
          type: integer
        countryCode:
          format: string
          properties: {}
          type: string
        createFrom:
          description: create from
          format: string
          properties: {}
          type: string
        createTime:
          format: int64
          properties: {}
          type: integer
        cryptoAmount:
          description: crypto_amount, cent
          format: int64
          properties: {}
          type: integer
        cryptoCurrency:
          description: crypto_currency
          format: string
          properties: {}
          type: string
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        dayUtilDue:
          description: day util due after finish
          format: int64
          properties: {}
          type: integer
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          description: DiscountAmount,Cents
          format: int64
          properties: {}
          type: integer
        discountCode:
          format: string
          properties: {}
          type: string
        finishTime:
          format: int64
          properties: {}
          type: integer
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        gatewayId:
          description: Id
          format: int64
          properties: {}
          type: integer
        gatewayPaymentId:
          description: GatewayPaymentId PaymentId
          format: string
          properties: {}
          type: string
        gatewayPaymentType:
          description: GatewayPaymentType
          format: string
          properties: {}
          type: string
        gatewayStatus:
          description: GatewayStatus，Stripe：https://stripe.com/docs/api/invoices/object
          format: string
          properties: {}
          type: string
        gatewayUserId:
          description: GatewayUserId Id
          format: string
          properties: {}
          type: string
        gmtCreate:
          description: GmtCreate
          format: '*gtime.Time'
          properties: {}
          type: string
        gmtModify:
          description: GmtModify
          format: '*gtime.Time'
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: InvoiceId
          format: string
          properties: {}
          type: string
        invoiceName:
          description: InvoiceName
          format: string
          properties: {}
          type: string
        isDeleted:
          format: int
          properties: {}
          type: integer
        lines:
          description: lines json data
          format: '[]*bean.InvoiceItemSimplify'
          items:
            $ref: '#/components/schemas/unibee.api.bean.InvoiceItemSimplify'
          properties: {}
          type: array
        link:
          description: Link
          format: string
          properties: {}
          type: string
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.Merchant'
        merchantId:
          description: MerchantId
          format: int64
          properties: {}
          type: integer
        message:
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        originAmount:
          description: OriginAmount,Cents
          format: int64
          properties: {}
          type: integer
        originalPaymentInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        paidTime:
          format: int64
          properties: {}
          type: integer
        partialCreditPaidAmount:
          description: partial credit paid amount
          format: int64
          properties: {}
          type: integer
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
        periodEnd:
          description: period_end
          format: int64
          properties: {}
          type: integer
        periodStart:
          description: period_start
          format: int64
          properties: {}
          type: integer
        planSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.InvoicePlanSnapshot'
        productName:
          format: string
          properties: {}
          type: string
        promoCreditDiscountAmount:
          description: promo credit discount amount
          format: int64
          properties: {}
          type: integer
        promoCreditTransaction:
          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
        prorationDate:
          format: int64
          properties: {}
          type: integer
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
        refundId:
          description: refundId
          format: string
          properties: {}
          type: string
        sendEmail:
          description: SendEmail
          format: string
          properties: {}
          type: string
        sendNote:
          description: SendNote
          format: string
          properties: {}
          type: string
        sendPdf:
          description: UniBee-generated invoice PDF URL; use this for download/preview
          format: string
          properties: {}
          type: string
        sendStatus:
          description: SendStatus，0-No | 1- YES
          format: int
          properties: {}
          type: integer
        status:
          description: Status，1-pending｜2-processing｜3-paid | 4-failed | 5-cancelled
          format: int
          properties: {}
          type: integer
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        subscriptionAmount:
          description: SubscriptionAmount,Cents
          format: int64
          properties: {}
          type: integer
        subscriptionAmountExcludingTax:
          description: SubscriptionAmountExcludingTax,Cents
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        subscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
        taxAmount:
          description: TaxAmount,Cents
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: TotalAmount,Cents
          format: int64
          properties: {}
          type: integer
        totalAmountExcludingTax:
          description: TotalAmountExcludingTax,Cents
          format: int64
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        uniqueId:
          description: UniqueId
          format: string
          properties: {}
          type: string
        userAccount:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        userMetricChargeForInvoice:
          $ref: '#/components/schemas/unibee.api.bean.UserMetricChargeInvoiceItemEntity'
        userSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.MerchantDiscountCodeDetail:
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set 1
          format: bool
          properties: {}
          type: boolean
        billingType:
          description: billing_type, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of discount, available when discount_type is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: the count limitation of subscription cycle , 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: amount of discount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: percentage of discount, 100=1%, available when discount_type
            is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: end of discount available utc time, 0-invalid
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        isDeleted:
          description: 0-UnDeleted，> 0, Deleted, the deleted utc time
          format: int
          properties: {}
          type: integer
        liveQuantity:
          description: the live quantity of code
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified
          format: int
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        plans:
          description: plans which discount code can effect, default effect all plans
            if not set
          format: '[]*bean.Plan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Plan'
          properties: {}
          type: array
        quantity:
          description: quantity of code, 0-no limit, will not change
          format: int64
          properties: {}
          type: integer
        quantityUsed:
          description: quantity used count of code
          format: int64
          properties: {}
          type: integer
        startTime:
          description: start of discount available utc time
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-editable, 2-active, 3-deactive, 4-expire, 10-archive
          format: int
          properties: {}
          type: integer
        upgradeLongerOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except upgrade
            to longer plan if set 1
          format: bool
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, 0-false,1-true, will forbid for all except upgrade
            action if set 1
          format: bool
          properties: {}
          type: boolean
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited"
          format: int
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantEmailHistoryDetail:
      properties:
        attachFile:
          description: Attachment file
          format: string
          properties: {}
          type: string
        content:
          description: Email content
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        email:
          description: Email address
          format: string
          properties: {}
          type: string
        gatewayName:
          format: string
          properties: {}
          type: string
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        response:
          description: Email response
          format: string
          properties: {}
          type: string
        status:
          description: 0-pending,1-success,2-failure
          format: int
          properties: {}
          type: integer
        title:
          description: Email title
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.MerchantEmailHistoryStatistics:
      properties:
        totalFail:
          description: Total Fail
          format: int64
          properties: {}
          type: integer
        totalSend:
          description: Total Send
          format: int64
          properties: {}
          type: integer
        totalSuccess:
          description: Total Success
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantMemberDetail:
      properties:
        MemberGroupPermission:
          additionalProperties:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRolePermission'
          description: The member group permission map'
          format: map[string]*bean.MerchantRolePermission
          properties: {}
          type: object
        MemberRoles:
          description: The member role list'
          format: '[]*bean.MerchantRole'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRole'
          properties: {}
          type: array
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currentDeviceIdentity:
          description: The Current DeviceIdentity'
          format: string
          properties: {}
          type: string
        deviceList:
          description: The devices list'
          format: '[]*bean.MerchantMemberDevice'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMemberDevice'
          properties: {}
          type: array
        email:
          description: email
          format: string
          properties: {}
          type: string
        firstName:
          description: first name
          format: string
          properties: {}
          type: string
        id:
          description: userId
          format: int64
          properties: {}
          type: integer
        isBlankPasswd:
          description: is blank password
          format: bool
          properties: {}
          type: boolean
        isOwner:
          description: Check Member is Owner
          format: bool
          properties: {}
          type: boolean
        lastName:
          description: last name
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        mobile:
          description: mobile
          format: string
          properties: {}
          type: string
        oauthAccounts:
          description: List of connected OAuth accounts
          format: '[]*bean.Oauth'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Oauth'
          properties: {}
          type: array
        status:
          description: 0-Active, 2-Suspend
          format: int
          properties: {}
          type: integer
        totpType:
          description: 0-Inactive, 1-General, Google Authenticator | 2-Microsoft Authenticator
            | 3-Authy | 4-1Password | 5-LastPass | 6-FreeOTP | 7-Other TOTP
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantMetricEventDetail:
      properties:
        aggregationPropertyData:
          description: aggregation property data (Json)
          format: string
          properties: {}
          type: string
        aggregationPropertyInt:
          description: aggregation property int, use for metric of max|sum type
          format: int64
          properties: {}
          type: integer
        aggregationPropertyString:
          description: aggregation property string, use for metric of count|count_unique
            type
          format: string
          properties: {}
          type: string
        chargeInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        chargeInvoiceId:
          description: charge invoice id
          format: string
          properties: {}
          type: string
        chargeStatus:
          description: 0-Uncharged，1-charged
          format: int
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        eventCharge:
          $ref: '#/components/schemas/unibee.api.bean.EventMetricCharge'
        externalEventId:
          description: external_event_id, should be unique
          format: string
          properties: {}
          type: string
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: metric_id
          format: int64
          properties: {}
          type: integer
        metricLimit:
          format: int64
          properties: {}
          type: integer
        subscriptionIds:
          format: string
          properties: {}
          type: string
        subscriptionPeriodEnd:
          description: matched subscription's current_period_end
          format: int64
          properties: {}
          type: integer
        subscriptionPeriodStart:
          description: matched subscription's current_period_start
          format: int64
          properties: {}
          type: integer
        used:
          format: int64
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantMetricPlanChargeDetail:
      properties:
        chargeType:
          description: ChargeType,0-standard pricing 1-graduated pricing
          format: int
          properties: {}
          type: integer
        graduatedAmounts:
          description: GraduatedAmounts
          format: '[]*bean.MetricPlanChargeGraduatedStep'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
          properties: {}
          type: array
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        standardAmount:
          description: StandardAmount, used for standard pricing,cent
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: StandardStartValue, used for standard pricing
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      type: object
    unibee.api.bean.detail.MerchantMetricPlanLimitDetail:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gmtModify:
          description: update time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: metricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: plan metric limit
          format: int64
          properties: {}
          type: integer
        planId:
          description: plan_id
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity for this plan
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantOperationLogDetail:
      properties:
        createTime:
          description: operation create utc time
          format: int64
          properties: {}
          type: integer
        discountCode:
          description: discount_code
          format: string
          properties: {}
          type: string
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        member:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMember'
        memberId:
          description: member_id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchant Id
          format: int64
          properties: {}
          type: integer
        optAccount:
          description: operation Account
          format: string
          properties: {}
          type: string
        optAccountId:
          description: operation account id
          format: string
          properties: {}
          type: string
        optAccountType:
          description: opt_account_type, 0-Member|1-User|2-OpenApi|3-System
          format: int
          properties: {}
          type: integer
        optContent:
          description: operation content
          format: string
          properties: {}
          type: string
        optTarget:
          description: operation target
          format: string
          properties: {}
          type: string
        planId:
          description: plan id
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.MerchantUserDiscountCodeDetail:
      properties:
        applyAmount:
          description: apply_amount
          format: int64
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        id:
          description: ID
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice_id
          format: string
          properties: {}
          type: string
        invoiceStatus:
          description: invoice status, 0-unknown, 1-pending, 2-processing, 3-paid,
            4-failed, 5-cancelled, 6-reversed
          format: int
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: payment_id
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        recurring:
          description: is recurring apply, 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        status:
          description: status, 1-used, 2-rollback
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.MetricLimitQuotaDetail:
      properties:
        adjustmentTime:
          description: adjustment time (for manual)
          format: int64
          properties: {}
          type: integer
        id:
          format: int64
          properties: {}
          type: integer
        merchantMemberEmail:
          description: operator email (for manual)
          format: string
          properties: {}
          type: string
        merchantMemberId:
          description: operator id (for manual)
          format: int64
          properties: {}
          type: integer
        previousPeriodLimit:
          description: previous period limit (for carryover)
          format: int64
          properties: {}
          type: integer
        previousPeriodUsed:
          description: previous period used (for carryover)
          format: int64
          properties: {}
          type: integer
        quotaAmount:
          description: quota amount
          format: int64
          properties: {}
          type: integer
        quotaType:
          description: carryover or manual
          format: string
          properties: {}
          type: string
        reason:
          description: reason/note
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.PaymentDetail:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.PaymentTimelineDetail:
      properties:
        autoCharge:
          description: 'Final system auto-charge result flag for this payment. True
            only when: automatic=1, gatewayPaymentMethod not empty, and no hosted
            payment link visit evidence (meta_data.plCount==0).'
          format: bool
          properties: {}
          type: boolean
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        externalTransactionId:
          description: ExternalTransactionId
          format: string
          properties: {}
          type: string
        failureReason:
          description: failure reason for this timeline item, from payment or refund
          format: string
          properties: {}
          type: string
        fullRefund:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        gatewayId:
          description: gateway id
          format: int64
          properties: {}
          type: integer
        id:
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        planSnapshot:
          $ref: '#/components/schemas/unibee.api.bean.InvoicePlanSnapshot'
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
        refundId:
          description: refund id
          format: string
          properties: {}
          type: string
        status:
          description: 0-pending, 1-success, 2-failure，3-cancel
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        timelineType:
          description: 0-pay, 1-refund
          format: int
          properties: {}
          type: integer
        totalAmount:
          description: total amount
          format: int64
          properties: {}
          type: integer
        transactionId:
          description: TransactionId
          format: string
          properties: {}
          type: string
        userId:
          description: userId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.PlanDetail:
      properties:
        addonIds:
          description: AddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        addons:
          description: Addons
          format: '[]*bean.Plan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Plan'
          properties: {}
          type: array
        checkAddressViaGateway:
          format: bool
          properties: {}
          type: boolean
        globalUSVATActive:
          format: bool
          properties: {}
          type: boolean
        metricMeteredCharge:
          description: Plan's MetricMeteredCharge
          format: '[]*detail.MerchantMetricPlanChargeDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanChargeDetail'
          properties: {}
          type: array
        metricPlanLimits:
          description: MetricPlanLimits
          format: '[]*detail.MerchantMetricPlanLimitDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
          properties: {}
          type: array
        metricRecurringCharge:
          description: Plan's MetricRecurringCharge
          format: '[]*detail.MerchantMetricPlanChargeDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanChargeDetail'
          properties: {}
          type: array
        onetimeAddonIds:
          description: OneTimeAddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        onetimeAddons:
          description: OneTimeAddons
          format: '[]*bean.Plan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Plan'
          properties: {}
          type: array
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
        sellOnUSOnly:
          description: SellOnUSOnly, customer must select US Country And provider
            US Address when its true
          format: bool
          properties: {}
          type: boolean
        tags:
          description: Plan tags (merchant list/detail only)
          format: '[]*bean.Tag'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Tag'
          properties: {}
          type: array
      type: object
    unibee.api.bean.detail.PlanMetricLimitDetail:
      properties:
        MerchantId:
          format: int64
          properties: {}
          type: integer
        MetricId:
          format: int64
          properties: {}
          type: integer
        PlanLimits:
          format: '[]*detail.MerchantMetricPlanLimitDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
          properties: {}
          type: array
        TotalLimit:
          format: int64
          properties: {}
          type: integer
        UserId:
          format: int64
          properties: {}
          type: integer
        aggregationProperty:
          description: aggregation property
          format: string
          properties: {}
          type: string
        aggregationType:
          description: 0-count，1-count unique, 2-latest, 3-max, 4-sum
          format: int
          properties: {}
          type: integer
        code:
          description: code
          format: string
          properties: {}
          type: string
        metricName:
          description: metric name
          format: string
          properties: {}
          type: string
        quotaAdjustments:
          description: Quota adjustments (carryover + manual)
          format: '[]*detail.MetricLimitQuotaDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MetricLimitQuotaDetail'
          properties: {}
          type: array
        type:
          description: 1-limit_metered，2-charge_metered,3-charge_recurring,4-limit_recurring
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.PublicGateway:
      properties:
        archive:
          format: bool
          properties: {}
          type: boolean
        autoChargeEnabled:
          format: bool
          properties: {}
          type: boolean
        defaultGatewayPaymentType:
          $ref: '#/components/schemas/unibee.api.bean.detail.PublicGatewayPaymentType'
        description:
          description: The description of gateway
          format: string
          properties: {}
          type: string
        displayName:
          description: The gateway display name, used at checkout
          format: string
          properties: {}
          type: string
        gatewayIcons:
          description: The gateway icons, used at checkout
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewayId:
          format: int64
          properties: {}
          type: integer
        gatewayLogo:
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The gateway name, stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        gatewayPaymentTypes:
          description: gatewayPaymentTypes
          format: '[]*detail.PublicGatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.PublicGatewayPaymentType'
          properties: {}
          type: array
        gatewayType:
          description: 'gateway type: 1-Card | 2-Crypto | 3-Wire Transfer | 4-PayPal
            | 5-Credit | 6-Alipay+ | 7-Hyperswitch | 8-External'
          format: int64
          properties: {}
          type: integer
        isDefault:
          format: bool
          properties: {}
          type: boolean
        name:
          description: The name of gateway
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.PublicGatewayPaymentType:
      properties:
        autoCharge:
          format: bool
          properties: {}
          type: boolean
        category:
          format: string
          properties: {}
          type: string
        countryName:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.PublicPlanDetail:
      properties:
        addonIds:
          description: AddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        addons:
          description: Addons
          format: '[]*bean.PublicPlan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PublicPlan'
          properties: {}
          type: array
        checkAddressViaGateway:
          format: bool
          properties: {}
          type: boolean
        globalUSVATActive:
          format: bool
          properties: {}
          type: boolean
        onetimeAddonIds:
          description: OneTimeAddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        onetimeAddons:
          description: OneTimeAddons
          format: '[]*bean.PublicPlan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PublicPlan'
          properties: {}
          type: array
        plan:
          $ref: '#/components/schemas/unibee.api.bean.PublicPlan'
        product:
          $ref: '#/components/schemas/unibee.api.bean.PublicProduct'
        sellOnUSOnly:
          description: SellOnUSOnly, customer must select US Country And provider
            US Address when its true
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.detail.RefundDetail:
      properties:
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.RefundSource:
      properties:
        label:
          description: Human-readable source label for display
          format: string
          properties: {}
          type: string
        optContent:
          description: Matched operation log opt_content, if any
          format: string
          properties: {}
          type: string
        type:
          description: admin_member|open_api|import|channel_sync|unknown
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.SubscriptionDetail:
      properties:
        addonParams:
          description: AddonParams
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        addons:
          description: Addon
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        dayLeft:
          description: DayLeft util the period end, only available for webhook
          format: int
          properties: {}
          type: integer
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        latestInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        note:
          description: note
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        previousStatus:
          description: Previous subscription status before this subscription status
            transition
          format: '*int'
          properties: {}
          type: integer
        source:
          description: Source
          format: string
          properties: {}
          type: string
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        unfinishedSubscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.SubscriptionOnetimeAddonDetail:
      properties:
        addon:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        addonId:
          description: onetime addonId
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata
          format: map[string]interface {}
          properties: {}
          type: object
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        periodEnd:
          description: period_end utc time
          format: int64
          properties: {}
          type: integer
        periodStart:
          description: period_start, utc time
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        status:
          description: status, 1-create, 2-paid, 3-cancel, 4-expired
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.SubscriptionPendingUpdateDetail:
      properties:
        addonData:
          description: plan addon json data
          format: string
          properties: {}
          type: string
        addons:
          description: Addons
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        amount:
          description: CaptureAmount, Cent
          format: int64
          properties: {}
          type: integer
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        effectImmediate:
          description: EffectImmediate
          format: int
          properties: {}
          type: integer
        effectTime:
          description: effect_immediate=0, EffectTime unit_time
          format: int64
          properties: {}
          type: integer
        gatewayId:
          description: Id
          format: int64
          properties: {}
          type: integer
        gmtCreate:
          description: GmtCreate
          format: '*gtime.Time'
          properties: {}
          type: string
        gmtModify:
          description: GmtModify
          format: '*gtime.Time'
          properties: {}
          type: string
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        link:
          description: Link
          format: string
          properties: {}
          type: string
        merchantId:
          description: MerchantId
          format: int64
          properties: {}
          type: integer
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMember'
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: Pending update invoice-name intent (mirrors DB column name)
          format: string
          properties: {}
          type: string
        note:
          description: Update Note
          format: string
          properties: {}
          type: string
        paid:
          description: Paid
          format: int
          properties: {}
          type: integer
        pendingUpdateId:
          description: PendingUpdateId
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        prorationAmount:
          description: ProrationAmount,Cents
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        status:
          description: Status，1-Pending｜2-Finished｜3-Cancelled
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        updateAddonData:
          description: UpdateAddonData
          format: string
          properties: {}
          type: string
        updateAddons:
          description: UpdateAddons
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        updateAmount:
          description: UpdateAmount, Cents
          format: int64
          properties: {}
          type: integer
        updateCurrency:
          description: UpdateCurrency
          format: string
          properties: {}
          type: string
        updatePlan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        updatePlanId:
          description: UpdatePlanId
          format: int64
          properties: {}
          type: integer
        updateQuantity:
          description: UpdateQuantity
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.SubscriptionTimeLineDetail:
      properties:
        addons:
          description: Addon
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: payment id
          format: string
          properties: {}
          type: string
        periodEnd:
          description: period_end
          format: int64
          properties: {}
          type: integer
        periodEndTime:
          description: period end (datatime)
          format: '*gtime.Time'
          properties: {}
          type: string
        periodStart:
          description: period_start
          format: int64
          properties: {}
          type: integer
        periodStartTime:
          description: period start (datetime)
          format: '*gtime.Time'
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
        status:
          description: 1-processing,2-finish,3-cancelled,4-expired
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        uniqueId:
          description: unique id
          format: string
          properties: {}
          type: string
        userId:
          description: userId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.UserAccountDetail:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        avatarUrl:
          description: avator url
          format: string
          properties: {}
          type: string
        billingType:
          description: 1-recurring,2-one-time
          format: int
          properties: {}
          type: integer
        birthday:
          description: brithday
          format: string
          properties: {}
          type: string
        city:
          description: city
          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
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        creditAccounts:
          description: creditAccounts
          format: '[]*bean.CreditAccount'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
          properties: {}
          type: array
        custom:
          description: custom
          format: string
          properties: {}
          type: string
        email:
          description: email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: external_user_id
          format: string
          properties: {}
          type: string
        facebook:
          description: facebook
          format: string
          properties: {}
          type: string
        firstName:
          description: first name
          format: string
          properties: {}
          type: string
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          format: string
          properties: {}
          type: string
        gender:
          description: gender
          format: string
          properties: {}
          type: string
        id:
          description: userId
          format: int64
          properties: {}
          type: integer
        isRisk:
          description: is risk account (deperated)
          format: int
          properties: {}
          type: integer
        isSpecial:
          description: is special account（0.no，1.yes）- deperated
          format: int
          properties: {}
          type: integer
        language:
          description: User Language, en|ru|cn|vi|bp
          format: string
          properties: {}
          type: string
        lastLoginAt:
          description: last login time, utc time
          format: int64
          properties: {}
          type: integer
        lastName:
          description: last name
          format: string
          properties: {}
          type: string
        linkedIn:
          description: linkedin
          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
        mobile:
          description: mobile
          format: string
          properties: {}
          type: string
        otherSocialInfo:
          format: string
          properties: {}
          type: string
        paymentMethod:
          format: string
          properties: {}
          type: string
        phone:
          description: phone
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        promoCreditAccounts:
          description: promoCreditAccounts
          format: '[]*bean.CreditAccount'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
          properties: {}
          type: array
        recurringAmount:
          description: total recurring amount, cent
          format: int64
          properties: {}
          type: integer
        registrationNumber:
          description: RegistrationNumber
          format: string
          properties: {}
          type: string
        school:
          description: school
          format: string
          properties: {}
          type: string
        state:
          description: state
          format: string
          properties: {}
          type: string
        status:
          description: 0-Active, 2-Suspend
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        subscriptionName:
          description: subscription name
          format: string
          properties: {}
          type: string
        subscriptionStatus:
          description: sub status， 1-Pending｜2-Active｜3-PendingInActive | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: int
          properties: {}
          type: integer
        taxPercentage:
          description: taxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        telegram:
          description: telegram
          format: string
          properties: {}
          type: string
        tikTok:
          description: tictok
          format: string
          properties: {}
          type: string
        timeZone:
          format: string
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: int64
          properties: {}
          type: integer
        userName:
          description: user name
          format: string
          properties: {}
          type: string
        vATNumber:
          description: vat number
          format: string
          properties: {}
          type: string
        version:
          description: version
          format: int
          properties: {}
          type: integer
        weChat:
          description: wechat
          format: string
          properties: {}
          type: string
        whatsAPP:
          description: whats app
          format: string
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.UserAdminNoteDetail:
      properties:
        createTime:
          description: CreateTime, UTC Time
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMember'
        merchantMemberId:
          description: merchant_user_id
          format: int64
          properties: {}
          type: integer
        note:
          description: note
          format: string
          properties: {}
          type: string
        userAccount:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.UserGateway:
      properties:
        bank:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayBank'
        currency:
          description: The currency of wire transfer
          format: string
          properties: {}
          type: string
        defaultGatewayPaymentType:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserGatewayPaymentType'
        displayName:
          description: The gateway display name, used at user portal
          format: string
          properties: {}
          type: string
        gatewayIcons:
          description: The gateway icons, used at user portal
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewayId:
          format: int64
          properties: {}
          type: integer
        gatewayLogo:
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The gateway name, stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        gatewayPaymentTypes:
          description: gatewayPaymentTypes
          format: '[]*detail.UserGatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserGatewayPaymentType'
          properties: {}
          type: array
        gatewayType:
          description: 'gateway type: 1-Card | 2-Crypto | 3-Wire Transfer | 4-PayPal
            | 5-Credit | 6-Alipay+ | 7-Hyperswitch | 8-External'
          format: int64
          properties: {}
          type: integer
        minimumAmount:
          description: The minimum amount of wire transfer
          format: int64
          properties: {}
          type: integer
        name:
          description: The name of gateway
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.UserGatewayPaymentType:
      properties:
        autoCharge:
          format: bool
          properties: {}
          type: boolean
        category:
          format: string
          properties: {}
          type: string
        countryName:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.UserHistoryMetric:
      properties:
        invoiceId:
          description: Invoice ID
          format: string
          properties: {}
          type: string
        limitStats:
          description: Limit metric stats (limit_metered and limit_recurring only)
          format: '[]*detail.UserHistoryMetricLimitStat'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserHistoryMetricLimitStat'
          properties: {}
          type: array
      type: object
    unibee.api.bean.detail.UserHistoryMetricLimitStat:
      properties:
        maxEventId:
          description: MaxEventId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.PlanMetricLimitDetail'
        minEventId:
          description: MinEventId
          format: int64
          properties: {}
          type: integer
        totalLimit:
          description: TotalLimit
          format: int64
          properties: {}
          type: integer
        usedValue:
          description: UsedValue
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.UserMerchantMetricChargeStat:
      properties:
        CurrentUsedValue:
          description: CurrentUsedValue
          format: int64
          properties: {}
          type: integer
        chargePricing:
          $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
        graduatedStep:
          $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
        lines:
          description: Lines
          format: '[]*bean.MetricPlanChargeLine'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeLine'
          properties: {}
          type: array
        maxEventId:
          format: int64
          properties: {}
          type: integer
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        minEventId:
          format: int64
          properties: {}
          type: integer
        totalChargeAmount:
          description: TotalChargeAmount
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      type: object
    unibee.api.bean.detail.UserMerchantMetricLimitStat:
      properties:
        CurrentUsedValue:
          description: CurrentUsedValue
          format: int64
          properties: {}
          type: integer
        maxEventId:
          description: MaxEventId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.PlanMetricLimitDetail'
        minEventId:
          description: MinEventId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.UserMetric:
      properties:
        addons:
          description: Addon
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        description:
          description: description
          format: string
          properties: {}
          type: string
        isPaid:
          description: IsPaid
          format: bool
          properties: {}
          type: boolean
        limitStats:
          description: LimitStats
          format: '[]*detail.UserMerchantMetricLimitStat'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserMerchantMetricLimitStat'
          properties: {}
          type: array
        meteredChargeStats:
          description: MeteredChargeStats
          format: '[]*detail.UserMerchantMetricChargeStat'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserMerchantMetricChargeStat'
          properties: {}
          type: array
        onetimeAddons:
          description: OnetimeAddons
          format: '[]*detail.UserOnetimeAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserOnetimeAddonDetail'
          properties: {}
          type: array
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
        recurringChargeStats:
          description: RecurringChargeStats
          format: '[]*detail.UserMerchantMetricChargeStat'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserMerchantMetricChargeStat'
          properties: {}
          type: array
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.bean.detail.UserOnetimeAddonDetail:
      properties:
        addon:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        addonId:
          description: onetime addonId
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        periodEnd:
          description: period_end utc time
          format: int64
          properties: {}
          type: integer
        periodStart:
          description: period_start, utc time
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.checkout.checkout.GetReq:
      properties:
        checkoutId:
          description: checkout id
          format: int64
          properties: {}
          type: integer
      required:
      - checkoutId
      type: object
    unibee.api.checkout.checkout.GetRes:
      properties:
        merchantCheckout:
          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
      type: object
    unibee.api.checkout.gateway.ListReq:
      properties:
        merchantId:
          format: int64
          properties: {}
          type: integer
      required:
      - merchantId
      type: object
    unibee.api.checkout.gateway.ListRes:
      properties:
        gateways:
          format: '[]*detail.PublicGateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.PublicGateway'
          properties: {}
          type: array
      type: object
    unibee.api.checkout.ip.ResolveReq:
      properties:
        ip:
          description: ip
          format: string
          properties: {}
          type: string
      required:
      - ip
      type: object
    unibee.api.checkout.ip.ResolveRes:
      properties:
        location:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
      type: object
    unibee.api.checkout.payment.DetailReq:
      properties:
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.checkout.payment.DetailRes:
      properties:
        cancelUrl:
          format: string
          properties: {}
          type: string
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        paymentStatus:
          description: Payment Status，10-pending，20-success，30-failure, 40-cancel
          format: int
          properties: {}
          type: integer
        returnUrl:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.checkout.plan.DetailReq:
      properties:
        currency:
          description: Optional. When set and supported by merchant multi-currency
            config, plan amount, currency, and multi-trial prices are returned in
            this currency; otherwise default behavior
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
      required:
      - planId
      type: object
    unibee.api.checkout.plan.DetailRes:
      properties:
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.PublicMerchant'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.detail.PublicPlanDetail'
      type: object
    unibee.api.checkout.subscription.CheckoutCreateSubscription:
      properties:
        amount:
          description: Subscription recurring amount, minor units.
          format: int64
          properties: {}
          type: integer
        currency:
          description: Subscription currency.
          format: string
          properties: {}
          type: string
        planId:
          description: Plan id of the subscription.
          format: int64
          properties: {}
          type: integer
        status:
          description: Subscription 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
        userId:
          description: Owner user id.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.checkout.subscription.CheckoutCreateUser:
      properties:
        externalUserId:
          description: Merchant-side unique user identifier.
          format: string
          properties: {}
          type: string
        id:
          description: Internal user id.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.checkout.subscription.CheckoutPreviewInvoice:
      properties:
        currency:
          description: Invoice currency.
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Actual discount deduction applied to this invoice, minor units.
          format: int64
          properties: {}
          type: integer
        originAmount:
          description: Original invoice amount before discounts, minor units.
          format: int64
          properties: {}
          type: integer
        promoCreditDiscountAmount:
          description: Promo credit deduction applied to this invoice, minor units.
          format: int64
          properties: {}
          type: integer
        subscriptionAmountExcludingTax:
          description: Subscription amount excluding tax, minor units.
          format: int64
          properties: {}
          type: integer
        taxAmount:
          description: Tax amount, minor units.
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: Tax percentage, 1000 = 10%.
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Final payable amount including tax and after discounts, minor
            units.
          format: int64
          properties: {}
          type: integer
        usVATCalculateGatewayName:
          description: Display name of the US VAT calculation gateway, when applicable.
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.checkout.subscription.CreatePreviewReq:
      properties:
        addonParams:
          description: addonParams
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        allowMultipleActiveSubscription:
          description: Optional. If true, skip the 'one active subscription per user
            per product' check, allowing the user to hold multiple active subscriptions
            under the same product.
          format: bool
          properties: {}
          type: boolean
        applyPromoCredit:
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: apply promo credit amount, auto compute if not specified
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: The currency of payment
          format: string
          properties: {}
          type: string
        discountCode:
          description: DiscountCode
          format: string
          properties: {}
          type: string
        email:
          description: Email, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Quantity
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage，1000 = 10%
          format: '*int64'
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.NewUser'
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: VatCountryCode, CountryName
          format: string
          properties: {}
          type: string
        vatNumber:
          description: VatNumber
          format: string
          properties: {}
          type: string
      required:
      - planId
      type: object
    unibee.api.checkout.subscription.CreatePreviewRes:
      properties:
        addonParams:
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        addons:
          format: '[]*bean.PublicPlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PublicPlanAddonDetail'
          properties: {}
          type: array
        applyPromoCredit:
          format: bool
          properties: {}
          type: boolean
        currency:
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.PublicDiscount'
        discountAmount:
          format: int64
          properties: {}
          type: integer
        discountMessage:
          format: string
          properties: {}
          type: string
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.PublicGateway'
        hasOtherPendingCryptoSubscription:
          description: Whether the user already has another pending crypto subscription
            for the same product (checkout-only flag; no subscription details disclosed).
          format: bool
          properties: {}
          type: boolean
        invoice:
          $ref: '#/components/schemas/unibee.api.checkout.subscription.CheckoutPreviewInvoice'
        originAmount:
          format: int64
          properties: {}
          type: integer
        otherActiveSubscriptionId:
          description: 'other active or incomplete subscription id '
          format: string
          properties: {}
          type: string
        plan:
          $ref: '#/components/schemas/unibee.api.bean.PublicPlan'
        quantity:
          format: int64
          properties: {}
          type: integer
        recurringDiscountCode:
          description: Discount code persisted for later billing cycles (e.g. after
            trial), when applicable.
          format: string
          properties: {}
          type: string
        signIn:
          $ref: '#/components/schemas/unibee.api.bean.CheckoutSignIn'
        subscriptionAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
        taxAmount:
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          format: int64
          properties: {}
          type: integer
        totalAmount:
          format: int64
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        userId:
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          format: string
          properties: {}
          type: string
        vatCountryName:
          format: string
          properties: {}
          type: string
        vatNumber:
          format: string
          properties: {}
          type: string
        vatNumberValidate:
          $ref: '#/components/schemas/unibee.api.bean.ValidResult'
        vatNumberValidateMessage:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.checkout.subscription.CreateReq:
      properties:
        addonParams:
          description: addonParams
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        allowMultipleActiveSubscription:
          description: Optional. If true, skip the 'one active subscription per user
            per product' check, allowing the user to hold multiple active subscriptions
            under the same product.
          format: bool
          properties: {}
          type: boolean
        applyPromoCredit:
          description: apply promo credit or not
          format: bool
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: apply promo credit amount, auto compute if not specified
          format: '*int64'
          properties: {}
          type: integer
        cancelUrl:
          description: CancelUrl, back to cancelUrl if checkout cancelled
          format: string
          properties: {}
          type: string
        confirmCurrency:
          description: Currency to verify if provide
          format: string
          properties: {}
          type: string
        confirmTotalAmount:
          description: TotalAmount to verify if provide
          format: int64
          properties: {}
          type: integer
        currency:
          description: The currency of payment
          format: string
          properties: {}
          type: string
        discountCode:
          description: DiscountCode
          format: string
          properties: {}
          type: string
        email:
          description: Email, one of ExternalUserId&Email, UserId or User needed
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, one of ExternalUserId&Email, UserId
            or User needed
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        paymentMethodId:
          description: PaymentMethodId
          format: string
          properties: {}
          type: string
        paymentUIMode:
          description: The checkout UI Mode, hosted|embedded|custom, default hosted
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        productData:
          $ref: '#/components/schemas/unibee.api.bean.PlanProductParam'
        quantity:
          description: Quantity，Default 1
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl, back to returnUrl if checkout completed
          format: string
          properties: {}
          type: string
        splitPayment:
          description: Split Payment, default false
          format: bool
          properties: {}
          type: boolean
        startIncomplete:
          description: StartIncomplete, use now pay later, subscription will generate
            invoice and start with incomplete status if set
          format: bool
          properties: {}
          type: boolean
        taxPercentage:
          description: TaxPercentage，1000 = 10%, override subscription taxPercentage
            if provide
          format: '*int64'
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.NewUser'
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: VatCountryCode, CountryName
          format: string
          properties: {}
          type: string
        vatNumber:
          description: VatNumber
          format: string
          properties: {}
          type: string
      required:
      - planId
      type: object
    unibee.api.checkout.subscription.CreateRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        hasOtherPendingCryptoSubscription:
          description: Whether the user already has another pending crypto subscription
            for the same product (checkout-only flag; no subscription details disclosed).
          format: bool
          properties: {}
          type: boolean
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        link:
          format: string
          properties: {}
          type: string
        paid:
          format: bool
          properties: {}
          type: boolean
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
        subscription:
          $ref: '#/components/schemas/unibee.api.checkout.subscription.CheckoutCreateSubscription'
        user:
          $ref: '#/components/schemas/unibee.api.checkout.subscription.CheckoutCreateUser'
      type: object
    unibee.api.checkout.vat.CountryListReq:
      properties:
        merchantId:
          format: int64
          properties: {}
          type: integer
      required:
      - merchantId
      type: object
    unibee.api.checkout.vat.CountryListRes:
      properties:
        vatCountryList:
          description: VatCountryList
          format: '[]*bean.VatCountryRate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.VatCountryRate'
          properties: {}
          type: array
      type: object
    unibee.api.checkout.vat.NumberValidateReq:
      properties:
        merchantId:
          format: int64
          properties: {}
          type: integer
        vatNumber:
          description: VatNumber
          format: string
          properties: {}
          type: string
      required:
      - merchantId
      - vatNumber
      type: object
    unibee.api.checkout.vat.NumberValidateRes:
      properties:
        vatNumberValidate:
          $ref: '#/components/schemas/unibee.api.bean.ValidResult'
      type: object
    unibee.api.checkout.vat.USVATValidateAddressReq:
      properties:
        address:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        merchantId:
          format: int64
          properties: {}
          type: integer
      required:
      - merchantId
      type: object
    unibee.api.checkout.vat.USVATValidateAddressRes:
      properties:
        addresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.auth.ClearTotpReq:
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        totpResumeCode:
          description: TOTP Resume Code
          format: string
          properties: {}
          type: string
      required:
      - email
      - totpResumeCode
      type: object
    unibee.api.merchant.auth.ClearTotpRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.GitHubUserInfo:
      properties:
        avatarUrl:
          description: User Avatar URL
          format: string
          properties: {}
          type: string
        bio:
          description: User Bio
          format: string
          properties: {}
          type: string
        company:
          description: User Company
          format: string
          properties: {}
          type: string
        email:
          description: User Email
          format: string
          properties: {}
          type: string
        id:
          description: GitHub User ID
          format: int
          properties: {}
          type: integer
        location:
          description: User Location
          format: string
          properties: {}
          type: string
        login:
          description: GitHub Username
          format: string
          properties: {}
          type: string
        name:
          description: User Full Name
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.GoogleUserInfo:
      properties:
        email:
          description: User Email
          format: string
          properties: {}
          type: string
        familyName:
          description: User Last Name
          format: string
          properties: {}
          type: string
        givenName:
          description: User First Name
          format: string
          properties: {}
          type: string
        id:
          description: Google User ID
          format: string
          properties: {}
          type: string
        locale:
          description: User Locale
          format: string
          properties: {}
          type: string
        name:
          description: User Full Name
          format: string
          properties: {}
          type: string
        picture:
          description: User Profile Picture
          format: string
          properties: {}
          type: string
        verifiedEmail:
          description: Email Verified Status
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.auth.LoginOAuthReq:
      description: 'OAuth login. Pass OAuth token in request header (Auth.js JWT).
        Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        totpCode:
          description: The totp code
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.auth.LoginOAuthRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.LoginOtpReq:
      description: Send email to member with OTP code
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.auth.LoginOtpRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.LoginOtpVerifyReq:
      description: OTP login for member, verify OTP code
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        verificationCode:
          description: OTP Code, received from email
          format: string
          properties: {}
          type: string
      required:
      - email
      - verificationCode
      type: object
    unibee.api.merchant.auth.LoginOtpVerifyRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.LoginReq:
      description: Merchant Password login
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        password:
          description: The merchant member password
          format: string
          properties: {}
          type: string
        provider:
          description: Connect to OAuth provider
          format: string
          properties: {}
          type: string
        providerId:
          description: Connect to OAuth ProviderId
          format: string
          properties: {}
          type: string
        totpCode:
          description: The totp code
          format: string
          properties: {}
          type: string
      required:
      - email
      - password
      type: object
    unibee.api.merchant.auth.LoginRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.OauthGithubReq:
      description: Merchant Oauth Github
      properties:
        githubCode:
          description: Github Code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.OauthGithubRes:
      properties:
        sign:
          description: Sign
          format: string
          properties: {}
          type: string
        userInfo:
          $ref: '#/components/schemas/unibee.api.merchant.auth.GitHubUserInfo'
      type: object
    unibee.api.merchant.auth.OauthGoogleReq:
      description: Merchant Oauth Google
      properties:
        googleCode:
          description: Google Code
          format: string
          properties: {}
          type: string
        redirectUri:
          description: The Google Redirect Uri
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.OauthGoogleRes:
      properties:
        sign:
          description: Sign
          format: string
          properties: {}
          type: string
        userInfo:
          $ref: '#/components/schemas/unibee.api.merchant.auth.GoogleUserInfo'
      type: object
    unibee.api.merchant.auth.OauthMembersReq:
      description: 'Merchant Get Oauth Connected Members. Pass OAuth token in request
        header (Auth.js JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      properties: {}
      type: object
    unibee.api.merchant.auth.OauthMembersRes:
      properties:
        merchantMembers:
          description: Merchant Member Object List
          format: '[]*detail.MerchantMemberDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.auth.PasswordForgetOtpReq:
      description: Send email to member with OTP code
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.auth.PasswordForgetOtpRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.PasswordForgetOtpVerifyReq:
      description: Password forget OTP process, verify OTP code
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        newPassword:
          description: The new password
          format: string
          properties: {}
          type: string
        verificationCode:
          description: OTP Code, received from email
          format: string
          properties: {}
          type: string
      required:
      - email
      - verificationCode
      - newPassword
      type: object
    unibee.api.merchant.auth.PasswordForgetOtpVerifyRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.PasswordForgetTotpVerifyReq:
      description: Password forget 2FA process, verify 2FA code
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        newPassword:
          description: The new password
          format: string
          properties: {}
          type: string
        totpCode:
          description: The totp code
          format: string
          properties: {}
          type: string
      required:
      - email
      - totpCode
      - newPassword
      type: object
    unibee.api.merchant.auth.PasswordForgetTotpVerifyRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.PasswordSetupOtpReq:
      description: Member Password Setup
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        newPassword:
          description: The new password
          format: string
          properties: {}
          type: string
        setupToken:
          description: The merchant member password setup token
          format: string
          properties: {}
          type: string
      required:
      - email
      - setupToken
      - newPassword
      type: object
    unibee.api.merchant.auth.PasswordSetupOtpRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.RegisterEmailCheckReq:
      description: Check Register Email
      properties:
        email:
          description: The merchant owner's email address
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.auth.RegisterEmailCheckRes:
      properties:
        valid:
          description: Valid
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.auth.RegisterOAuthReq:
      description: 'Merchant OAuth Register. Pass OAuth token in request header (Auth.js
        JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      properties:
        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
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        firstName:
          description: The merchant owner's first name
          format: string
          properties: {}
          type: string
        lastName:
          description: The merchant owner's last name
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        password:
          description: The owner's password
          format: string
          properties: {}
          type: string
        phone:
          description: The owner's Phone
          format: string
          properties: {}
          type: string
        userName:
          description: The owner's UserName
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.auth.RegisterOAuthRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.RegisterReq:
      description: Register with owner permission, send email with OTP code
      properties:
        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
        email:
          description: The merchant owner's email address
          format: string
          properties: {}
          type: string
        firstName:
          description: The merchant owner's first name
          format: string
          properties: {}
          type: string
        lastName:
          description: The merchant owner's last name
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        password:
          description: The owner's password
          format: string
          properties: {}
          type: string
        phone:
          description: The owner's Phone
          format: string
          properties: {}
          type: string
        userName:
          description: The owner's UserName
          format: string
          properties: {}
          type: string
      required:
      - firstName
      - lastName
      - email
      - password
      type: object
    unibee.api.merchant.auth.RegisterRes:
      properties: {}
      type: object
    unibee.api.merchant.auth.RegisterVerifyReq:
      description: 'Merchant Register, verify OTP code '
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        verificationCode:
          description: OTP Code, received from email
          format: string
          properties: {}
          type: string
      required:
      - email
      - verificationCode
      type: object
    unibee.api.merchant.auth.RegisterVerifyRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.RegisterWithoutVerificationReq:
      description: Register with owner permission without code verification
      properties:
        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
        email:
          description: The merchant owner's email address
          format: string
          properties: {}
          type: string
        firstName:
          description: The merchant owner's first name
          format: string
          properties: {}
          type: string
        lastName:
          description: The merchant owner's last name
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        password:
          description: The owner's password
          format: string
          properties: {}
          type: string
        phone:
          description: The owner's Phone
          format: string
          properties: {}
          type: string
        userName:
          description: The owner's UserName
          format: string
          properties: {}
          type: string
      required:
      - firstName
      - lastName
      - email
      - password
      type: object
    unibee.api.merchant.auth.RegisterWithoutVerificationRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.SessionReq:
      description: Session login
      properties:
        session:
          description: The session
          format: string
          properties: {}
          type: string
      required:
      - session
      type: object
    unibee.api.merchant.auth.SessionRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        return_url:
          description: Return URL
          format: string
          properties: {}
          type: string
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.auth.SetupOAuthReq:
      description: 'Member OAuth Setup. Pass OAuth token in request header (Auth.js
        JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      properties:
        email:
          description: The merchant member email address
          format: string
          properties: {}
          type: string
        newPassword:
          description: The new password
          format: string
          properties: {}
          type: string
        setupToken:
          description: The merchant member password setup token
          format: string
          properties: {}
          type: string
      required:
      - email
      - setupToken
      type: object
    unibee.api.merchant.auth.SetupOAuthRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        token:
          description: Access token of admin portal
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.checkout.ArchiveReq:
      properties:
        checkoutId:
          description: checkout id
          format: int64
          properties: {}
          type: integer
      required:
      - checkoutId
      type: object
    unibee.api.merchant.checkout.ArchiveRes:
      properties: {}
      type: object
    unibee.api.merchant.checkout.DetailReq:
      properties:
        checkoutId:
          description: checkout id
          format: int64
          properties: {}
          type: integer
      required:
      - checkoutId
      type: object
    unibee.api.merchant.checkout.DetailRes:
      properties:
        merchantCheckout:
          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
      type: object
    unibee.api.merchant.checkout.EditReq:
      properties:
        checkoutId:
          description: checkout id
          format: int64
          properties: {}
          type: integer
        data:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout config data
          format: map[string]interface {}
          properties: {}
          type: object
        description:
          description: description
          format: string
          properties: {}
          type: string
        name:
          description: name
          format: string
          properties: {}
          type: string
        stagingData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout staging config data
          format: map[string]interface {}
          properties: {}
          type: object
      required:
      - checkoutId
      type: object
    unibee.api.merchant.checkout.EditRes:
      properties:
        merchantCheckout:
          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
      type: object
    unibee.api.merchant.checkout.GetLinkReq:
      properties:
        checkoutId:
          description: checkout id
          format: int64
          properties: {}
          type: integer
        planId:
          format: int64
          properties: {}
          type: integer
      required:
      - checkoutId
      - planId
      type: object
    unibee.api.merchant.checkout.GetLinkRes:
      properties:
        link:
          description: Merchant Checkout Link
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.checkout.ListReq:
      properties:
        SearchKey:
          description: Search checkout id|name|description
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.checkout.ListRes:
      properties:
        merchantCheckouts:
          description: MerchantCheckout List Object
          format: '[]*bean.MerchantCheckout'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.checkout.NewReq:
      properties:
        data:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout config data
          format: map[string]interface {}
          properties: {}
          type: object
        description:
          description: description
          format: string
          properties: {}
          type: string
        name:
          description: name
          format: string
          properties: {}
          type: string
        stagingData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: checkout staging config data
          format: map[string]interface {}
          properties: {}
          type: object
      type: object
    unibee.api.merchant.checkout.NewRes:
      properties:
        merchantCheckout:
          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
      type: object
    unibee.api.merchant.credit.ConfigListReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        types:
          description: type list of credit account, 1-main account, 2-promo credit
            account
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.credit.ConfigListRes:
      properties:
        creditConfigs:
          description: CreditConfig List Object
          format: '[]*bean.CreditConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.credit.CreditAccountListReq:
      description: Get Credit Account list
      properties:
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        email:
          description: filter email of user
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        userId:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.credit.CreditAccountListRes:
      properties:
        creditAccounts:
          description: Credit Account List
          format: '[]*detail.CreditAccountDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.CreditAccountDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.credit.CreditTransactionListReq:
      description: Get Credit Transaction list
      properties:
        accountType:
          description: filter type of account, 1-main account, 2-promo credit account
          format: int
          properties: {}
          type: integer
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: filter currency of account
          format: string
          properties: {}
          type: string
        email:
          description: filter email of user
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        transactionTypes:
          description: transaction type。1-recharge income，2-payment out，3-refund income，4-withdraw
            out，5-withdraw failed income, 6-admin change，7-recharge refund out
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        userId:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      required:
      - accountType
      type: object
    unibee.api.merchant.credit.CreditTransactionListRes:
      properties:
        creditTransactions:
          description: Credit Transaction List
          format: '[]*detail.CreditTransactionDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.CreditTransactionDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.credit.DetailReq:
      properties:
        id:
          description: The credit account Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.credit.DetailRes:
      properties:
        creditAccount:
          $ref: '#/components/schemas/unibee.api.bean.detail.CreditAccountDetail'
        creditTransactions:
          description: Credit Transaction List
          format: '[]*bean.CreditTransaction'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.credit.EditConfigReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          format: '*string'
          properties: {}
          type: string
        discountCodeExclusive:
          description: discount code exclusive when purchase, default no, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，scale = 100, 1 currency = 1 credit
            * (exchange_rate/100), main account fixed rate to 100
          format: '*int64'
          properties: {}
          type: integer
        logo:
          description: logo image base64, show when user purchase
          format: '*string'
          properties: {}
          type: string
        logoUrl:
          description: logo url, show when user purchase
          format: '*string'
          properties: {}
          type: string
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: '*map[string]interface {}'
          properties: {}
          type: object
        name:
          description: name
          format: '*string'
          properties: {}
          type: string
        payoutEnable:
          description: credit account can payout or not, default no, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        previewDefaultUsed:
          description: is default used when in purchase preview, default no, 0-no,
            1-yes
          format: '*int'
          properties: {}
          type: integer
        rechargeEnable:
          description: credit account can recharge or not, default no, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        recurring:
          description: apply to recurring, default no, 0-no,1-yes
          format: '*int'
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-promo credit account
          format: int
          properties: {}
          type: integer
      required:
      - type
      - currency
      type: object
    unibee.api.merchant.credit.EditConfigRes:
      properties:
        creditConfig:
          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
      type: object
    unibee.api.merchant.credit.EditCreditAccountReq:
      description: Edit User Credit Account Config
      properties:
        id:
          description: id of credit account
          format: int64
          properties: {}
          type: integer
        payoutEnable:
          description: credit account can used or payout|apply in purchase or not,
            0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        rechargeEnable:
          description: credit account can be recharged|increment or not, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.credit.EditCreditAccountRes:
      properties:
        UserCreditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
      type: object
    unibee.api.merchant.credit.EditPromoConfigReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          format: '*string'
          properties: {}
          type: string
        discountCodeExclusive:
          description: discount code exclusive when purchase, default no, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，scale = 100, 1 currency = 1 credit
            * (exchange_rate/100), main account fixed rate to 100
          format: '*int64'
          properties: {}
          type: integer
        logo:
          description: logo image base64, show when user purchase
          format: '*string'
          properties: {}
          type: string
        logoUrl:
          description: logo url, show when user purchase
          format: '*string'
          properties: {}
          type: string
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: '*map[string]interface {}'
          properties: {}
          type: object
        name:
          description: name
          format: '*string'
          properties: {}
          type: string
        payoutEnable:
          description: credit account can payout or not, default no, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        previewDefaultUsed:
          description: is default used when in purchase preview, default no, 0-no,
            1-yes
          format: '*int'
          properties: {}
          type: integer
        rechargeEnable:
          description: credit account can be recharged or not, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        recurring:
          description: apply to recurring, default no, 0-no,1-yes
          format: '*int'
          properties: {}
          type: integer
      required:
      - currency
      type: object
    unibee.api.merchant.credit.EditPromoConfigRes:
      properties:
        creditConfig:
          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
      type: object
    unibee.api.merchant.credit.NewConfigReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          format: string
          properties: {}
          type: string
        discountCodeExclusive:
          description: discount code exclusive when purchase, default no, 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        exchangeRate:
          description: keep two decimal places，scale = 100, 1 currency = 1 credit
            * (exchange_rate/100), no effect on main account type
          format: int64
          properties: {}
          type: integer
        logo:
          description: logo image base64, show when user purchase
          format: string
          properties: {}
          type: string
        logoUrl:
          description: logo url, show when user purchase
          format: string
          properties: {}
          type: string
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: name
          format: string
          properties: {}
          type: string
        payoutEnable:
          description: credit account can used or payout in purchase or not, 0-no,
            1-yes
          format: '*int'
          properties: {}
          type: integer
        previewDefaultUsed:
          description: is default used when in purchase preview, default no, 0-no,
            1-yes
          format: '*int'
          properties: {}
          type: integer
        rechargeEnable:
          description: credit account can be recharged or not, 0-no, 1-yes
          format: '*int'
          properties: {}
          type: integer
        recurring:
          description: apply to recurring, default no, 0-no,1-yes
          format: int
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-promo credit account
          format: int
          properties: {}
          type: integer
      required:
      - type
      - currency
      type: object
    unibee.api.merchant.credit.NewConfigRes:
      properties:
        creditConfig:
          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
      type: object
    unibee.api.merchant.credit.NewCreditRechargeReq:
      description: New Credit Recharge
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        creditAccountId:
          description: 'id of credit account, either userId&currency or creditAccountId '
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of recharge
          format: string
          properties: {}
          type: string
        description:
          description: recharge description
          format: string
          properties: {}
          type: string
        gatewayId:
          format: int64
          properties: {}
          type: integer
        name:
          description: recharge name
          format: string
          properties: {}
          type: string
        rechargeAmount:
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
        userId:
          description: 'id of user to recharge, either userId&currency or creditAccountId '
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      - rechargeAmount
      type: object
    unibee.api.merchant.credit.NewCreditRechargeRes:
      properties:
        creditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        creditRecharge:
          $ref: '#/components/schemas/unibee.api.bean.CreditRecharge'
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        link:
          format: string
          properties: {}
          type: string
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.Merchant'
        paid:
          description: Paid，true|false
          format: bool
          properties: {}
          type: boolean
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.merchant.credit.PromoConfigReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.credit.PromoConfigRes:
      properties:
        creditConfig:
          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
      type: object
    unibee.api.merchant.credit.PromoConfigStatisticsReq:
      properties:
        currency:
          description: currency
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.credit.PromoConfigStatisticsRes:
      properties:
        creditConfigStatistics:
          $ref: '#/components/schemas/unibee.api.bean.CreditConfigStatistics'
      type: object
    unibee.api.merchant.credit.PromoCreditDecrementReq:
      description: Decrease user promo credit amount, the amount after decreased should
        greater than 0
      properties:
        amount:
          description: The Amount to decrease, should greater than 0
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of recharge
          format: string
          properties: {}
          type: string
        description:
          description: description of increase action
          format: string
          properties: {}
          type: string
        idempotencyKey:
          description: Optional. Client-supplied idempotency key, max 256 chars (UUID
            recommended). Retrying the same key returns the original credit transaction
            and does NOT decrease the balance a second time. Reusing the same key
            with a different amount or currency is rejected. Increment and decrement
            use separate namespaces and are isolated per merchant and user, so reusing
            the same key on the increment endpoint, under another merchant, or for
            another user does not collide. If two requests with the same key are still
            in-flight, the later one returns an error and should be retried by the
            caller.
          format: string
          properties: {}
          type: string
        name:
          description: name of increase action
          format: string
          properties: {}
          type: string
        userId:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - currency
      - amount
      type: object
    unibee.api.merchant.credit.PromoCreditDecrementRes:
      properties:
        UserPromoCreditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        creditTransaction:
          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
      type: object
    unibee.api.merchant.credit.PromoCreditIncrementReq:
      description: Increase user promo credit amount
      properties:
        amount:
          description: The amount to increase, should greater than 0
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency of recharge
          format: string
          properties: {}
          type: string
        description:
          description: description of increase action
          format: string
          properties: {}
          type: string
        idempotencyKey:
          description: Optional. Client-supplied idempotency key, max 256 chars (UUID
            recommended). Retrying the same key returns the original credit transaction
            and does NOT increase the balance a second time. Reusing the same key
            with a different amount or currency is rejected. Increment and decrement
            use separate namespaces and are isolated per merchant and user, so reusing
            the same key on the decrement endpoint, under another merchant, or for
            another user does not collide. If two requests with the same key are still
            in-flight, the later one returns an error and should be retried by the
            caller.
          format: string
          properties: {}
          type: string
        name:
          description: name of increase action
          format: string
          properties: {}
          type: string
        userId:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - currency
      - amount
      type: object
    unibee.api.merchant.credit.PromoCreditIncrementRes:
      properties:
        UserPromoCreditAccount:
          $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
        creditTransaction:
          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
      type: object
    unibee.api.merchant.credit.PromoCreditRefundFromInvoiceReq:
      description: Refund user promo credit amount from refund invoice
      properties:
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.credit.PromoCreditRefundFromInvoiceRes:
      properties: {}
      type: object
    unibee.api.merchant.discount.ActivateReq:
      description: Activate discount code, the discount code can only effect to payment
        or subscription after activated
      properties:
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.ActivateRes:
      properties: {}
      type: object
    unibee.api.merchant.discount.BatchChildrenDetailReq:
      description: Get detail of a specific batch child code
      properties:
        id:
          description: The child code's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.BatchChildrenDetailRes:
      properties:
        child:
          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCode'
      type: object
    unibee.api.merchant.discount.BatchChildrenGenerateReq:
      description: Generate child codes for a batch template. Template must be in
        active status. Supports initial generation, retry on failure, and incremental
        expansion. Either templateId or templateCode must be provided. If quantity
        > 1000, isAsync must be set to true. Default is synchronous execution.
      properties:
        codeLength:
          description: Optional. Total length of generated child code (prefix + random
            part). Must be > len(templateCode) and <= 190. The random part length
            must be sufficient to support the template's target quantity.
          format: '*int'
          properties: {}
          type: integer
        isAsync:
          description: Force async execution. Default is false (synchronous). If quantity
            > 1000, this must be set to true.
          format: '*bool'
          properties: {}
          type: boolean
        quantity:
          description: Number of child codes to generate. If not provided, generates
            up to the template's quantity limit minus existing count. Must not exceed
            the remaining available quantity.
          format: '*int64'
          properties: {}
          type: integer
        randomStyle:
          description: 'Optional. Random part style: auto|numeric|lower|upper. Default
            is auto, which infers style from templateCode: all digits -> numeric,
            all lowercase (with optional digits) -> lower, otherwise upper.'
          format: '*string'
          properties: {}
          type: string
        templateCode:
          description: The template's code prefix (alternative to templateId)
          format: string
          properties: {}
          type: string
        templateId:
          description: The template's Id (alternative to templateCode)
          format: '*int64'
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.discount.BatchChildrenGenerateRes:
      properties:
        existingCount:
          description: Already generated count before this operation
          format: int64
          properties: {}
          type: integer
        failedCount:
          description: Failed count in this operation (only for synchronous execution)
          format: int
          properties: {}
          type: integer
        generatedCount:
          description: Newly generated count in this operation (only for synchronous
            execution)
          format: int
          properties: {}
          type: integer
        isAsync:
          description: Whether the generation is running asynchronously
          format: bool
          properties: {}
          type: boolean
        successCount:
          description: Successfully inserted count in this operation (only for synchronous
            execution)
          format: int
          properties: {}
          type: integer
        templateCode:
          description: Template code prefix
          format: string
          properties: {}
          type: string
        templateId:
          description: Template ID
          format: int64
          properties: {}
          type: integer
        totalTarget:
          description: Target total quantity
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.discount.BatchChildrenListReq:
      description: Get list of child codes for a specific batch template
      properties:
        code:
          description: Filter by child code, fuzzy search
          format: string
          properties: {}
          type: string
        count:
          description: Count per page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: Filter by create time end, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: Filter by create time start, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
        page:
          description: Page number, start from 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort field, gmt_create|gmt_modify, default gmt_create
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort type, asc|desc, default desc
          format: string
          properties: {}
          type: string
        templateId:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
      required:
      - templateId
      type: object
    unibee.api.merchant.discount.BatchChildrenListRes:
      properties:
        children:
          description: Child code list
          format: '[]*bean.MerchantBatchDiscountCode'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCode'
          properties: {}
          type: array
        total:
          description: Total count
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.discount.BatchTemplateDetailReq:
      description: Get batch discount template detail
      properties:
        id:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.BatchTemplateDetailRes:
      properties:
        template:
          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
      type: object
    unibee.api.merchant.discount.BatchTemplateEditReq:
      description: Edit batch discount template. CodePrefix cannot be modified. Quantity
        can only be increased after activation.
      properties:
        advance:
          description: AdvanceConfig, enable advanced configurations
          format: '*bool'
          properties: {}
          type: boolean
        billingType:
          description: The billing type, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        codePrefix:
          description: The code prefix, must match existing value, cannot be modified
          format: string
          properties: {}
          type: string
        currency:
          description: The discount currency
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: The count limitation of subscription cycle, 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: The discount amount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: The discount percentage, 100=1%
          format: int64
          properties: {}
          type: integer
        discountType:
          description: The discount type, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: The end time, editable after activate, utc timestamp in seconds
          format: '*int64'
          properties: {}
          type: integer
        id:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata, custom key-value pairs
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: The batch template's display name
          format: '*string'
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: Plan apply type, 0-apply for all, 1-specified, 2-exclude, 3-by
            groups, 4-except groups
          format: '*int'
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: Target number of child codes, can only increase after activation,
            max 10000
          format: '*int64'
          properties: {}
          type: integer
        startTime:
          description: The start time, editable after activate, utc timestamp in seconds
          format: '*int64'
          properties: {}
          type: integer
        subscriptionLimit:
          description: The limit of every subscription apply, 0-unlimited
          format: int
          properties: {}
          type: integer
        upgradeLongPlanOnly:
          description: AdvanceConfig, true-only for upgrade to longer plan
          format: '*bool'
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, true-only for same interval upgrade
          format: '*bool'
          properties: {}
          type: boolean
        userLimit:
          description: AdvanceConfig, Per customer limit, 0-unlimited
          format: '*int'
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope, 0-all, 1-new user, 2-renewals
          format: '*int'
          properties: {}
          type: integer
      required:
      - id
      - codePrefix
      type: object
    unibee.api.merchant.discount.BatchTemplateEditRes:
      properties:
        template:
          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
      type: object
    unibee.api.merchant.discount.BatchTemplateListReq:
      description: Get batch discount template list
      properties:
        billingType:
          description: Filter by billing_type, 1-one-time, 2-recurring
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        codePrefix:
          description: Filter by code prefix
          format: string
          properties: {}
          type: string
        count:
          description: Count per page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: Filter by create time end, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: Filter by create time start, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: Filter by currency
          format: string
          properties: {}
          type: string
        discountType:
          description: Filter by discount_type, 1-percentage, 2-fixed_amount
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        page:
          description: Page number, start from 0
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search by code prefix or name
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort field, gmt_create|gmt_modify, default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort type, asc|desc, default desc
          format: string
          properties: {}
          type: string
        status:
          description: Filter by status, 1-editable, 2-active, 3-deactive, 4-expire,
            10-archive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.discount.BatchTemplateListRes:
      properties:
        activeTemplateCount:
          description: Total count of active template codes
          format: int64
          properties: {}
          type: integer
        templates:
          description: Batch template list
          format: '[]*bean.MerchantBatchDiscountCodeTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
          properties: {}
          type: array
        total:
          description: Total count
          format: int
          properties: {}
          type: integer
        totalChildCodeCount:
          description: Total count of all child codes
          format: int64
          properties: {}
          type: integer
        usageRate:
          description: Usage rate (usedChildCodeCount / totalChildCodeCount), 0-1
          format: float64
          properties: {}
          type: number
        usedChildCodeCount:
          description: Total count of used child codes
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.discount.BatchTemplateNewReq:
      description: Create a batch discount code template. Template must be activated
        before generating child codes.
      properties:
        advance:
          description: AdvanceConfig, enable advanced configurations
          format: '*bool'
          properties: {}
          type: boolean
        billingType:
          description: The billing type of the discount code, 1-one-time, 2-recurring
          format: int
          properties: {}
          type: integer
        codePrefix:
          description: The unique code prefix for this batch template, will be used
            as template identifier and child code prefix, length 1-20
          format: string
          properties: {}
          type: string
        currency:
          description: The discount currency, available when discount_type is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: The count limitation of subscription cycle, 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: The discount amount, available when discount_type is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: The discount percentage, 100=1%, available when discount_type
            is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: The discount type of the discount code, 1-percentage, 2-fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: The end time of discount code can effect, utc timestamp in
            seconds
          format: '*int64'
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata, custom key-value pairs
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: The batch template's display name
          format: '*string'
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: Plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups, 4-Apply to
            Plans except by Groups
          format: '*int'
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: Target number of child codes to generate, max 10000
          format: '*int64'
          properties: {}
          type: integer
        startTime:
          description: The start time of discount code can effect, utc timestamp in
            seconds
          format: '*int64'
          properties: {}
          type: integer
        subscriptionLimit:
          description: The limit of every subscription apply, 0-unlimited
          format: int
          properties: {}
          type: integer
        upgradeLongPlanOnly:
          description: AdvanceConfig, true-forbid for all except upgrade to longer
            plan
          format: '*bool'
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, true-forbid for all except same interval upgrade
            action
          format: '*bool'
          properties: {}
          type: boolean
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, 0-unlimited
          format: '*int'
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope, 0-for all, 1-for only new
            user, 2-for only renewals
          format: '*int'
          properties: {}
          type: integer
      required:
      - codePrefix
      - billingType
      - discountType
      - startTime
      - endTime
      - quantity
      type: object
    unibee.api.merchant.discount.BatchTemplateNewRes:
      properties:
        template:
          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
      type: object
    unibee.api.merchant.discount.BatchTemplateQuantityIncrementReq:
      description: Increment batch template quantity. Template must be activated.
        Total quantity after increment must not exceed 10000.
      properties:
        amount:
          description: The quantity amount to increase, must be greater than 0
          format: int64
          properties: {}
          type: integer
        id:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      - amount
      type: object
    unibee.api.merchant.discount.BatchTemplateQuantityIncrementRes:
      properties:
        template:
          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
      type: object
    unibee.api.merchant.discount.DeactivateReq:
      description: Deactivate discount code
      properties:
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.DeactivateRes:
      properties: {}
      type: object
    unibee.api.merchant.discount.DeleteReq:
      description: Delete discount code before activate
      properties:
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.discount.DetailReq:
      properties:
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.DetailRes:
      properties:
        discount:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantDiscountCodeDetail'
      type: object
    unibee.api.merchant.discount.EditReq:
      description: Edit the discount code before activate
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set true
          format: '*bool'
          properties: {}
          type: boolean
        billingType:
          description: The billing type of the discount code, 1-one-time, 2-recurring,
            define the situation the code can be used, the code of one-time billing_type
            can used for all situation that effect only once, the code of recurring
            billing_tye can only used for subscription purchase
          format: int
          properties: {}
          type: integer
        currency:
          description: The discount currency of discount code, available when discount_type
            is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: The count limitation of subscription cycle，each subscription
            is valid separately, 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: The discount amount of the discount code, available when discount_type
            is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: The discount percentage of discount code, 100=1%, available
            when discount_type is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: The discount type of the discount code, 1-percentage, 2-fixed_amount,
            the discountType of code, the discountPercentage will be effect when discountType
            is percentage, the discountAmount and currency will be effect when discountTYpe
            is fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: The end time of discount code can effect, editable after activate,
            utc time
          format: '*int64'
          properties: {}
          type: integer
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: The discount's name
          format: '*string'
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups(Billing Period
            Included), 4-Apply to Plans except by Groups(Billing Period Included)
          format: '*int'
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: Quantity of code, default 0, set 0 to disable quantity management
          format: '*int64'
          properties: {}
          type: integer
        startTime:
          description: The start time of discount code can effect, editable after
            activate, utc time
          format: '*int64'
          properties: {}
          type: integer
        upgradeLongPlanOnly:
          description: AdvanceConfig, true or false, will forbid for all except upgrade
            to longer plan if set true
          format: '*bool'
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, true or false, will forbid for all except same
            interval upgrade action if set true
          format: '*bool'
          properties: {}
          type: boolean
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited
          format: '*int'
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: '*int'
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.EditRes:
      properties:
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
      type: object
    unibee.api.merchant.discount.ListReq:
      description: Get discountCode list
      properties:
        billingType:
          description: billing_type, 1-one-time, 2-recurring
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        code:
          description: Filter Code
          format: string
          properties: {}
          type: string
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: Filter Currency
          format: string
          properties: {}
          type: string
        discountType:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search Key, code or name
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: status, 1-editable, 2-active, 3-deactive, 4-expire, 10-archive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.discount.ListRes:
      properties:
        discounts:
          description: Discount Object List
          format: '[]*detail.MerchantDiscountCodeDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantDiscountCodeDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.discount.NewReq:
      description: Create a new discount code, code can used in onetime or subscription
        purchase to make discount
      properties:
        advance:
          description: AdvanceConfig, 0-false,1-true, will enable all advance config
            if set true
          format: '*bool'
          properties: {}
          type: boolean
        billingType:
          description: The billing type of the discount code, 1-one-time, 2-recurring,
            define the situation the code can be used, the code of one-time billing_type
            can used for all situation that effect only once, the code of recurring
            billing_tye can only used for subscription purchase
          format: int
          properties: {}
          type: integer
        code:
          description: The discount's unique code, customize by merchant
          format: string
          properties: {}
          type: string
        currency:
          description: The discount currency of discount code, available when discount_type
            is fixed_amount
          format: string
          properties: {}
          type: string
        cycleLimit:
          description: The count limitation of subscription cycle, each subscription
            is valid separately , 0-no limit
          format: int
          properties: {}
          type: integer
        discountAmount:
          description: The discount amount of the discount code, available when discount_type
            is fixed_amount
          format: int64
          properties: {}
          type: integer
        discountPercentage:
          description: The discount percentage of discount code, 100=1%, available
            when discount_type is percentage
          format: int64
          properties: {}
          type: integer
        discountType:
          description: The discount type of the discount code, 1-percentage, 2-fixed_amount,
            the discountType of code, the discountPercentage will be effect when discountType
            is percentage, the discountAmount and currency will be effect when discountTYpe
            is fixed_amount
          format: int
          properties: {}
          type: integer
        endTime:
          description: The end time of discount code can effect, utc time
          format: '*int64'
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: The discount's name
          format: '*string'
          properties: {}
          type: string
        planApplyGroup:
          $ref: '#/components/schemas/unibee.api.bean.GroupPlanSelector'
        planApplyType:
          description: plan apply type, 0-apply for all, 1-apply for plans specified,
            2-exclude for plans specified, 3-Apply to Plans by Groups(Billing Period
            Included), 4-Apply to Plans except by Groups(Billing Period Included)
          format: '*int'
          properties: {}
          type: integer
        planIds:
          description: Ids of plan which discount code can effect, default effect
            all plans if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        quantity:
          description: Quantity of code, default 0, set 0 to disable quantity management
          format: '*int64'
          properties: {}
          type: integer
        startTime:
          description: The start time of discount code can effect, utc time
          format: '*int64'
          properties: {}
          type: integer
        upgradeLongPlanOnly:
          description: AdvanceConfig, true or false, will forbid for all except upgrade
            to longer plan if set true
          format: '*bool'
          properties: {}
          type: boolean
        upgradeOnly:
          description: AdvanceConfig, true or false, will forbid for all except same
            interval upgrade action if set true
          format: '*bool'
          properties: {}
          type: boolean
        userIds:
          description: Ids of user which discount code can effect, default effect
            all users if not set
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        userLimit:
          description: AdvanceConfig, The limit of every customer can apply, the recurring
            apply not involved, 0-unlimited
          format: '*int'
          properties: {}
          type: integer
        userScope:
          description: AdvanceConfig, Apply user scope,0-for all, 1-for only new user,
            2-for only renewals, renewals is upgrade&downgrade&renew
          format: '*int'
          properties: {}
          type: integer
      required:
      - code
      - billingType
      - discountType
      - startTime
      - endTime
      type: object
    unibee.api.merchant.discount.NewRes:
      properties:
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
      type: object
    unibee.api.merchant.discount.PlanApplyPreviewReq:
      description: Check discount can apply to plan, Only check rules about plan，the
        actual usage is subject to the subscription interface
      properties:
        addonParams:
          description: Addon list with quantity, align with subscription create preview
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        code:
          description: The discount's unique code, customize by merchant
          format: string
          properties: {}
          type: string
        currency:
          description: The currency of plan which code to apply
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        externalPlanId:
          description: The externalId of plan which code to apply, either planId or
            externalPlanId is needed
          format: string
          properties: {}
          type: string
        isChangeToLongPlan:
          description: IsChangeToLongPlan
          format: '*bool'
          properties: {}
          type: boolean
        isChangeToSameIntervalPlan:
          description: IsChangeToSameIntervalPlan
          format: '*bool'
          properties: {}
          type: boolean
        isUpgrade:
          description: IsUpgrade
          format: '*bool'
          properties: {}
          type: boolean
        planId:
          description: The id of plan which code to apply, either planId or externalPlanId
            is needed
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Main plan quantity, default 1; align with subscription create
            preview
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: Optional. SubscriptionId for more accurate user-scope evaluation.
            When provided, it takes priority over email.
          format: string
          properties: {}
          type: string
      required:
      - code
      type: object
    unibee.api.merchant.discount.PlanApplyPreviewRes:
      properties:
        allPlansAllowed:
          description: True = discount applies to all plans in cart; false = only
            to allowedPlanIds
          format: bool
          properties: {}
          type: boolean
        allowedPlanIds:
          description: Plan ids that get this discount (when partial apply); empty
            or same as main+addons when all plans allowed
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        discountAmount:
          description: The discount amount can apply to plan
          format: int64
          properties: {}
          type: integer
        discountCode:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        failureReason:
          description: The apply preview failure reason
          format: string
          properties: {}
          type: string
        valid:
          description: The apply preview result, true or false
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.discount.QuantityDecrementReq:
      description: Decrease discount code quantity, the quantity after decreased should
        greater than 0, the action may disable quantity control if quantity decrease
        to 0 or lower than quantityUsed after decreased
      properties:
        amount:
          description: The discount quantity Amount to decrease, should greater than
            0
          format: int64
          properties: {}
          type: integer
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.QuantityDecrementRes:
      properties:
        discountCode:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
      type: object
    unibee.api.merchant.discount.QuantityIncrementReq:
      description: Increase discount code quantity, if original quantity is 0, increase
        greater than 0 will enable quantity control
      properties:
        amount:
          description: The discount quantity amount to increase, should greater than
            0
          format: int64
          properties: {}
          type: integer
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.discount.QuantityIncrementRes:
      properties:
        discountCode:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
      type: object
    unibee.api.merchant.discount.UserDiscountListReq:
      description: Get user discountCode list
      properties:
        childCode:
          description: Filter Child Code (fuzzy search), only available when Id is
            batch template ID
          format: string
          properties: {}
          type: string
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        email:
          description: Filter Email Default All
          format: string
          properties: {}
          type: string
        id:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: Filter PlanIds Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: Filter Status Default All, 1-used, 2-rollback
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        subscriptionIds:
          description: Filter SubscriptionIds Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        userIds:
          description: Filter UserIds Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      required:
      - id
      type: object
    unibee.api.merchant.discount.UserDiscountListRes:
      properties:
        total:
          description: Total
          format: int
          properties: {}
          type: integer
        userDiscounts:
          description: User Discount Object List
          format: '[]*detail.MerchantUserDiscountCodeDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantUserDiscountCodeDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.email.ActivateLocalizationVersionReq:
      properties:
        templateName:
          description: Template Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionId:
          description: activate default if not specified
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.email.ActivateLocalizationVersionRes:
      properties: {}
      type: object
    unibee.api.merchant.email.AddLocalizationVersionReq:
      properties:
        localizations:
          format: '[]*bean.EmailLocalizationTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.EmailLocalizationTemplate'
          properties: {}
          required:
          - "true"
          type: array
        templateName:
          description: Template Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionName:
          description: Versioin Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
      type: object
    unibee.api.merchant.email.AddLocalizationVersionRes:
      properties:
        localizationVersion:
          $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationVersion'
      type: object
    unibee.api.merchant.email.CustomizeLocalizationTemplateSyncReq:
      description: Sync the custom localization email template to gateway (sendgrid)
      properties:
        templateData:
          description: TemplateData
          format: '[]bean.MerchantLocalizationEmailTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationEmailTemplate'
          properties: {}
          type: array
        versionEnable:
          description: VersionEnable
          format: bool
          properties: {}
          type: boolean
      required:
      - templateData
      type: object
    unibee.api.merchant.email.CustomizeLocalizationTemplateSyncRes:
      properties: {}
      type: object
    unibee.api.merchant.email.DeleteLocalizationVersionReq:
      properties:
        templateName:
          description: Template Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionId:
          format: string
          properties: {}
          required:
          - "true"
          type: string
      type: object
    unibee.api.merchant.email.DeleteLocalizationVersionRes:
      properties: {}
      type: object
    unibee.api.merchant.email.EditLocalizationVersionReq:
      properties:
        localizations:
          format: '[]*bean.EmailLocalizationTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.EmailLocalizationTemplate'
          properties: {}
          required:
          - "true"
          type: array
        templateName:
          description: Template Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionId:
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionName:
          format: '*string'
          properties: {}
          type: string
      type: object
    unibee.api.merchant.email.EditLocalizationVersionRes:
      properties:
        localizationVersion:
          $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationVersion'
      type: object
    unibee.api.merchant.email.GatewaySetDefaultReq:
      properties:
        gatewayName:
          description: The name of email gateway, available for sendgrid|smtp
          format: string
          properties: {}
          type: string
      required:
      - gatewayName
      type: object
    unibee.api.merchant.email.GatewaySetDefaultRes:
      properties: {}
      type: object
    unibee.api.merchant.email.GatewaySetupReq:
      properties:
        IsDefault:
          description: Whether setup the gateway as default or not, default is true
          format: '*bool'
          properties: {}
          type: boolean
        data:
          description: The setup data of email gateway
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The name of email gateway, available for sendgrid
          format: string
          properties: {}
          type: string
      required:
      - gatewayName
      - data
      type: object
    unibee.api.merchant.email.GatewaySetupRes:
      properties:
        data:
          description: The hide star data
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.email.GatewaySetupV2Req:
      properties:
        IsDefault:
          description: Whether setup the gateway as default or not, default is false
          format: bool
          properties: {}
          type: boolean
        apiCredential:
          $ref: '#/components/schemas/unibee.api.bean.EmailGatewayConnectionAPIKeysUpdate'
        gatewayName:
          description: The name of email gateway, available for sendgrid|smtp
          format: string
          properties: {}
          type: string
      required:
      - gatewayName
      type: object
    unibee.api.merchant.email.GatewaySetupV2Res:
      properties: {}
      type: object
    unibee.api.merchant.email.HistoryListReq:
      description: Get email send history list
      properties:
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        email:
          description: Filter Email
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search Key, email or title
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: status, 0-pending, 1-success, 2-failure
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.email.HistoryListRes:
      properties:
        emailHistories:
          description: Email History Object List
          format: '[]*detail.MerchantEmailHistoryDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantEmailHistoryDetail'
          properties: {}
          type: array
        emailHistoryStatistics:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantEmailHistoryStatistics'
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.email.SendEmailToUserReq:
      properties:
        attachInvoiceId:
          description: AttachInvoiceId
          format: string
          properties: {}
          type: string
        content:
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The name of email gateway, available for sendgrid|smtp, default
            gateway will use if not provide
          format: string
          properties: {}
          type: string
        gatewayTemplateId:
          description: GatewayTemplateId
          format: string
          properties: {}
          type: string
        language:
          description: Language
          format: string
          properties: {}
          type: string
        subject:
          format: string
          properties: {}
          type: string
        variables:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Variables，Map
          format: map[string]interface {}
          properties: {}
          type: object
      required:
      - email
      type: object
    unibee.api.merchant.email.SendEmailToUserRes:
      properties: {}
      type: object
    unibee.api.merchant.email.SendEmailViaAPICredentialReq:
      properties:
        apiCredential:
          $ref: '#/components/schemas/unibee.api.bean.EmailGatewayConnectionAPIKeys'
        content:
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The name of email gateway, available for sendgrid|smtp, default
            gateway will use if not provide
          format: string
          properties: {}
          type: string
        language:
          description: Language
          format: string
          properties: {}
          type: string
        subject:
          format: string
          properties: {}
          type: string
        variables:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Variables，Map
          format: map[string]interface {}
          properties: {}
          type: object
      required:
      - email
      - gatewayName
      type: object
    unibee.api.merchant.email.SendEmailViaAPICredentialRes:
      properties: {}
      type: object
    unibee.api.merchant.email.SendTemplateEmailToUserReq:
      properties:
        attachInvoiceId:
          description: AttachInvoiceId
          format: string
          properties: {}
          type: string
        templateName:
          description: The name of email template
          format: string
          properties: {}
          type: string
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
        variables:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Variables，Map
          format: map[string]interface {}
          properties: {}
          type: object
      required:
      - templateName
      - userId
      type: object
    unibee.api.merchant.email.SendTemplateEmailToUserRes:
      properties: {}
      type: object
    unibee.api.merchant.email.SenderSetupReq:
      properties:
        address:
          description: The address of email sender, like 'no-reply@unibee.dev'
          format: string
          properties: {}
          type: string
        name:
          description: The name of email sender, like 'UniBee'
          format: string
          properties: {}
          type: string
      required:
      - name
      - address
      type: object
    unibee.api.merchant.email.SenderSetupRes:
      properties: {}
      type: object
    unibee.api.merchant.email.TemplateListReq:
      properties: {}
      type: object
    unibee.api.merchant.email.TemplateListRes:
      properties:
        emailTemplateList:
          description: Email Template Object List
          format: '[]*bean.MerchantEmailTemplate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantEmailTemplate'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.email.TestLocalizationVersionReq:
      properties:
        email:
          description: Email
          format: string
          properties: {}
          required:
          - "true"
          type: string
        language:
          description: Language
          format: string
          properties: {}
          required:
          - "true"
          type: string
        templateName:
          description: Template Name
          format: string
          properties: {}
          required:
          - "true"
          type: string
        versionId:
          format: string
          properties: {}
          required:
          - "true"
          type: string
      type: object
    unibee.api.merchant.email.TestLocalizationVersionRes:
      properties: {}
      type: object
    unibee.api.merchant.gateway.ArchiveReq:
      description: Archive the exist payment gateway，available for setup new one,
        the old user continue using the old gateway
      properties:
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.ArchiveRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.DetailReq:
      description: Get Payment Gateway Detail
      properties:
        gatewayId:
          description: The id of payment gateway, either gatewayId or gatewayName
            should provided
          format: '*int64'
          properties: {}
          type: integer
        gatewayName:
          description: The specified name of payment gateway, either gatewayId or
            gatewayName should provided, stripe|paypal|changelly|unitpay|payssion|cryptadium,
            return default gateway if provided
          format: '*string'
          properties: {}
          type: string
      type: object
    unibee.api.merchant.gateway.DetailRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.EditCountryConfigReq:
      description: Edit country config for payment gateway, to enable or disable the
        payment for countryCode, default is enable
      properties:
        countryConfig:
          additionalProperties:
            format: bool
            properties: {}
            type: boolean
          description: The country config of payment gateway, a map with countryCode
            as key, and value for enable or disable
          format: map[string]bool
          properties: {}
          type: object
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.EditCountryConfigRes:
      properties: {}
      type: object
    unibee.api.merchant.gateway.EditReq:
      description: Edit the exist payment gateway
      properties:
        companyIssuer:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCompanyIssuer'
        currencyExchange:
          description: The currency exchange for gateway payment, effect at start
            of payment creation when currency matched
          format: '[]*detail.GatewayCurrencyExchange'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCurrencyExchange'
          properties: {}
          type: array
        displayName:
          description: The displayName of payment gateway
          format: '*string'
          properties: {}
          type: string
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
        gatewayKey:
          description: The key of payment gateway
          format: '*string'
          properties: {}
          type: string
        gatewayLogo:
          description: The logo of payment gateway
          format: '*[]string'
          items:
            format: '[]string'
            items:
              format: string
              properties: {}
              type: string
            properties: {}
            type: array
          properties: {}
          type: array
        gatewayPaymentTypes:
          description: Selected gateway payment types
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewaySecret:
          description: The secret of payment gateway
          format: '*string'
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        sort:
          description: The sort value of payment gateway, The higher the value, the
            lower the ranking
          format: '*int64'
          properties: {}
          type: integer
        subGateway:
          description: The sub gateway of payment gateway
          format: '*string'
          properties: {}
          type: string
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.EditRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.EditSortReq:
      properties:
        gatewaySorts:
          description: structure gateway sort
          format: '[]*detail.GatewaySort'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.GatewaySort'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.gateway.EditSortRes:
      properties:
        gateways:
          description: Payment Gateway Setup Object List
          format: '[]*detail.Gateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.gateway.ListReq:
      properties:
        archive:
          description: Filter archive gateway or not, default all
          format: '*bool'
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.gateway.ListRes:
      properties:
        gateways:
          description: Payment Gateway Object List
          format: '[]*detail.Gateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.gateway.RestoreReq:
      description: Restore the exist payment gateway
      properties:
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.RestoreRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.SetDefaultReq:
      description: Set default the exist payment gateway
      properties:
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.SetDefaultRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.SetupExchangeApiReq:
      properties:
        exchangeRateApiKey:
          description: The key of exchange rate api
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.gateway.SetupExchangeApiRes:
      properties:
        data:
          description: The hide star key of exchange rate api
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.gateway.SetupListReq:
      properties: {}
      type: object
    unibee.api.merchant.gateway.SetupListRes:
      properties:
        gateways:
          description: Payment Gateway Setup Object List
          format: '[]*detail.Gateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.gateway.SetupReq:
      description: Setup Payment gateway
      properties:
        companyIssuer:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCompanyIssuer'
        currencyExchange:
          description: The currency exchange for gateway payment, effect at start
            of payment creation when currency matched
          format: '[]*detail.GatewayCurrencyExchange'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCurrencyExchange'
          properties: {}
          type: array
        displayName:
          description: The displayName of payment gateway
          format: '*string'
          properties: {}
          type: string
        gatewayIcons:
          description: The icons of payment gateway
          format: '*[]string'
          items:
            format: '[]string'
            items:
              format: string
              properties: {}
              type: string
            properties: {}
            type: array
          properties: {}
          type: array
        gatewayKey:
          description: The key of payment gateway
          format: string
          properties: {}
          type: string
        gatewayName:
          description: The name of payment gateway, stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        gatewayPaymentTypes:
          description: Selected gateway payment types
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewaySecret:
          description: The secret of payment gateway
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        sort:
          description: The sort value of payment gateway, The higher the value, the
            lower the ranking
          format: '*int64'
          properties: {}
          type: integer
        subGateway:
          description: The sub gateway of payment gateway
          format: string
          properties: {}
          type: string
      required:
      - gatewayName
      type: object
    unibee.api.merchant.gateway.SetupRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.SetupWebhookReq:
      properties:
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
        webhookSecret:
          description: The secret of gateway webhook
          format: string
          properties: {}
          type: string
      required:
      - gatewayId
      type: object
    unibee.api.merchant.gateway.SetupWebhookRes:
      properties:
        gatewayWebhookUrl:
          description: The webhook endpoint url of payment gateway, if gateway is
            stripe, the url will setting to stripe by api automatic
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.gateway.WireTransferEditReq:
      description: Edit the wire transfer
      properties:
        bank:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayBank'
        currency:
          description: 'The currency of wire transfer '
          format: string
          properties: {}
          type: string
        displayName:
          description: The displayName of payment gateway
          format: '*string'
          properties: {}
          type: string
        gatewayIcons:
          description: The icons of payment gateway
          format: '*[]string'
          items:
            format: '[]string'
            items:
              format: string
              properties: {}
              type: string
            properties: {}
            type: array
          properties: {}
          type: array
        gatewayId:
          description: The id of payment gateway
          format: int64
          properties: {}
          type: integer
        minimumAmount:
          description: The minimum amount of wire transfer, cents
          format: int64
          properties: {}
          type: integer
        sort:
          description: The sort value of payment gateway, The higher the value, the
            lower the ranking
          format: '*int64'
          properties: {}
          type: integer
      required:
      - gatewayId
      - currency
      - minimumAmount
      type: object
    unibee.api.merchant.gateway.WireTransferEditRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.gateway.WireTransferSetupReq:
      description: Setup the wire transfer
      properties:
        bank:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayBank'
        currency:
          description: 'The currency of wire transfer '
          format: string
          properties: {}
          type: string
        displayName:
          description: The displayName of payment gateway
          format: '*string'
          properties: {}
          type: string
        gatewayIcons:
          description: The icons of payment gateway
          format: '*[]string'
          items:
            format: '[]string'
            items:
              format: string
              properties: {}
              type: string
            properties: {}
            type: array
          properties: {}
          type: array
        minimumAmount:
          description: The minimum amount of wire transfer, cents
          format: int64
          properties: {}
          type: integer
        sort:
          description: The sort value of payment gateway, The higher the value, the
            lower the ranking
          format: '*int64'
          properties: {}
          type: integer
      required:
      - currency
      - minimumAmount
      type: object
    unibee.api.merchant.gateway.WireTransferSetupRes:
      properties:
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
      type: object
    unibee.api.merchant.integration.ConnectionQuickBooksReq:
      properties:
        returnUrl:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.integration.ConnectionQuickBooksRes:
      properties:
        authorizationUrl:
          description: Authorization URL
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.integration.DisconnectionQuickBooksReq:
      properties: {}
      type: object
    unibee.api.merchant.integration.DisconnectionQuickBooksRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.CancelReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.CancelRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.ClearPaymentReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.ClearPaymentRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.CreateMarkRefundReq:
      description: Create a manual refund record for a paid invoice when refund has
        been processed offline via crypto, wire transfer or External gateway, and
        mark it as requested. Supports crypto, wire transfer and external invoices.
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        reason:
          description: The reason of refund
          format: string
          properties: {}
          type: string
        refundAmount:
          description: The amount of refund
          format: int64
          properties: {}
          type: integer
        refundNo:
          description: The out refund number (idempotent key from external system)
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - refundAmount
      - reason
      type: object
    unibee.api.merchant.invoice.CreateMarkRefundRes:
      properties:
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
      type: object
    unibee.api.merchant.invoice.CreditNoteListReq:
      description: Bulk credit note invoice list
      properties:
        count:
          description: Count By Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: The currency of invoice
          format: string
          properties: {}
          type: string
        emails:
          description: The email list of invoice user, split by commas or semicolons
          format: string
          properties: {}
          type: string
        file:
          description: Email CSV File To Search
          format: binary
          properties: {}
          type: string
        gatewayIds:
          description: GatewayIds, Search Filter GatewayIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: PlanIds, Search Filter PlanIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planTagFilter:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
        searchKey:
          description: The search key of invoice
          format: string
          properties: {}
          type: string
        sortField:
          description: Filter，em. invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: The status of invoice, 2-processing｜3-paid | 4-failed | 5-cancelled
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.invoice.CreditNoteListRes:
      properties:
        creditNotes:
          description: CreditNote Detail Object List
          format: '[]*detail.CreditNoteDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.CreditNoteDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.DeleteReq:
      description: Delete invoice of pending status
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.DetailReq:
      description: Get detail of invoice
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.DetailRes:
      properties:
        creditNotes:
          description: CreditNotes Object List Link To Invoice
          format: '[]*detail.InvoiceDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
          properties: {}
          type: array
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.EditPaidInvoiceBillingDetailsReq:
      properties:
        address:
          description: Billing address
          format: '*string'
          properties: {}
          type: string
        city:
          description: Billing city
          format: '*string'
          properties: {}
          type: string
        companyName:
          description: Billing company name
          format: '*string'
          properties: {}
          type: string
        countryCode:
          description: Billing country code
          format: '*string'
          properties: {}
          type: string
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        reason:
          description: Operation reason for audit log
          format: string
          properties: {}
          type: string
        registrationNumber:
          description: Billing registration number
          format: '*string'
          properties: {}
          type: string
        sendEmail:
          description: Invoice recipient email
          format: '*string'
          properties: {}
          type: string
        vatNumber:
          description: Billing VAT number
          format: '*string'
          properties: {}
          type: string
        zipCode:
          description: Billing zip code
          format: '*string'
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.EditPaidInvoiceBillingDetailsRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.EditReq:
      description: Edit invoice of pending status
      properties:
        applyPromoCredit:
          description: Whether to apply promo credit
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Specific promo credit amount to apply (optional)
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: The currency of invoice
          format: string
          properties: {}
          type: string
        finish:
          format: bool
          properties: {}
          type: boolean
        gatewayId:
          description: The gateway id of invoice
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        lines:
          format: '[]*invoice.NewInvoiceItemParam'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.invoice.NewInvoiceItemParam'
          properties: {}
          type: array
        name:
          description: The name of invoice
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: The tax percentage of invoice，1000=10%
          format: int64
          properties: {}
          type: integer
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.EditRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.FinishReq:
      description: Finish invoice, generate invoice link
      properties:
        daysUtilDue:
          description: Due Day Of Invoice Payment
          format: int
          properties: {}
          type: integer
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - daysUtilDue
      type: object
    unibee.api.merchant.invoice.FinishRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
      type: object
    unibee.api.merchant.invoice.GetSplitPaymentsReq:
      description: Get all split payments for an invoice with payment statistics
      properties:
        invoiceId:
          description: The invoice id
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.GetSplitPaymentsRes:
      properties:
        paidAmount:
          description: Total paid amount from successful split payments in cents
          format: int64
          properties: {}
          type: integer
        payments:
          description: List of split payments
          format: '[]*bean.SplitPaymentInfo'
          items:
            $ref: '#/components/schemas/unibee.api.bean.SplitPaymentInfo'
          properties: {}
          type: array
        remainingAmount:
          description: Remaining amount to be paid in cents
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Total invoice amount in cents
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.HistoryInvoiceImportDeleteReq:
      description: Delete an imported history invoice (BizType=Import) and its related
        payment/refund if applicable.
      properties:
        invoiceId:
          description: Required, imported InvoiceId to delete
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.HistoryInvoiceImportDeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.HistoryInvoiceImportLineItem:
      properties:
        amount:
          description: Required when lines are provided, line amount in cents (including
            tax).
          format: int64
          properties: {}
          type: integer
        description:
          description: Optional, line item description.
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Optional, discount amount in cents for this line.
          format: int64
          properties: {}
          type: integer
        name:
          description: Optional, line item name. If empty, system will fall back to
            productName or invoiceName.
          format: string
          properties: {}
          type: string
        quantity:
          description: Optional, quantity for this line, default 1 when 0 or negative.
          format: int64
          properties: {}
          type: integer
        taxAmount:
          description: Optional, tax amount in cents for this line. If omitted, system
            may derive distribution from invoice-level taxAmount.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.HistoryInvoiceImportReq:
      description: Each repetition import overrides existing invoices with matching
        InvoiceId (BizType=Import).
      properties:
        countryCode:
          description: Optional, ISO 3166-1 alpha-2 country code
          format: string
          properties: {}
          type: string
        createTime:
          description: Optional, invoice create time '2006-01-02 15:04:05' (UTC)
          format: string
          properties: {}
          type: string
        currency:
          description: Required, currency code (e.g. USD)
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Optional, discount amount in cents
          format: int64
          properties: {}
          type: integer
        email:
          description: User email, one of Email or ExternalUserId is required
          format: string
          properties: {}
          type: string
        externalUserId:
          description: External user id, one of Email or ExternalUserId is required
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional, gateway id. If 0 or omitted, invoice will be stored
            with gateway_id=0.
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: Required, external invoice id
          format: string
          properties: {}
          type: string
        invoiceName:
          description: Optional, human readable invoice name (for display/search).
            If empty, system will use a generic name.
          format: string
          properties: {}
          type: string
        invoiceStatus:
          description: Optional, paid|failed|cancelled, default paid if blank
          format: string
          properties: {}
          type: string
        lines:
          description: Optional (API only), simplified invoice line items. If omitted
            or empty, system will automatically generate a single aggregated line
            from invoice-level amounts.
          format: '[]*invoice.HistoryInvoiceImportLineItem'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.invoice.HistoryInvoiceImportLineItem'
          properties: {}
          type: array
        linkToLatestSubscription:
          description: Optional, if true, link to user's latest active subscription
            in current merchant (ignores SubscriptionId).
          format: bool
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Optional, metadata map to be stored into invoice.meta_data.
          format: map[string]interface {}
          properties: {}
          type: object
        originalInvoiceId:
          description: Required when totalAmount < 0, original payment invoice's InvoiceId
            (of the payment invoice).
          format: string
          properties: {}
          type: string
        periodEnd:
          description: Optional, period end '2006-01-02 15:04:05' (UTC)
          format: string
          properties: {}
          type: string
        periodStart:
          description: Optional, period start '2006-01-02 15:04:05' (UTC)
          format: string
          properties: {}
          type: string
        productName:
          description: Optional, product name shown on invoice. If empty, may fall
            back to InvoiceName.
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Optional, subscription id. If provided, must belong to current
            user.
          format: string
          properties: {}
          type: string
        taxAmount:
          description: Optional, tax amount in cents
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Required, total amount in cents, positive for payment, negative
            for refund
          format: int64
          properties: {}
          type: integer
      required:
      - invoiceId
      - totalAmount
      - currency
      type: object
    unibee.api.merchant.invoice.HistoryInvoiceImportRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.ListReq:
      description: Get invoice list
      properties:
        amountEnd:
          description: The filter end amount of invoice
          format: '*int64'
          properties: {}
          type: integer
        amountStart:
          description: The filter start amount of invoice
          format: '*int64'
          properties: {}
          type: integer
        count:
          description: Count By Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: The currency of invoice
          format: string
          properties: {}
          type: string
        deleteInclude:
          description: Deleted Involved，Need Admin Permission
          format: bool
          properties: {}
          type: boolean
        discountCode:
          description: Filter by exact discount code (case-insensitive)
          format: string
          properties: {}
          type: string
        firstName:
          description: The firstName of invoice
          format: string
          properties: {}
          type: string
        gatewayIds:
          description: GatewayIds, Search Filter GatewayIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        hasDiscountCode:
          description: Filter by whether discount_code is set
          format: '*bool'
          properties: {}
          type: boolean
        lastName:
          description: The lastName of invoice
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: Filter invoices that include any of these plan IDs (OR)
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planTagFilter:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
        reportTimeEnd:
          description: ReportTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        reportTimeStart:
          description: ReportTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        searchKey:
          description: Search InvoiceName|Email|ProductName
          format: string
          properties: {}
          type: string
        sendEmail:
          description: The filter email of invoice
          format: string
          properties: {}
          type: string
        sortField:
          description: Filter，em. invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: The status of invoice, 1-pending｜2-processing｜3-paid | 4-failed
            | 5-cancelled
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        type:
          description: invoice Type, 0-payment, 1-refund
          format: '*int'
          properties: {}
          type: integer
        userId:
          description: The filter userid of invoice
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.ListRes:
      properties:
        invoices:
          description: Invoice Detail Object List
          format: '[]*detail.InvoiceDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsPaidReq:
      deprecated: true
      description: 'Deprecated. Please use payment-level external gateway APIs: /merchant/payment/external_gateway_payment/mark_paid.
        This invoice-level API is kept for compatibility only.'
      properties:
        externalTransactionId:
          description: External payment transaction id from gateway, used as idempotent
            key
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional. External gateway id; omit to use invoice's current
            gateway for auth
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Additional metadata from external gateway
          format: map[string]interface {}
          properties: {}
          type: object
        paidTime:
          description: Paid time, UTC timestamp in seconds (optional, default now)
          format: int64
          properties: {}
          type: integer
        signature:
          description: HMAC-SHA256(gatewayKey, invoiceId|externalTransactionId|timestamp),
            hex-encoded
          format: string
          properties: {}
          type: string
        timestamp:
          description: Request timestamp, UTC seconds, used for expiry check
          format: int64
          properties: {}
          type: integer
      required:
      - invoiceId
      - externalTransactionId
      - timestamp
      - signature
      type: object
    unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsPaidRes:
      properties:
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        paymentId:
          description: Created or reused payment id
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Subscription id
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsRefundedReq:
      deprecated: true
      description: Deprecated placeholder. External refund flow will be redesigned.
        Do not use this invoice-level API for new integrations.
      properties:
        externalTransactionId:
          description: External refund transaction id from gateway
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional. External gateway id; omit to use invoice's current
            gateway for auth
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        signature:
          description: HMAC-SHA256(gatewayKey, invoiceId|externalTransactionId|timestamp),
            hex
          format: string
          properties: {}
          type: string
        timestamp:
          description: Request timestamp, UTC seconds, used for expiry check
          format: int64
          properties: {}
          type: integer
      required:
      - invoiceId
      - externalTransactionId
      - timestamp
      - signature
      type: object
    unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsRefundedRes:
      properties:
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        refundId:
          description: Created refund id
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.invoice.MarkRefundInvoiceSuccessReq:
      description: Mark existing manual refund of an invoice as success, only supports
        Changelly (crypto) and Wire Transfer refunds.
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        reason:
          description: The reason of mark action
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.MarkRefundInvoiceSuccessRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.MarkWireTransferSuccessReq:
      description: Manually mark a pending wire transfer invoice as paid and trigger
        invoice paid flow. Only supports wire transfer invoices that have been paid
        offline.
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        reason:
          description: The reason of mark action
          format: string
          properties: {}
          type: string
        transferNumber:
          description: The transfer number of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - transferNumber
      type: object
    unibee.api.merchant.invoice.MarkWireTransferSuccessRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.NewInvoiceItemParam:
      properties:
        description:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        planId:
          description: The plan id to use for pricing, if set, plan price will override
            unitAmountExcludingTax
          format: int64
          properties: {}
          type: integer
        quantity:
          format: int64
          properties: {}
          type: integer
        unitAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.invoice.NewReq:
      properties:
        applyPromoCredit:
          description: Whether to apply promo credit
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Specific promo credit amount to apply (optional)
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: The currency of invoice
          format: string
          properties: {}
          type: string
        finish:
          format: bool
          properties: {}
          type: boolean
        gatewayId:
          description: The gateway id of invoice
          format: int64
          properties: {}
          type: integer
        lines:
          format: '[]*invoice.NewInvoiceItemParam'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.invoice.NewInvoiceItemParam'
          properties: {}
          type: array
        name:
          description: The name of invoice
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: The tax percentage of invoice，1000=10%
          format: int64
          properties: {}
          type: integer
        userId:
          description: The userId of invoice
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - taxPercentage
      - currency
      type: object
    unibee.api.merchant.invoice.NewRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.PdfGenerateReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        sendUserEmail:
          default: false
          description: Whether sen invoice email to user or not，default false
          format: bool
          properties: {}
          type: boolean
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.PdfGenerateRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.PdfUpdateReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        issueAddress:
          description: IssueAddress
          format: '*string'
          properties: {}
          type: string
        issueCompanyName:
          description: IssueCompanyName
          format: '*string'
          properties: {}
          type: string
        issueRegNumber:
          description: IssueRegNumber
          format: '*string'
          properties: {}
          type: string
        issueVatNumber:
          description: IssueVatNumber
          format: '*string'
          properties: {}
          type: string
        localizedCurrency:
          description: LocalizedCurrency, To display localized currency amount
          format: '*string'
          properties: {}
          type: string
        localizedExchangeRate:
          description: LocalizedExchangeRate, exchange rate must set while LocalizedCurrency
            enabled
          format: '*float64'
          properties: {}
          type: number
        localizedExchangeRateDescription:
          description: LocalizedExchangeRateDescription
          format: '*float64'
          properties: {}
          type: number
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        sendUserEmail:
          default: false
          description: Whether sen invoice email to user or not，default false
          format: bool
          properties: {}
          type: boolean
        showDetailItem:
          default: false
          description: ShowDetailItem, whether to display detail item information
            in pdf generate, unitAmount, quantity, etc.
          format: '*bool'
          properties: {}
          type: boolean
        template:
          description: Template
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.PdfUpdateRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.ReconvertCryptoAndSendReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.ReconvertCryptoAndSendRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.RefundReq:
      description: Create payment refund for paid invoice
      properties:
        cancelSubscription:
          default: false
          description: Whether cancel related subscription after refund request is
            accepted
          format: bool
          properties: {}
          type: boolean
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        paymentId:
          description: The payment id to refund (required for split payment invoices,
            optional for single payment invoices)
          format: string
          properties: {}
          type: string
        reason:
          description: The reason of refund
          format: string
          properties: {}
          type: string
        refundAmount:
          description: The amount of refund
          format: int64
          properties: {}
          type: integer
        refundNo:
          description: The out refund number
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - refundAmount
      - reason
      type: object
    unibee.api.merchant.invoice.RefundRes:
      properties:
        refund:
          $ref: '#/components/schemas/unibee.api.bean.Refund'
      type: object
    unibee.api.merchant.invoice.SendEmailReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.SendEmailRes:
      properties: {}
      type: object
    unibee.api.merchant.invoice.SyncPaidInvoiceBillingDetailsReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        reason:
          description: Operation reason for audit log
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.SyncPaidInvoiceBillingDetailsRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.SyncUserSnapshotReq:
      description: Sync user snapshot in invoice with latest user profile
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.invoice.SyncUserSnapshotRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
      type: object
    unibee.api.merchant.invoice.UpdateExternalGatewayInvoicePaymentLinkReq:
      deprecated: true
      description: 'Deprecated. Please use payment-level external gateway APIs: /merchant/payment/external_gateway_payment/update_link.
        This invoice-level API is kept for compatibility only.'
      properties:
        externalTransactionId:
          description: External payment transaction id from gateway (for linking)
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional. External gateway id; omit to keep current gateway
            and use it for auth
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        paymentLink:
          description: External payment/checkout url shown to user in invoice
          format: string
          properties: {}
          type: string
        sendInvoice:
          description: Whether to (re)send invoice email after payment link is updated
          format: bool
          properties: {}
          type: boolean
        signature:
          description: HMAC-SHA256(gatewayKey, invoiceId|externalTransactionId|timestamp),
            hex
          format: string
          properties: {}
          type: string
        timestamp:
          description: Request timestamp, UTC seconds, used for expiry check
          format: int64
          properties: {}
          type: integer
      required:
      - invoiceId
      - externalTransactionId
      - paymentLink
      - timestamp
      - signature
      type: object
    unibee.api.merchant.invoice.UpdateExternalGatewayInvoicePaymentLinkRes:
      properties:
        invoiceId:
          description: Invoice id
          format: string
          properties: {}
          type: string
        paymentLink:
          description: Updated payment link
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.ClearOAuthReq:
      properties:
        provider:
          description: OAuth provider
          format: string
          properties: {}
          type: string
      required:
      - provider
      type: object
    unibee.api.merchant.member.ClearOAuthRes:
      properties: {}
      type: object
    unibee.api.merchant.member.ClearTotpReq:
      properties:
        memberId:
          description: The unique id of member
          format: int64
          properties: {}
          type: integer
        totpCode:
          description: The admin totp code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.ClearTotpRes:
      properties: {}
      type: object
    unibee.api.merchant.member.ConfirmTotpKeyReq:
      properties:
        totpCode:
          description: The totp code
          format: string
          properties: {}
          type: string
        totpKey:
          description: TotpKey
          format: string
          properties: {}
          type: string
        totpType:
          description: 1-General, Google Authenticator | 2-Microsoft Authenticator
            | 3-Authy | 4-1Password | 5-LastPass | 6-FreeOTP | 7-Other TOTP
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.ConfirmTotpKeyRes:
      properties: {}
      type: object
    unibee.api.merchant.member.DeleteDeviceReq:
      properties:
        deviceIdentity:
          description: Device Identity
          format: string
          properties: {}
          type: string
        memberId:
          description: The unique id of member
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.DeleteDeviceRes:
      properties:
        deviceList:
          description: The devices list'
          format: '[]*bean.MerchantMemberDevice'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMemberDevice'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.member.FrozenReq:
      properties:
        memberId:
          description: The unique id of member
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.FrozenRes:
      properties: {}
      type: object
    unibee.api.merchant.member.GetTotpKeyReq:
      properties:
        totpType:
          description: 1-General, Google Authenticator | 2-Microsoft Authenticator
            | 3-Authy | 4-1Password | 5-LastPass | 6-FreeOTP | 7-Other TOTP
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.GetTotpKeyRes:
      properties:
        totpKey:
          description: TotpKey, used on next confirm step
          format: string
          properties: {}
          type: string
        totpResumeCode:
          description: TotpResumeCode
          format: string
          properties: {}
          type: string
        totpType:
          description: 1-General, Google Authenticator | 2-Microsoft Authenticator
            | 3-Authy | 4-1Password | 5-LastPass | 6-FreeOTP | 7-Other TOTP
          format: int
          properties: {}
          type: integer
        totpUrl:
          description: TotpUrl， Used to generate QR Image
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.ListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        email:
          description: Search Filter Email
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        roleIds:
          description: The member roleId if specified'
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        searchKey:
          description: Search Key, FirstName,LastName or Email
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.ListRes:
      properties:
        merchantMembers:
          description: Merchant Member Object List
          format: '[]*detail.MerchantMemberDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.LogoutReq:
      properties: {}
      type: object
    unibee.api.merchant.member.LogoutRes:
      properties: {}
      type: object
    unibee.api.merchant.member.NewMemberReq:
      description: Will send email to member email provided, member can enter admin
        portal by email otp login
      properties:
        email:
          description: The email of member
          format: string
          properties: {}
          type: string
        firstName:
          description: The firstName of member
          format: string
          properties: {}
          type: string
        lastName:
          description: The lastName of member
          format: string
          properties: {}
          type: string
        returnUrl:
          description: Return url of member
          format: string
          properties: {}
          type: string
        roleIds:
          description: The id list of role
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      required:
      - email
      - roleIds
      type: object
    unibee.api.merchant.member.NewMemberRes:
      properties: {}
      type: object
    unibee.api.merchant.member.OperationLogListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        discountCode:
          description: discount_code
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        firstName:
          description: FirstName
          format: string
          properties: {}
          type: string
        invoiceId:
          description: invoice id
          format: string
          properties: {}
          type: string
        lastName:
          description: LastName
          format: string
          properties: {}
          type: string
        memberEmail:
          description: Filter Member's Email, Default All
          format: string
          properties: {}
          type: string
        memberFirstName:
          description: Filter Member's FirstName Default All
          format: string
          properties: {}
          type: string
        memberLastName:
          description: Filter Member's LastName, Default All
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        planId:
          description: plan id
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: subscription_id
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.OperationLogListRes:
      properties:
        merchantOperationLogs:
          description: Merchant Member Operation Log List
          format: '[]*detail.MerchantOperationLogDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantOperationLogDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.PasswordResetReq:
      properties:
        newPassword:
          description: The new password of member
          format: string
          properties: {}
          type: string
        oldPassword:
          description: The old password of member
          format: string
          properties: {}
          type: string
      required:
      - oldPassword
      - newPassword
      type: object
    unibee.api.merchant.member.PasswordResetRes:
      properties: {}
      type: object
    unibee.api.merchant.member.ProfileReq:
      properties: {}
      type: object
    unibee.api.merchant.member.ProfileRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
      type: object
    unibee.api.merchant.member.ReleaseReq:
      properties:
        memberId:
          description: The unique id of member
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.member.ReleaseRes:
      properties: {}
      type: object
    unibee.api.merchant.member.ResetTotpReq:
      properties:
        totpCode:
          description: The totp code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.ResetTotpRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
      type: object
    unibee.api.merchant.member.UpdateMemberRoleReq:
      properties:
        memberId:
          description: The unique id of member
          format: int64
          properties: {}
          type: integer
        roleIds:
          description: The id list of role
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.member.UpdateMemberRoleRes:
      properties: {}
      type: object
    unibee.api.merchant.member.UpdateOAuthReq:
      description: 'Pass OAuth token in request header (Auth.js JWT). Headers: X-Auth-JS-Token
        | X-Auth-Token | X-OAuth-Token'
      properties: {}
      type: object
    unibee.api.merchant.member.UpdateOAuthRes:
      properties: {}
      type: object
    unibee.api.merchant.member.UpdateReq:
      properties:
        firstName:
          description: The firstName of member
          format: string
          properties: {}
          type: string
        lastName:
          description: The lastName of member
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        mobile:
          description: mobile
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.member.UpdateRes:
      properties:
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
      type: object
    unibee.api.merchant.metric.DeleteEventReq:
      properties:
        email:
          description: Email， UserId,ExternalUserId, or Email provides one of three
            options
          format: string
          properties: {}
          type: string
        externalEventId:
          description: ExternalEventId
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId， UserId, ExternalUserId, or Email provides one
            of three options
          format: string
          properties: {}
          type: string
        metricCode:
          description: MetricCode
          format: string
          properties: {}
          type: string
        userId:
          description: UserId， UserId,ExternalUserId, or Email provides one of three
            options
          format: int64
          properties: {}
          type: integer
      required:
      - metricCode
      - externalEventId
      type: object
    unibee.api.merchant.metric.DeleteEventRes:
      properties: {}
      type: object
    unibee.api.merchant.metric.DeletePlanLimitReq:
      properties:
        metricPlanLimitId:
          description: MetricPlanLimitId
          format: int64
          properties: {}
          type: integer
      required:
      - metricPlanLimitId
      type: object
    unibee.api.merchant.metric.DeletePlanLimitRes:
      properties:
        merchantMetricPlanLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
      type: object
    unibee.api.merchant.metric.DeleteReq:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      type: object
    unibee.api.merchant.metric.DeleteRes:
      properties:
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
      type: object
    unibee.api.merchant.metric.DetailReq:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      type: object
    unibee.api.merchant.metric.DetailRes:
      properties:
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
      type: object
    unibee.api.merchant.metric.EditPlanLimitReq:
      properties:
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
        metricPlanLimitId:
          description: MetricPlanLimitId
          format: int64
          properties: {}
          type: integer
      required:
      - metricPlanLimitId
      - metricLimit
      type: object
    unibee.api.merchant.metric.EditPlanLimitRes:
      properties:
        merchantMetricPlanLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
      type: object
    unibee.api.merchant.metric.EditReq:
      properties:
        carryoverProrationEnabled:
          description: 'Enable carryover proration for this metric (default: false
            when not set)'
          format: '*bool'
          properties: {}
          type: boolean
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: '*map[string]interface {}'
          properties: {}
          type: object
        metricDescription:
          description: MetricDescription
          format: string
          properties: {}
          type: string
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        metricName:
          description: MetricName
          format: string
          properties: {}
          type: string
        prorationRefundEnabled:
          description: 'Enable proration refund for this metric (reclaim metric limit
            on upgrade; default: false when not set)'
          format: '*bool'
          properties: {}
          type: boolean
        type:
          description: 1-limit_metered，2-charge_metered，3-charge_recurring，4-limit_recurring
          format: '*int'
          properties: {}
          type: integer
        unit:
          description: unit
          format: string
          properties: {}
          type: string
      required:
      - metricId
      - metricName
      type: object
    unibee.api.merchant.metric.EditRes:
      properties:
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
      type: object
    unibee.api.merchant.metric.EventCurrentValueReq:
      properties:
        email:
          default: account@unibee.dev
          description: Email， UserId, ExternalUserId, or Email provides one of three
            options
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId， UserId, ExternalUserId, or Email provides one
            of three options
          format: string
          properties: {}
          type: string
        metricCode:
          description: MetricCode
          format: string
          properties: {}
          type: string
        productId:
          description: Id of product. Default product will use if productId not specified
            and subscriptionId is blank
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId， UserId, ExternalUserId, or Email provides one of three
            options
          format: int64
          properties: {}
          type: integer
      required:
      - metricCode
      type: object
    unibee.api.merchant.metric.EventCurrentValueRes:
      properties:
        currentValue:
          format: int64
          properties: {}
          type: integer
        metricLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.PlanMetricLimitDetail'
        totalLimit:
          description: Total limit for the metric. Returns -1 if metric is not limit
            type.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.EventListReq:
      properties:
        count:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        invoiceId:
          description: When set, list events for this invoice period (match subscription_period_start/end
            with invoice PeriodStart/PeriodEnd); overrides CreateTimeStart/CreateTimeEnd
            for period scope
          format: string
          properties: {}
          type: string
        metricIds:
          description: Filter MetricIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort，user_id|gmt_create，Default gmt_create
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        subscriptionIds:
          description: Filter SubscriptionIds, Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        userIds:
          description: Filter UserIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.metric.EventListRes:
      properties:
        events:
          description: User Metric Event List
          format: '[]*detail.MerchantMetricEventDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricEventDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.ListMetricQueryableInvoicesReq:
      properties:
        count:
          description: Count per page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, start 0
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: Optional subscription id to filter by subscription
          format: string
          properties: {}
          type: string
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.merchant.metric.ListMetricQueryableInvoicesRes:
      properties:
        invoices:
          description: Invoice Detail Object List
          format: '[]*detail.InvoiceDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.ListReq:
      properties:
        count:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search Key, code or name
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort，user_id|gmt_create，Default gmt_create
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.metric.ListRes:
      properties:
        merchantMetrics:
          description: MerchantMetrics
          format: '[]*bean.MerchantMetric'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.MetricCarryoverReprocessReq:
      properties:
        previousInvoiceId:
          description: Previous period's Invoice ID to recalculate carry over
          format: string
          properties: {}
          type: string
      required:
      - previousInvoiceId
      type: object
    unibee.api.merchant.metric.MetricCarryoverReprocessRes:
      properties:
        message:
          format: string
          properties: {}
          type: string
        success:
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustBatchItem:
      properties:
        amount:
          description: Adjustment amount (positive to increase, negative to decrease,
            cannot be 0)
          format: int64
          properties: {}
          type: integer
        idempotencyKey:
          description: Optional item-level idempotency key, max 256 chars. Has higher
            priority than batch idempotencyKey.
          format: string
          properties: {}
          type: string
        metricCode:
          description: Metric Code
          format: string
          properties: {}
          type: string
        productId:
          description: Product ID, default 0 for default product
          format: int64
          properties: {}
          type: integer
        reason:
          description: Reason for adjustment
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Subscription ID (priority, use this if you know the subscription)
          format: '*string'
          properties: {}
          type: string
        userId:
          description: User ID (alternative to subscriptionId)
          format: '*int64'
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustBatchItemResult:
      properties:
        error:
          format: string
          properties: {}
          type: string
        errorCode:
          format: string
          properties: {}
          type: string
        idempotencyKey:
          format: string
          properties: {}
          type: string
        index:
          format: int
          properties: {}
          type: integer
        metricCode:
          format: string
          properties: {}
          type: string
        quotaId:
          format: int64
          properties: {}
          type: integer
        status:
          format: string
          properties: {}
          type: string
        subscriptionId:
          format: string
          properties: {}
          type: string
        success:
          format: bool
          properties: {}
          type: boolean
        userId:
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustBatchReq:
      properties:
        idempotencyKey:
          description: Optional batch-level idempotency key, max 256 chars. Used to
            derive item idempotency keys when item idempotencyKey is empty.
          format: string
          properties: {}
          type: string
        items:
          description: Adjustment items, max 500
          format: '[]*metric.MetricLimitAdjustBatchItem'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.metric.MetricLimitAdjustBatchItem'
          properties: {}
          type: array
        requestId:
          description: Batch request ID for logs and reconciliation
          format: string
          properties: {}
          type: string
      required:
      - requestId
      - items
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustBatchRes:
      properties:
        duplicateCount:
          format: int
          properties: {}
          type: integer
        failedCount:
          format: int
          properties: {}
          type: integer
        processedCount:
          format: int
          properties: {}
          type: integer
        requestId:
          format: string
          properties: {}
          type: string
        results:
          format: '[]*metric.MetricLimitAdjustBatchItemResult'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.metric.MetricLimitAdjustBatchItemResult'
          properties: {}
          type: array
        status:
          format: string
          properties: {}
          type: string
        success:
          format: bool
          properties: {}
          type: boolean
        successCount:
          format: int
          properties: {}
          type: integer
        total:
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustReq:
      properties:
        amount:
          description: Adjustment amount (positive to increase, negative to decrease,
            cannot be 0)
          format: int64
          properties: {}
          type: integer
        idempotencyKey:
          description: Optional idempotency key, max 256 chars. Retrying the same
            key with the same adjustment returns success without applying twice.
          format: string
          properties: {}
          type: string
        metricCode:
          description: Metric Code
          format: string
          properties: {}
          type: string
        productId:
          description: Product ID, default 0 for default product
          format: int64
          properties: {}
          type: integer
        reason:
          description: Reason for adjustment
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Subscription ID (priority, use this if you know the subscription)
          format: '*string'
          properties: {}
          type: string
        userId:
          description: User ID (alternative to subscriptionId)
          format: '*int64'
          properties: {}
          type: integer
      required:
      - metricCode
      - amount
      - reason
      type: object
    unibee.api.merchant.metric.MetricLimitAdjustRes:
      properties:
        success:
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.metric.NewEventReq:
      properties:
        aggregationUniqueId:
          description: AggregationUniqueId, valid when AggregationType is count unique.
            If provided, it has higher priority and will override the value in MetricProperties
            for the AggregationProperty field
          format: '*string'
          properties: {}
          type: string
        aggregationValue:
          description: AggregationValue, valid when AggregationType is latest, max
            or sum. If provided, it has higher priority and will override the value
            in MetricProperties for the AggregationProperty field
          format: '*int64'
          properties: {}
          type: integer
        email:
          default: account@unibee.dev
          description: Email， UserId, ExternalUserId, or Email provides one of three
            options
          format: string
          properties: {}
          type: string
        externalEventId:
          description: ExternalEventId, __unique__
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId， UserId, ExternalUserId, or Email provides one
            of three options
          format: string
          properties: {}
          type: string
        metricCode:
          description: MetricCode
          format: string
          properties: {}
          type: string
        metricProperties:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        productId:
          description: Id of product. Default product will use if productId not specified
            and subscriptionId is blank
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId， UserId, ExternalUserId, or Email provides one of three
            options
          format: int64
          properties: {}
          type: integer
      required:
      - metricCode
      - externalEventId
      type: object
    unibee.api.merchant.metric.NewEventRes:
      properties:
        merchantMetricEvent:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetricEvent'
      type: object
    unibee.api.merchant.metric.NewPlanLimitReq:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
      required:
      - metricId
      - planId
      - metricLimit
      type: object
    unibee.api.merchant.metric.NewPlanLimitRes:
      properties:
        merchantMetricPlanLimit:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
      type: object
    unibee.api.merchant.metric.NewReq:
      properties:
        aggregationProperty:
          description: AggregationProperty, Will Needed When AggregationType != count
          format: string
          properties: {}
          type: string
        aggregationType:
          description: AggregationType,1-count，2-count unique, 3-latest, 4-max, 5-sum
          format: int
          properties: {}
          type: integer
        carryoverProrationEnabled:
          description: 'Enable carryover proration for this metric (default: false
            when not set)'
          format: '*bool'
          properties: {}
          type: boolean
        code:
          description: Code
          format: string
          properties: {}
          type: string
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: map[string]interface {}
          properties: {}
          type: object
        metricDescription:
          description: MetricDescription
          format: string
          properties: {}
          type: string
        metricName:
          description: MetricName
          format: string
          properties: {}
          type: string
        prorationRefundEnabled:
          description: 'Enable proration refund for this metric (reclaim metric limit
            on upgrade; default: false when not set)'
          format: '*bool'
          properties: {}
          type: boolean
        type:
          description: 1-limit_metered，2-charge_metered，3-charge_recurring，4-limit_recurring
          format: '*int'
          properties: {}
          type: integer
        unit:
          description: unit
          format: string
          properties: {}
          type: string
      required:
      - code
      - metricName
      type: object
    unibee.api.merchant.metric.NewRes:
      properties:
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
      type: object
    unibee.api.merchant.metric.UserHistoryLimitMetricByInvoiceReq:
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.merchant.metric.UserHistoryLimitMetricByInvoiceRes:
      properties:
        isLatestPaidInvoice:
          description: True when current-metric path was used (queried invoice is
            the subscription's latest paid invoice), false when snapshot or history
            path was used
          format: bool
          properties: {}
          type: boolean
        userHistoryMetric:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserHistoryMetric'
      type: object
    unibee.api.merchant.metric.UserHistoryLimitMetricBySubscriptionReq:
      properties:
        subscriptionId:
          description: The unique id of subscription (must be non-active subscription
            or non-incomplete subscription)
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.merchant.metric.UserHistoryLimitMetricBySubscriptionRes:
      properties:
        userHistoryMetric:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserHistoryMetric'
      type: object
    unibee.api.merchant.metric.UserMetricReq:
      properties:
        email:
          description: Email, One Of UserId|Email|ExternalUserId Needed
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, One Of UserId|Email|ExternalUserId Needed
          format: string
          properties: {}
          type: string
        productId:
          description: Id of product, default product will use if productId not specified
            and subscriptionId is blank
          format: int64
          properties: {}
          type: integer
        reloadCache:
          format: bool
          properties: {}
          type: boolean
        userId:
          description: UserId, One Of UserId|Email|ExternalUserId Needed
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.metric.UserMetricRes:
      properties:
        userMetric:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserMetric'
      type: object
    unibee.api.merchant.metric.UserSubscriptionMetricReq:
      properties:
        reloadCache:
          format: bool
          properties: {}
          type: boolean
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.metric.UserSubscriptionMetricRes:
      properties:
        userMetric:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserMetric'
      type: object
    unibee.api.merchant.payment.CancelReq:
      properties:
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.merchant.payment.CancelRes:
      properties: {}
      type: object
    unibee.api.merchant.payment.CaptureReq:
      properties:
        externalCaptureId:
          description: The external id of payment capture
          format: string
          properties: {}
          type: string
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      - externalCaptureId
      type: object
    unibee.api.merchant.payment.CaptureRes:
      properties: {}
      type: object
    unibee.api.merchant.payment.DetailReq:
      properties:
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.merchant.payment.DetailRes:
      properties:
        paymentDetail:
          $ref: '#/components/schemas/unibee.api.bean.detail.PaymentDetail'
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentMarkFailedReq:
      description: 'Mark payment as failed using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      properties:
        externalTransactionId:
          description: External payment transaction id from gateway, used for correlation
          format: string
          properties: {}
          type: string
        failureReason:
          description: Human-readable failure reason from external gateway
          format: string
          properties: {}
          type: string
        gatewayId:
          description: External gateway id (optional), if omitted will be resolved
            from paymentId
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        signature:
          description: HMAC-SHA256 hex signature using External Gateway API Key over
            'paymentId|externalTransactionId|timestamp'
          format: string
          properties: {}
          type: string
        timestamp:
          description: Unix timestamp in seconds, used for signature and anti-replay
          format: int64
          properties: {}
          type: integer
      required:
      - paymentId
      - externalTransactionId
      - timestamp
      - signature
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentMarkFailedRes:
      properties:
        invoiceId:
          description: The related UniBee invoiceId
          format: string
          properties: {}
          type: string
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. failed
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentMarkPaidReq:
      description: 'Mark payment as paid using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      properties:
        externalTransactionId:
          description: External payment transaction id from gateway, used as idempotent
            key
          format: string
          properties: {}
          type: string
        gatewayId:
          description: External gateway id (optional), if omitted will be resolved
            from paymentId
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Additional metadata from external gateway
          format: map[string]interface {}
          properties: {}
          type: object
        paidTime:
          description: Payment success time (unix timestamp in seconds, optional)
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        signature:
          description: HMAC-SHA256 hex signature using External Gateway API Key over
            'paymentId|externalTransactionId|timestamp'
          format: string
          properties: {}
          type: string
        timestamp:
          description: Unix timestamp in seconds, used for signature and anti-replay
          format: int64
          properties: {}
          type: integer
      required:
      - paymentId
      - externalTransactionId
      - timestamp
      - signature
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentMarkPaidRes:
      properties:
        invoiceId:
          description: The related UniBee invoiceId
          format: string
          properties: {}
          type: string
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: The related UniBee subscriptionId (if any)
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentUpdateLinkReq:
      description: 'Update external checkout link for a payment. Auth: OpenAPI + signature
        (HMAC-SHA256, hex).'
      properties:
        externalTransactionId:
          description: External payment transaction id from gateway, used as idempotent
            key
          format: string
          properties: {}
          type: string
        gatewayId:
          description: External gateway id (optional), if omitted will be resolved
            from paymentId
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        paymentLink:
          description: External checkout URL for this payment
          format: string
          properties: {}
          type: string
        sendInvoice:
          description: Whether to send invoice email to customer after updating link
          format: bool
          properties: {}
          type: boolean
        signature:
          description: HMAC-SHA256 hex signature using External Gateway API Key over
            'paymentId|externalTransactionId|timestamp'
          format: string
          properties: {}
          type: string
        timestamp:
          description: Unix timestamp in seconds, used for signature and anti-replay
          format: int64
          properties: {}
          type: integer
      required:
      - paymentId
      - externalTransactionId
      - paymentLink
      - timestamp
      - signature
      type: object
    unibee.api.merchant.payment.ExternalGatewayPaymentUpdateLinkRes:
      properties:
        invoiceId:
          description: The related UniBee invoiceId
          format: string
          properties: {}
          type: string
        paymentId:
          description: The UniBee paymentId
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.ExternalGatewayRefundMarkFailedReq:
      description: 'Mark refund as failed using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      properties:
        externalRefundId:
          description: External refund transaction id from gateway, used as idempotent
            key
          format: string
          properties: {}
          type: string
        failureReason:
          description: Human-readable failure reason from external gateway
          format: string
          properties: {}
          type: string
        gatewayId:
          description: External gateway id (optional), if omitted will be resolved
            from refundId
          format: int64
          properties: {}
          type: integer
        refundId:
          description: The UniBee refundId
          format: string
          properties: {}
          type: string
        signature:
          description: HMAC-SHA256 hex signature using External Gateway API Key over
            'refundId|externalRefundId|timestamp'
          format: string
          properties: {}
          type: string
        timestamp:
          description: Unix timestamp in seconds, used for signature and anti-replay
          format: int64
          properties: {}
          type: integer
      required:
      - refundId
      - timestamp
      - externalRefundId
      - signature
      - failureReason
      type: object
    unibee.api.merchant.payment.ExternalGatewayRefundMarkFailedRes:
      properties:
        paymentId:
          description: The related UniBee paymentId
          format: string
          properties: {}
          type: string
        refundId:
          description: The UniBee refundId
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. failed
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.ExternalGatewayRefundMarkSuccessReq:
      description: 'Mark refund as success using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      properties:
        externalRefundId:
          description: External refund transaction id from gateway, used as idempotent
            key
          format: string
          properties: {}
          type: string
        gatewayId:
          description: External gateway id (optional), if omitted will be resolved
            from refundId
          format: int64
          properties: {}
          type: integer
        refundId:
          description: The UniBee refundId
          format: string
          properties: {}
          type: string
        signature:
          description: HMAC-SHA256 hex signature using External Gateway API Key over
            'refundId|externalRefundId|timestamp'
          format: string
          properties: {}
          type: string
        timestamp:
          description: Unix timestamp in seconds, used for signature and anti-replay
          format: int64
          properties: {}
          type: integer
      required:
      - refundId
      - timestamp
      - externalRefundId
      - signature
      type: object
    unibee.api.merchant.payment.ExternalGatewayRefundMarkSuccessRes:
      properties:
        paymentId:
          description: The related UniBee paymentId
          format: string
          properties: {}
          type: string
        refundId:
          description: The UniBee refundId
          format: string
          properties: {}
          type: string
        status:
          description: Result status, e.g. success
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.Item:
      properties:
        amount:
          description: item total amount, sum(item.amount) should equal to totalAmount,
            cent
          format: int64
          properties: {}
          type: integer
        amountExcludingTax:
          description: amountExcludingTax = unitAmountExcludingTax * quantity
          format: int64
          properties: {}
          type: integer
        currency:
          description: The item currency of payment
          format: string
          properties: {}
          type: string
        description:
          description: The item description of payment
          format: string
          properties: {}
          type: string
        name:
          description: The item name of payment
          format: string
          properties: {}
          type: string
        quantity:
          description: The item quantity of payment
          format: int64
          properties: {}
          type: integer
        tax:
          description: tax = amount - amountExcludingTax
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: The tax percentage of payment，1000 = 10%
          format: int64
          properties: {}
          type: integer
        unitAmountExcludingTax:
          format: int64
          properties: {}
          type: integer
      required:
      - amount
      type: object
    unibee.api.merchant.payment.ItemListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        userId:
          description: Filter UserId, Default All
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.ItemListRes:
      properties:
        paymentItems:
          description: Payment Item Object List
          format: '[]*bean.PaymentItem'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PaymentItem'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.ListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        countryCode:
          description: The filter country code of payment
          format: string
          properties: {}
          type: string
        currency:
          description: The filter currency of payment
          format: string
          properties: {}
          type: string
        email:
          description: The filter email of payment
          format: string
          properties: {}
          type: string
        gatewayId:
          description: The filter unique id of gateway
          format: int64
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，user_id|create_time|status
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc
          format: string
          properties: {}
          type: string
        status:
          description: The filter status of payment, 10-Created|20-Success|30-Failed|40-Cancelled
          format: int
          properties: {}
          type: integer
        userId:
          description: The filter userid of payment
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.ListRes:
      properties:
        paymentDetails:
          description: Payment Detail Object List
          format: '[]*detail.PaymentDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.PaymentDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.MethodDeleteReq:
      properties:
        gatewayId:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
        paymentMethodId:
          description: The unique id of payment method
          format: string
          properties: {}
          type: string
        userId:
          description: The customer's unique id
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - gatewayId
      - paymentMethodId
      type: object
    unibee.api.merchant.payment.MethodDeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.payment.MethodGetReq:
      description: The method of payment gateway
      properties:
        gatewayId:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
        paymentMethodId:
          description: The unique id of payment method
          format: string
          properties: {}
          type: string
        userId:
          description: The customer's unique id
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      - userId
      - paymentMethodId
      type: object
    unibee.api.merchant.payment.MethodGetRes:
      properties:
        method:
          $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
      type: object
    unibee.api.merchant.payment.MethodListReq:
      description: The method list of payment gateway
      properties:
        gatewayId:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
        userId:
          description: The id of user
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.payment.MethodListRes:
      properties:
        methodList:
          description: Payment Method Object List
          format: '[]*bean.PaymentMethod'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.payment.MethodNewReq:
      properties:
        currency:
          description: The currency of payment method
          format: string
          properties: {}
          type: string
        gatewayId:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        redirectUrl:
          description: The redirect url when method created return back
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: The id of subscription that want to attach
          format: string
          properties: {}
          type: string
        type:
          format: string
          properties: {}
          type: string
        userId:
          description: The customer's unique id
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - gatewayId
      type: object
    unibee.api.merchant.payment.MethodNewRes:
      properties:
        method:
          $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
        url:
          description: The gateway url to create a new method
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.NewPaymentRefundReq:
      properties:
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        externalRefundId:
          description: ExternalRefundId
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        reason:
          description: Reason
          format: string
          properties: {}
          type: string
        refundAmount:
          description: RefundAmount, Cent
          format: int64
          properties: {}
          type: integer
      required:
      - paymentId
      - externalRefundId
      - refundAmount
      - currency
      type: object
    unibee.api.merchant.payment.NewPaymentRefundRes:
      properties:
        externalRefundId:
          description: ExternalRefundId
          format: string
          properties: {}
          type: string
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        refundId:
          description: RefundId
          format: string
          properties: {}
          type: string
        status:
          description: Status,10-create|20-success|30-Failed|40-Reverse
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.NewReq:
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        currency:
          description: Currency, either Currency&TotalAmount or PlanId needed
          format: string
          properties: {}
          type: string
        description:
          description: Description
          format: string
          properties: {}
          type: string
        email:
          description: Email, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
        externalPaymentId:
          description: ExternalPaymentId should unique for payment
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          description: GatewayPaymentType
          format: string
          properties: {}
          type: string
        items:
          description: Items
          format: '[]*payment.Item'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.payment.Item'
          properties: {}
          type: array
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: Name
          format: string
          properties: {}
          type: string
        paymentType:
          description: Payment Type
          format: string
          properties: {}
          type: string
        paymentUIMode:
          description: The checkout UI Mode, hosted|embedded|custom, default hosted
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId, either TotalAmount&Currency or PlanId needed
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Quantity，used when planId not null, Default 1
          format: int64
          properties: {}
          type: integer
        redirectUrl:
          description: Redirect Url
          format: string
          properties: {}
          type: string
        sendInvoice:
          default: false
          description: Whether sen invoice email to customer or not，default false
          format: bool
          properties: {}
          type: boolean
        totalAmount:
          description: Total PaymentAmount, Cent, either TotalAmount&Currency or PlanId
            needed
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.payment.NewRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        externalPaymentId:
          description: The external unique id of payment
          format: string
          properties: {}
          type: string
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        link:
          format: string
          properties: {}
          type: string
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
        status:
          description: Status, 10-Created|20-Success|30-Failed|40-Cancelled
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.RefundCancelReq:
      properties:
        refundId:
          description: The unique id of refund
          format: string
          properties: {}
          type: string
      required:
      - refundId
      type: object
    unibee.api.merchant.payment.RefundCancelRes:
      properties: {}
      type: object
    unibee.api.merchant.payment.RefundDetailReq:
      properties:
        refundId:
          description: RefundId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.payment.RefundDetailRes:
      properties:
        refundDetail:
          $ref: '#/components/schemas/unibee.api.bean.detail.RefundDetail'
      type: object
    unibee.api.merchant.payment.RefundListReq:
      properties:
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
        status:
          description: Status,10-create|20-success|30-Failed|40-Reverse
          format: int
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      required:
      - paymentId
      type: object
    unibee.api.merchant.payment.RefundListRes:
      properties:
        refundDetails:
          description: Refund Detail Object List
          format: '[]*detail.RefundDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.RefundDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.TimeLineListReq:
      properties:
        amountEnd:
          description: The filter end amount of timeline
          format: '*int64'
          properties: {}
          type: integer
        amountStart:
          description: The filter start amount of timeline
          format: '*int64'
          properties: {}
          type: integer
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: Currency
          format: string
          properties: {}
          type: string
        discountCode:
          description: Filter by exact invoice discount code (case-insensitive)
          format: string
          properties: {}
          type: string
        gatewayIds:
          description: The filter ids of gateway
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        hasDiscountCode:
          description: Filter by whether invoice discount_code is set
          format: '*bool'
          properties: {}
          type: boolean
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: Filter timelines whose invoice includes any of these plan IDs
            (OR)
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planTagFilter:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
        searchKey:
          description: Search SubscriptionId|InvoiceId|PaymentId|UserId
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: The filter status, 0-pending, 1-success, 2-failure，3-cancel
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        timelineTypes:
          description: The filter timelineType, 0-pay, 1-refund
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        userId:
          description: Filter UserId, Default All
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.payment.TimeLineListRes:
      properties:
        paymentTimeLines:
          description: Payment TimeLine Object List
          format: '[]*detail.PaymentTimelineDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.PaymentTimelineDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.ActivateReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.ActivateRes:
      properties: {}
      type: object
    unibee.api.merchant.plan.ActivePriceChangeConfirmReq:
      description: Confirm and apply price change for an active plan.
      properties:
        confirmOldAmount:
          description: Old amount expected by caller, used for optimistic locking
          format: int64
          properties: {}
          type: integer
        newAmount:
          description: New amount (in smallest currency unit, e.g. cents)
          format: int64
          properties: {}
          type: integer
        planId:
          description: Target planId, must be active
          format: int64
          properties: {}
          type: integer
        reason:
          description: Reason or note for this price change
          format: string
          properties: {}
          type: string
      required:
      - planId
      - newAmount
      - confirmOldAmount
      type: object
    unibee.api.merchant.plan.ActivePriceChangeConfirmRes:
      properties:
        activeAffectedSubscriptions:
          description: Active/processing subscriptions whose future billing will be
            affected
          format: int64
          properties: {}
          type: integer
        newAmount:
          description: New amount after change
          format: int64
          properties: {}
          type: integer
        oldAmount:
          description: Old amount before change
          format: int64
          properties: {}
          type: integer
        planId:
          description: Target planId
          format: int64
          properties: {}
          type: integer
        totalAffectedSubscriptions:
          description: Total subscriptions that have used or are using this plan (by
            status set)
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.ActivePriceChangePreviewReq:
      description: Preview how many subscriptions will be affected if we change price
        of an active plan.
      properties:
        newAmount:
          description: New amount (in smallest currency unit, e.g. cents)
          format: int64
          properties: {}
          type: integer
        planId:
          description: Target planId, must be active
          format: int64
          properties: {}
          type: integer
      required:
      - planId
      - newAmount
      type: object
    unibee.api.merchant.plan.ActivePriceChangePreviewRes:
      properties:
        activeAffectedSubscriptions:
          description: Active/processing subscriptions whose future billing will be
            affected
          format: int64
          properties: {}
          type: integer
        newAmount:
          description: New amount of plan
          format: int64
          properties: {}
          type: integer
        oldAmount:
          description: Current amount of plan
          format: int64
          properties: {}
          type: integer
        planId:
          description: Target planId
          format: int64
          properties: {}
          type: integer
        totalAffectedSubscriptions:
          description: Total subscriptions that have used or are using this plan (by
            status set)
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.AddonsBindingReq:
      properties:
        action:
          description: Action Type，0-override,1-add，2-delete
          format: int64
          properties: {}
          type: integer
        addonIds:
          description: Plan Ids Of Recurring Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        onetimeAddonIds:
          description: Plan Ids Of Onetime Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planId:
          description: PlanID
          format: int64
          properties: {}
          type: integer
      required:
      - planId
      - action
      - addonIds
      - onetimeAddonIds
      type: object
    unibee.api.merchant.plan.AddonsBindingRes:
      properties:
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
      type: object
    unibee.api.merchant.plan.ArchiveReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        hardArchive:
          description: Hard Archive
          format: bool
          properties: {}
          type: boolean
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.ArchiveRes:
      properties: {}
      type: object
    unibee.api.merchant.plan.BatchTagBindReq:
      properties:
        planIds:
          description: Plan ids to bind tags to
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        tagIds:
          description: Plan tag ids to append. Existing bindings are skipped.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      required:
      - planIds
      - tagIds
      type: object
    unibee.api.merchant.plan.BatchTagBindRes:
      properties: {}
      type: object
    unibee.api.merchant.plan.CopyReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.CopyRes:
      properties:
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
      type: object
    unibee.api.merchant.plan.DeleteReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.plan.DetailReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.DetailRes:
      properties:
        plan:
          $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
      type: object
    unibee.api.merchant.plan.EditReq:
      description: 'Edit exist plan, amount|currency|intervalUnit|intervalCount is
        not editable when plan is active '
      properties:
        addonIds:
          description: Plan Ids Of Recurring Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        amount:
          description: CaptureAmount of plan, not editable when plan is active
          format: '*int64'
          properties: {}
          type: integer
        autoChargeConfig:
          $ref: '#/components/schemas/unibee.api.bean.AutoChargeConfig'
        autoUpgradePlanId:
          description: omit = no change; 0 clears stored value, >0 sets target plan
            id; independent of disableAutoCharge
          format: '*int64'
          properties: {}
          type: integer
        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, used to build checkoutUrl; stored in
            plan additional settings
          format: '*int64'
          properties: {}
          type: integer
        compareAtAmount:
          description: omit = no change; set to 0 to clear; >0 sets strikethrough
            price for regular amount (UI only)
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: Currency of plan, not editable when plan is active
          format: '*string'
          properties: {}
          type: string
        description:
          description: Description of plan
          format: '*string'
          properties: {}
          type: string
        disableAutoCharge:
          description: Same as create; omit = leave stored value unchanged. Responses
            still return 1 when amount=0 or plan is not main.
          format: '*int'
          properties: {}
          type: integer
        externalPlanId:
          description: ExternalPlanId
          format: '*string'
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas for crypto payment, merchant|user
          format: '*string'
          properties: {}
          type: string
        homeUrl:
          description: 'HomeUrl,Start With: http'
          format: '*string'
          properties: {}
          type: string
        imageUrl:
          description: 'ImageUrl,Start With: http'
          format: '*string'
          properties: {}
          type: string
        internalName:
          format: '*string'
          properties: {}
          type: string
        intervalCount:
          description: Number,intervalUnit of plan, not editable when plan is active
          format: '*int'
          properties: {}
          type: integer
        intervalUnit:
          description: 'Interval unit of plan，em: day|month|year|week, not editable
            when plan is active'
          format: '*string'
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        metricLimits:
          description: Plan's MetricLimit List, nil means no change, empty array means
            delete all, array with data means full replace
          format: '*[]*bean.PlanMetricLimitParam'
          items:
            format: '[]*bean.PlanMetricLimitParam'
            items:
              $ref: '#/components/schemas/unibee.api.bean.PlanMetricLimitParam'
            properties: {}
            type: array
          properties: {}
          type: array
        metricMeteredCharge:
          description: Plan's MetricMeteredCharge
          format: '*[]*bean.PlanMetricMeteredChargeParam'
          items:
            format: '[]*bean.PlanMetricMeteredChargeParam'
            items:
              $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
            properties: {}
            type: array
          properties: {}
          type: array
        metricRecurringCharge:
          description: Plan's MetricRecurringCharge
          format: '*[]*bean.PlanMetricMeteredChargeParam'
          items:
            format: '[]*bean.PlanMetricMeteredChargeParam'
            items:
              $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
            properties: {}
            type: array
          properties: {}
          type: array
        multiCurrencies:
          description: Plan's MultiCurrencies
          format: '*[]*bean.PlanMultiCurrency'
          items:
            format: '[]*bean.PlanMultiCurrency'
            items:
              $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrency'
            properties: {}
            type: array
          properties: {}
          type: array
        multiTrials:
          description: multi-step trials for this plan; when set, the first item will
            override trialAmount & trialDurationTime
          format: '*[]*bean.PlanMultiTrial'
          items:
            format: '[]*bean.PlanMultiTrial'
            items:
              $ref: '#/components/schemas/unibee.api.bean.PlanMultiTrial'
            properties: {}
            type: array
          properties: {}
          type: array
        onetimeAddonIds:
          description: Plan Ids Of Onetime Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planId:
          description: Id of plan
          format: int64
          properties: {}
          type: integer
        planName:
          description: Name of plan
          format: '*string'
          properties: {}
          type: string
        productDescription:
          description: ProductDescription of plan, Default copy description
          format: '*string'
          properties: {}
          type: string
        productName:
          description: ProductName of plan, Default copy planName
          format: '*string'
          properties: {}
          type: string
        tagIds:
          description: Plan tag ids. Omit = no tag change; [] = clear all tags; non-empty
            = full replace. Binding is best-effort.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        trialAmount:
          description: price of trial period， not available for addon; overridden
            by multiTrials[0].trialPrice when multiTrials is set
          format: '*int64'
          properties: {}
          type: integer
        trialDemand:
          description: demand of trial, not available for addon, example, paymentMethod,
            payment method will ask for subscription trial start
          format: '*string'
          properties: {}
          type: string
        trialDurationTime:
          description: duration of trial，seconds, not available for addon; overridden
            by multiTrials[0].trialDuration when multiTrials is set
          format: '*int64'
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      required:
      - planId
      type: object
    unibee.api.merchant.plan.EditRes:
      properties:
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        tags:
          description: Current tags bound to the plan
          format: '[]*bean.Tag'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Tag'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.plan.ListReq:
      properties:
        billingIntervalMin:
          description: Minimum billing interval in ISO 8601 duration (date part only,
            Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D
          format: string
          properties: {}
          type: string
        count:
          description: Count Of Per Page, Default 100
          format: int
          properties: {}
          type: integer
        currency:
          description: Filter Currency
          format: string
          properties: {}
          type: string
        intervalCounts:
          description: Filter by interval count; ignored when billingIntervalMin is
            provided
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        intervalUnits:
          description: Filter by interval unit (day|week|month|year); ignored when
            billingIntervalMin is provided
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: filter id list of plan, default all
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planTagFilter:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
        productIds:
          description: filter id list of product, default all product(0) used if not
            specified
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        publishStatus:
          description: Filter, Default All，PublishStatus，1-UnPublished，2-Published
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search Key, plan name or description
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort Field，plan_name|gmt_create|gmt_modify，Default gmt_create
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: Filter, Default All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive,
            5-HardArchive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        type:
          description: 1-main plan，2-addon plan,3-onetime
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.plan.ListRes:
      properties:
        plans:
          description: Plans
          format: '[]*detail.PlanDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.MetricLimitOverrideReq:
      description: Insert or override metric limit items of a plan
      properties:
        metadataOverride:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata to override for plan, only provided keys will be added/updated
          format: map[string]interface {}
          properties: {}
          type: object
        metricLimit:
          description: MetricLimit items to insert or override, identify metric by
            id or code
          format: '[]*bean.PlanMetricLimitOverrideParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricLimitOverrideParam'
          properties: {}
          type: array
        planId:
          description: Id of plan
          format: int64
          properties: {}
          type: integer
      required:
      - planId
      type: object
    unibee.api.merchant.plan.MetricLimitOverrideRes:
      properties:
        metadataOverrideSuccess:
          description: Whether metadata override processed successfully
          format: bool
          properties: {}
          type: boolean
        metricLimitOverrideSuccess:
          description: Whether metric limits override processed successfully
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.plan.NewReq:
      properties:
        addonIds:
          description: Plan Ids Of Recurring Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        amount:
          description: Plan Amount
          format: int64
          properties: {}
          type: integer
        autoChargeConfig:
          $ref: '#/components/schemas/unibee.api.bean.AutoChargeConfig'
        autoUpgradePlanId:
          description: Target plan id stored in additional settings when >0; independent
            of disableAutoCharge
          format: int64
          properties: {}
          type: integer
        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, used to build checkoutUrl; stored in
            plan additional settings
          format: int64
          properties: {}
          type: integer
        compareAtAmount:
          description: optional strikethrough/compare-at price for regular plan amount
            (minor units, plan currency); UI only; stored in additional settings JSON
            with multiTrials; omit or 0 to leave unset
          format: int64
          properties: {}
          type: integer
        currency:
          description: Plan Currency
          format: string
          properties: {}
          type: string
        description:
          description: Description
          format: string
          properties: {}
          type: string
        disableAutoCharge:
          description: 'Stored: 0=allow subscription auto-charge, 1=disable(single-cycle)
            — only applies to main recurring plans (type=1) with amount>0. For addon,
            onetime, or amount 0, you may still send 0/1; responses always return
            disableAutoCharge 1 and subscriptions never use auto-charge for those
            plans.'
          format: int
          properties: {}
          type: integer
        externalPlanId:
          description: ExternalPlanId
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas for crypto payment, merchant|user
          format: string
          properties: {}
          type: string
        homeUrl:
          description: 'HomeUrl,Start With: http'
          format: string
          properties: {}
          type: string
        imageUrl:
          description: 'ImageUrl,Start With: http'
          format: string
          properties: {}
          type: string
        internalName:
          format: string
          properties: {}
          type: string
        intervalCount:
          description: 'Number Of IntervalUnit，em: day|month|year|week'
          format: int
          properties: {}
          type: integer
        intervalUnit:
          description: 'Plan Interval Unit，em: day|month|year|week'
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          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 set, the first item will
            override trialAmount & trialDurationTime
          format: '[]*bean.PlanMultiTrial'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiTrial'
          properties: {}
          type: array
        onetimeAddonIds:
          description: Plan Ids Of Onetime Addon Type
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planName:
          description: Plan Name
          format: string
          properties: {}
          type: string
        productDescription:
          description: Default Copy Description
          format: string
          properties: {}
          type: string
        productId:
          description: Id of product which plan to linked
          format: int64
          properties: {}
          type: integer
        productName:
          description: Default Copy PlanName
          format: string
          properties: {}
          type: string
        tagIds:
          description: Plan tag ids to bind after create. Omit or [] = no tags. Binding
            is best-effort; retry with edit or batch_tag_bind if needed.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        trialAmount:
          description: price of trial period， not available for addon; overridden
            by multiTrials[0].trialPrice when multiTrials is set
          format: int64
          properties: {}
          type: integer
        trialDemand:
          description: demand of trial， not available for addon, example, paymentMethod,
            payment method will ask for subscription trial start
          format: string
          properties: {}
          type: string
        trialDurationTime:
          description: duration of trial (seconds)， not available for addon; overridden
            by multiTrials[0].trialDuration when multiTrials is set
          format: int64
          properties: {}
          type: integer
        type:
          default: 1
          description: The type of plan, 1-main plan，2-addon plan, 3-onetime plan,
            default main plan
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      required:
      - planName
      - amount
      - currency
      type: object
    unibee.api.merchant.plan.NewRes:
      properties:
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        tags:
          description: Current tags bound to the plan
          format: '[]*bean.Tag'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Tag'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.plan.PublishReq:
      description: Publish plan，a plan will display at user portal when its published
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.PublishRes:
      properties: {}
      type: object
    unibee.api.merchant.plan.UnPublishReq:
      properties:
        externalPlanId:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
        planId:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.plan.UnPublishRes:
      properties: {}
      type: object
    unibee.api.merchant.product.ActivateReq:
      properties:
        productId:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      required:
      - productId
      type: object
    unibee.api.merchant.product.ActivateRes:
      properties: {}
      type: object
    unibee.api.merchant.product.CopyReq:
      properties:
        productId:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      required:
      - productId
      type: object
    unibee.api.merchant.product.CopyRes:
      properties:
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
      type: object
    unibee.api.merchant.product.DeleteReq:
      description: Product can being deleted when has no plan linked
      properties:
        productId:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      required:
      - productId
      type: object
    unibee.api.merchant.product.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.product.DetailReq:
      properties:
        productId:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      required:
      - productId
      type: object
    unibee.api.merchant.product.DetailRes:
      properties:
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
      type: object
    unibee.api.merchant.product.EditReq:
      description: 'Edit exist product, product is editable for both active and inactive
        status '
      properties:
        description:
          description: description
          format: '*string'
          properties: {}
          type: string
        homeUrl:
          description: home_url
          format: '*string'
          properties: {}
          type: string
        imageUrl:
          description: image_url
          format: '*string'
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        productId:
          description: Id of product
          format: int64
          properties: {}
          type: integer
        productName:
          description: ProductName
          format: '*string'
          properties: {}
          type: string
        status:
          description: status，1-active，2-inactive, default active
          format: '*int'
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      required:
      - productId
      type: object
    unibee.api.merchant.product.EditRes:
      properties:
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
      type: object
    unibee.api.merchant.product.InactiveReq:
      properties:
        productId:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      required:
      - productId
      type: object
    unibee.api.merchant.product.InactiveRes:
      properties: {}
      type: object
    unibee.api.merchant.product.ListReq:
      properties:
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，id|create_time|gmt_modify，Default id
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: Filter, Default All，,Status，1-active，2-inactive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      type: object
    unibee.api.merchant.product.ListRes:
      properties:
        products:
          description: Product Object List
          format: '[]*bean.Product'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Product'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.product.NewReq:
      properties:
        description:
          description: description
          format: string
          properties: {}
          type: string
        homeUrl:
          description: home_url
          format: string
          properties: {}
          type: string
        imageUrl:
          description: image_url
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        productName:
          description: ProductName
          format: string
          properties: {}
          type: string
        status:
          description: status，1-active，2-inactive, default active
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      type: object
    unibee.api.merchant.product.NewRes:
      properties:
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
      type: object
    unibee.api.merchant.profile.AmountMultiCurrenciesExchangeReq:
      properties:
        amount:
          description: Amount
          format: int64
          properties: {}
          type: integer
        currency:
          description: The Default Currency
          format: string
          properties: {}
          type: string
      required:
      - amount
      - currency
      type: object
    unibee.api.merchant.profile.AmountMultiCurrenciesExchangeRes:
      properties:
        multiCurrencyConfigs:
          description: Merchant's MultiCurrencies
          format: '[]*bean.PlanMultiCurrency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrency'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.profile.CountryConfigListReq:
      properties: {}
      type: object
    unibee.api.merchant.profile.CountryConfigListRes:
      properties:
        configs:
          description: Configs
          format: '[]*bean.MerchantCountryConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantCountryConfig'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.profile.EditCountryConfigReq:
      properties:
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        name:
          description: name
          format: string
          properties: {}
          type: string
        vatEnable:
          description: VatEnable, Default true
          format: '*bool'
          properties: {}
          type: boolean
      required:
      - countryCode
      type: object
    unibee.api.merchant.profile.EditCountryConfigRes:
      properties: {}
      type: object
    unibee.api.merchant.profile.EditTotpConfigReq:
      properties:
        activate:
          description: activate 2FA for all members, all members need 2FA while login
            if activate, otherwise not
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.profile.EditTotpConfigRes:
      properties: {}
      type: object
    unibee.api.merchant.profile.GetExchangeRateReq:
      description: Get raw exchange rate from the upstream provider, with shared Redis
        cache and cloud fallback. Ignores merchant's multi-currency fixed-rate settings.
      properties:
        fromCurrency:
          description: From currency code, ISO 4217 (e.g. USD)
          format: string
          properties: {}
          type: string
        toCurrency:
          description: To currency code, ISO 4217 (e.g. EUR)
          format: string
          properties: {}
          type: string
      required:
      - fromCurrency
      - toCurrency
      type: object
    unibee.api.merchant.profile.GetExchangeRateRes:
      properties:
        exchangeRate:
          description: Exchange rate from FromCurrency to ToCurrency
          format: float64
          properties: {}
          type: number
        fromCurrency:
          description: From currency code
          format: string
          properties: {}
          type: string
        toCurrency:
          description: To currency code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.GetLicenseReq:
      properties: {}
      type: object
    unibee.api.merchant.profile.GetLicenseRes:
      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
    unibee.api.merchant.profile.GetLicenseUpdateUrlReq:
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        planId:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.GetLicenseUpdateUrlRes:
      properties:
        url:
          description: Url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.GetOverviewStatisticsReq:
      properties: {}
      type: object
    unibee.api.merchant.profile.GetOverviewStatisticsRes:
      properties:
        activePlansCount:
          description: Number of active plans
          format: int64
          properties: {}
          type: integer
        paymentSuccessRate:
          description: Payment success rate, range 0.0~1.0
          format: float64
          properties: {}
          type: number
        successfulPaymentsCount:
          description: Successful payments count
          format: int64
          properties: {}
          type: integer
        totalCustomersCount:
          description: Total customers count
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.profile.GetReq:
      properties: {}
      type: object
    unibee.api.merchant.profile.GetRes:
      properties:
        Currency:
          description: Currency List
          format: '[]*bean.Currency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Currency'
          properties: {}
          type: array
        MemberRoles:
          description: The member role list'
          format: '[]*bean.MerchantRole'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRole'
          properties: {}
          type: array
        TimeZone:
          description: TimeZone List
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        analyticsHost:
          description: Analytics Host
          format: string
          properties: {}
          type: string
        cloudFeatureAnalyticsEnabled:
          description: Analytics Feature Enabled For Cloud Version
          format: bool
          properties: {}
          type: boolean
        cname:
          description: CNAME value for merchant to configure
          format: string
          properties: {}
          type: string
        cnameDomain:
          description: Merchant CNAME Domain
          format: string
          properties: {}
          type: string
        defaultCurrency:
          description: Default Currency
          format: string
          properties: {}
          type: string
        defaultEmailGateway:
          description: Default Email Gateway
          format: string
          properties: {}
          type: string
        emailGateways:
          additionalProperties:
            $ref: '#/components/schemas/unibee.api.bean.EmailGatewayConnectionAPIKeys'
          description: Email Gateway Map
          format: map[string]*bean.EmailGatewayConnectionAPIKeys
          properties: {}
          type: object
        emailSender:
          $ref: '#/components/schemas/unibee.api.bean.Sender'
        env:
          description: 'System Env, em: daily|stage|local|prod'
          format: string
          properties: {}
          type: string
        exchangeRateApiKey:
          description: ExchangeRateApiKey
          format: string
          properties: {}
          type: string
        gateways:
          description: Gateway List
          format: '[]*detail.Gateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
          properties: {}
          type: array
        globalTOPTEnabled:
          description: GlobalTOPTEnabled
          format: bool
          properties: {}
          type: boolean
        globalUSVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATGlobalConfig'
        isOwner:
          description: Check Member is Owner
          format: bool
          properties: {}
          type: boolean
        isProd:
          description: Check System Env Is Prod, true|false
          format: bool
          properties: {}
          type: boolean
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.MerchantProfile'
        merchantMember:
          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
        multiCurrencyConfigs:
          description: Merchant's MultiCurrency Configs
          format: '[]*bean.MerchantMultiCurrencyConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMultiCurrencyConfig'
          properties: {}
          type: array
        openApiHost:
          description: OpenApi Host
          format: string
          properties: {}
          type: string
        openApiKey:
          description: OpenAPIKey
          format: string
          properties: {}
          type: string
        quickBooksCompanyName:
          description: QuickBooksCompanyName
          format: string
          properties: {}
          type: string
        quickBooksLastSyncError:
          description: QuickBooksLastSyncError
          format: string
          properties: {}
          type: string
        quickBooksLastSynchronized:
          description: QuickBooksLastSynchronized
          format: string
          properties: {}
          type: string
        segmentServerSideKey:
          description: SegmentServerSideKey
          format: string
          properties: {}
          type: string
        segmentUserPortalKey:
          description: SegmentUserPortalKey
          format: string
          properties: {}
          type: string
        sendGridKey:
          description: SendGridKey
          format: string
          properties: {}
          type: string
        taxJarApiKeys:
          $ref: '#/components/schemas/unibee.api.bean.USVATGatewayConnectionAPIKeys'
        vatSenseKey:
          description: VatSenseKey
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.NewApiKeyReq:
      description: Generate new apikey, The old one expired in one hour
      properties: {}
      type: object
    unibee.api.merchant.profile.NewApiKeyRes:
      properties:
        apiKey:
          description: ApiKey
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.SetupMultiCurrenciesReq:
      properties:
        multiCurrencyConfigs:
          description: Merchant's MultiCurrencies
          format: '[]*bean.MerchantMultiCurrencyConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMultiCurrencyConfig'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.profile.SetupMultiCurrenciesRes:
      properties:
        multiCurrencyConfigs:
          description: Merchant's MultiCurrencies
          format: '[]*bean.MerchantMultiCurrencyConfig'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantMultiCurrencyConfig'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.profile.UpdateCnameDomainReq:
      properties:
        domain:
          description: CNAME domain
          format: string
          properties: {}
          type: string
      required:
      - domain
      type: object
    unibee.api.merchant.profile.UpdateCnameDomainRes:
      properties: {}
      type: object
    unibee.api.merchant.profile.UpdatePortalHostReq:
      properties:
        domain:
          description: domain
          format: string
          properties: {}
          type: string
      required:
      - domain
      type: object
    unibee.api.merchant.profile.UpdatePortalHostRes:
      properties: {}
      type: object
    unibee.api.merchant.profile.UpdateReq:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        companyLogo:
          description: company_logo
          format: string
          properties: {}
          type: string
        companyName:
          description: company_name
          format: string
          properties: {}
          type: string
        companyRegistryCode:
          description: Country Registry Code
          format: '*string'
          properties: {}
          type: string
        companyVatNumber:
          description: Country Vat Number
          format: '*string'
          properties: {}
          type: string
        countryCode:
          description: Country Code
          format: string
          properties: {}
          type: string
        countryName:
          description: Country Name
          format: string
          properties: {}
          type: string
        defaultCurrency:
          description: Merchant default currency, empty string clears explicit setting
          format: '*string'
          properties: {}
          type: string
        email:
          description: email
          format: string
          properties: {}
          type: string
        phone:
          description: phone
          format: string
          properties: {}
          type: string
        timeZone:
          description: User TimeZone
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.profile.UpdateRes:
      properties:
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.MerchantProfile'
      type: object
    unibee.api.merchant.role.DeleteReq:
      properties:
        id:
          description: id
          format: int64
          properties: {}
          type: integer
      required:
      - id
      type: object
    unibee.api.merchant.role.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.role.EditReq:
      properties:
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        permissions:
          description: Permissions
          format: '[]*bean.MerchantRolePermission'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRolePermission'
          properties: {}
          type: array
        role:
          description: Role
          format: string
          properties: {}
          type: string
      required:
      - id
      - role
      - permissions
      type: object
    unibee.api.merchant.role.EditRes:
      properties: {}
      type: object
    unibee.api.merchant.role.ListReq:
      properties: {}
      type: object
    unibee.api.merchant.role.ListRes:
      properties:
        merchantRoles:
          description: Merchant Roles
          format: '[]*bean.MerchantRole'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRole'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.role.NewReq:
      properties:
        permissions:
          description: Permissions
          format: '[]*bean.MerchantRolePermission'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantRolePermission'
          properties: {}
          type: array
        role:
          description: Role
          format: string
          properties: {}
          type: string
      required:
      - role
      - permissions
      type: object
    unibee.api.merchant.role.NewRes:
      properties: {}
      type: object
    unibee.api.merchant.search.PrecisionMatchObject:
      properties:
        data:
          $ref: '#/components/schemas/interface'
        id:
          description: match Id user_id|invoice_id
          format: string
          properties: {}
          type: string
        type:
          description: match Type, user|invoice
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.search.SearchReq:
      properties:
        searchKey:
          description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.search.SearchRes:
      properties:
        matchInvoice:
          description: MatchInvoice
          format: '[]*bean.Invoice'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Invoice'
          properties: {}
          type: array
        matchUserAccounts:
          description: MatchUserAccounts
          format: '[]*detail.UserAccountDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
          properties: {}
          type: array
        precisionMatchObject:
          $ref: '#/components/schemas/unibee.api.merchant.search.PrecisionMatchObject'
      type: object
    unibee.api.merchant.session.CustomerPortalUrlReq:
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        email:
          description: Email, unique, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        planId:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
        productId:
          description: Id of product, default product will use if productId not specified
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
        userId:
          description: UserId, unique, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: Vat Country Code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.session.CustomerPortalUrlRes:
      properties:
        url:
          description: Url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.session.NewReq:
      description: New session for hosted checkout or client portal. You can create
        user and get ClientSession from here, then append it to the checkout link
        (copied from Admin Portal Plan) as a query parameter, e.g. https://cs.unibee.dev/hosted/checkout?planId=253&env=prod&session=${clientSession}
      properties:
        address:
          description: Address
          format: string
          properties: {}
          type: string
        cancelUrl:
          description: CancelUrl, back to cancelUrl if checkout cancelled
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        firstName:
          description: First Name
          format: string
          properties: {}
          type: string
        lastName:
          description: Last Name
          format: string
          properties: {}
          type: string
        password:
          description: Password
          format: string
          properties: {}
          type: string
        phone:
          description: Phone
          format: string
          properties: {}
          type: string
        returnUrl:
          description: ReturnUrl, back to returnUrl if checkout completed
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.session.NewRes:
      properties:
        clientSession:
          description: ClientSession
          format: string
          properties: {}
          type: string
        clientToken:
          description: ClientToken
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        url:
          description: Url
          format: string
          properties: {}
          type: string
        userId:
          description: UserId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.session.NewSubUpdatePageReq:
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        email:
          description: Email, unique, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        planId:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
        productId:
          description: Id of product,default product will use if productId not specified
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
        userId:
          description: UserId, unique, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: Vat Country Code
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.session.NewSubUpdatePageRes:
      properties:
        url:
          description: Url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.ActiveSubscriptionImportReq:
      description: Each repetition import overrides existing subscriptions with matching
        ExternalSubscriptionId.
      properties:
        StripePaymentMethod:
          description: The stripe payment method id which user attached, get from
            stripe, required if stripe auto-charge needed
          format: string
          properties: {}
          type: string
        StripeUserId:
          description: The stripe customer id of user get from stripe, required if
            stripe auto-charge needed
          format: string
          properties: {}
          type: string
        billingCycleAnchor:
          description: Required, UTC time, The reference point that aligns future
            billing cycle dates. It sets the day of week for week intervals, the day
            of month for month and year intervals, and the month of year for year
            intervals, format '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        countryCode:
          description: Required. Specifies the ISO 3166-1 alpha-2 country code for
            the subscription (e.g., EE, RU). This code determines the applicable tax
            rules for the subscription.
          format: string
          properties: {}
          required:
          - "true"
          type: string
        createTime:
          description: Required, UTC time, the creation time of subscription, format
            '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        currentPeriodEnd:
          description: Required, UTC time, the current period end time of subscription,
            format '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        currentPeriodStart:
          description: Required, UTC time, the current period start time of subscription,
            format '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.ExternalDiscountParam'
        email:
          description: The email of user, one of Email or ExternalUserId is required
          format: string
          properties: {}
          type: string
        expectedTotalAmount:
          description: 'Optional. Unit: cents. If greater than 0, the system will
            verify the calculated total amount against this value'
          format: int64
          properties: {}
          type: integer
        externalPlanId:
          description: The external id of plan, one of planId or ExternalPlanId is
            required, plan should created at UniBee at first
          format: string
          properties: {}
          type: string
        externalSubscriptionId:
          description: Required, The external id of subscription
          format: string
          properties: {}
          required:
          - "true"
          type: string
        externalUserId:
          description: 'The external id of user, one of Email or ExternalUserId is
            required '
          format: string
          properties: {}
          type: string
        features:
          description: In json format, additional features data of subscription, will
            join user's metric data in user api if provided'
          format: string
          properties: {}
          type: string
        firstPaidTime:
          description: UTC time, the first payment success time of subscription, format
            '2006-01-02 15:04:05'
          format: string
          properties: {}
          type: string
        gateway:
          description: 'Required, should one of stripe|paypal|wire_transfer|changelly '
          format: string
          properties: {}
          required:
          - "true"
          type: string
        gatewayPaymentType:
          format: string
          properties: {}
          type: string
        importProrationBase:
          $ref: '#/components/schemas/unibee.api.bean.ImportProrationBase'
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        paypalAgreementToken:
          description: The billing agreement token of user payment method while billing
            agreement reference transaction enabled, required if paypal auto-charge
            needed
          format: string
          properties: {}
          type: string
        paypalVaultId:
          description: The paypal vault id of user payment method, get from paypal
            while vault permission enabled, required if paypal auto-charge needed
          format: string
          properties: {}
          type: string
        planId:
          description: 'The id of plan, one of planId or ExternalPlanId is required,
            plan should created at UniBee at first '
          format: int64
          properties: {}
          type: integer
        quantity:
          description: 'the quantity of plan, default 1 if not provided '
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
        taxPercentage:
          description: The tax percentage. Only applicable when the system VAT gateway
            not setup. Value is in thousandths (e.g., 1000 = 10%).
          format: int64
          properties: {}
          type: integer
        vatNumber:
          description: The Vat Number of user
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.ActiveSubscriptionImportRes:
      properties:
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
      type: object
    unibee.api.merchant.subscription.ActiveTemporarilyReq:
      description: Subscription active temporarily, status will transmit from pending
        to incomplete
      properties:
        expireTime:
          description: ExpireTime, the expire utc time if not paid
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - expireTime
      type: object
    unibee.api.merchant.subscription.ActiveTemporarilyRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.AddNewTrialStartReq:
      properties:
        appendTrialEndHour:
          description: add appendTrialEndHour For Free
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - appendTrialEndHour
      type: object
    unibee.api.merchant.subscription.AddNewTrialStartRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.AdminNoteListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.merchant.subscription.AdminNoteListRes:
      properties:
        noteLists:
          format: '[]*subscription.AdminNoteRo'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.subscription.AdminNoteRo'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.subscription.AdminNoteRo:
      properties:
        createTime:
          description: CreateTime, UTC Time
          format: int64
          properties: {}
          type: integer
        email:
          description: Email
          format: string
          properties: {}
          type: string
        firstName:
          description: FirstName
          format: string
          properties: {}
          type: string
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        lastName:
          description: LastName
          format: string
          properties: {}
          type: string
        mobile:
          description: Mobile
          format: string
          properties: {}
          type: string
        note:
          description: Note
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        userName:
          description: UserName
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.ApplySubscriptionNextInvoiceReq:
      properties:
        applyPromoCreditAmount:
          description: apply promo credit amount
          format: int64
          properties: {}
          type: integer
        discountCode:
          description: DiscountCode
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed if subscriptionId not specified
          format: string
          properties: {}
          type: string
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.ApplySubscriptionNextInvoiceRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        subscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
      type: object
    unibee.api.merchant.subscription.CancelAtPeriodEndReq:
      description: Cancel subscription at period end, the subscription will not turn
        to 'cancelled' at once but will cancelled at period end time, no invoice will
        generate, the flag 'cancelAtPeriodEnd' of subscription will be enabled
      properties:
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId, id of subscription, either SubscriptionId or
            UserId needed, The only one active subscription of userId will effect
          format: string
          properties: {}
          type: string
        userId:
          description: UserId, either SubscriptionId or UserId needed, The only one
            active subscription will effect if userId provide instead of subscriptionId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.CancelAtPeriodEndRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.CancelLastCancelAtPeriodEndReq:
      description: This action should be request before subscription's period end,
        If subscription's flag 'cancelAtPeriodEnd' is enabled, this action will resume
        it to disable, and subscription will continue cycle recurring seems no cancelAtPeriod
        action be setting
      properties:
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId, id of subscription, either SubscriptionId or
            UserId needed, The only one active subscription of userId will effect
          format: string
          properties: {}
          type: string
        userId:
          description: UserId, either SubscriptionId or UserId needed, The only one
            active subscription will effect if userId provide instead of subscriptionId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.CancelLastCancelAtPeriodEndRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.CancelReq:
      description: Cancel subscription immediately, no proration invoice will generate
      properties:
        invoiceNow:
          deprecated: true
          description: Default false
          format: bool
          properties: {}
          type: boolean
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        prorate:
          deprecated: true
          description: Prorate Generate Invoice，Default false
          format: bool
          properties: {}
          type: boolean
        reason:
          description: Reason
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId, id of subscription, either SubscriptionId or
            UserId needed, The only one active subscription of userId will effect
          format: string
          properties: {}
          type: string
        userId:
          description: UserId, either SubscriptionId or UserId needed, The only one
            active subscription will effect if userId provide instead of subscriptionId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.CancelRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.ChangeCurrencyReq:
      description: Change subscription currency, only available for merchants with
        multi-currency enabled
      properties:
        currency:
          description: The new currency code
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - currency
      type: object
    unibee.api.merchant.subscription.ChangeCurrencyRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.ChangeDueDayReq:
      description: Change subscription due day
      properties:
        dueDay:
          description: DueDay, UTC timestamp, seconds
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - dueDay
      type: object
    unibee.api.merchant.subscription.ChangeDueDayRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.ChangeGatewayReq:
      properties:
        gatewayId:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
        paymentMethodId:
          description: PaymentMethodId
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - gatewayId
      type: object
    unibee.api.merchant.subscription.ChangeGatewayRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.ConfigReq:
      properties: {}
      type: object
    unibee.api.merchant.subscription.ConfigRes:
      properties:
        config:
          $ref: '#/components/schemas/unibee.api.bean.SubscriptionConfig'
      type: object
    unibee.api.merchant.subscription.ConfigUpdateReq:
      properties:
        autoChargeMaxRetryCount:
          description: AutoChargeMaxRetryCount, max automatic-charge attempts for
            one invoice including the first automatic attempt; 0 = unlimited (current
            behavior). Omit to leave unchanged.
          format: '*int64'
          properties: {}
          type: integer
        autoChargeRetryInterval:
          description: AutoChargeRetryInterval, seconds to wait before retrying a
            failed auto-charge within the window (default 12h). Omit to leave unchanged.
          format: '*int64'
          properties: {}
          type: integer
        discountNewUserIgnoreFreeZeroInvoice:
          description: DiscountNewUserIgnoreFreeZeroInvoice, when true ignore only
            true free-plan zeros (no discount code / discount amount / promo credit)
            for new-user scope; default false = legacy any paid invoice. Omit to leave
            unchanged.
          format: '*bool'
          properties: {}
          type: boolean
        downgradeEffectImmediately:
          description: DowngradeEffectImmediately, Immediate Downgrade (by default,
            the downgrades takes effect at the end of the period ）
          format: '*bool'
          properties: {}
          type: boolean
        downgradeNonImmediatelyEffectBeforePeriodEnd:
          description: DowngradeNonImmediatelyEffectBeforePeriodEnd, seconds, For
            non-immediate downgrade, can take effect before period end (default 30
            minutes, 1800 seconds)
          format: '*int64'
          properties: {}
          type: integer
        gatewayVATRule:
          format: '[]*bean.MerchantVatRule'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantVatRule'
          properties: {}
          type: array
        incompleteExpireTime:
          description: IncompleteExpireTime, seconds, Incomplete Status Duration(The
            period during which subscription remains in 'incomplete')
          format: '*int64'
          properties: {}
          type: integer
        invoiceEmail:
          description: InvoiceEmail, Enable Invoice Email (Toggle to send invoice
            email to customers)
          format: '*bool'
          properties: {}
          type: boolean
        showZeroInvoice:
          description: ShowZeroInvoice, Display Invoices With Zero Amount (Invoice
            With Zero Amount will hidden in list by default)
          format: '*bool'
          properties: {}
          type: boolean
        tryAutomaticPaymentBeforePeriodEnd:
          description: TryAutomaticPaymentBeforePeriodEnd, Auto-charge Start Before
            Period End （Time Difference for Auto-Payment Activation Before Period
            End）
          format: '*int64'
          properties: {}
          type: integer
        upgradeProration:
          description: UpgradeProration, Prorated Upgrade Invoices(Upgrades will generate
            prorated invoice by default)
          format: '*bool'
          properties: {}
          type: boolean
        upgradeResetBillingCycle:
          description: 'UpgradeResetBillingCycle, same-interval upgrades only: full
            new-plan cycle from upgrade time and reset due day when true (default);
            legacy fixed-end proration when false. Omit on update to leave unchanged.'
          format: '*bool'
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.subscription.ConfigUpdateRes:
      properties:
        config:
          $ref: '#/components/schemas/unibee.api.bean.SubscriptionConfig'
      type: object
    unibee.api.merchant.subscription.CreatePreviewReq:
      properties:
        addonParams:
          description: Optional. List of addon plan parameters to be attached to this
            subscription.
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        allowMultipleActiveSubscription:
          description: Optional. If true, skip the 'one active subscription per user
            per product' check, allowing the user to hold multiple active subscriptions
            under the same product. Merchant is responsible for billing in this case.
          format: bool
          properties: {}
          type: boolean
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit to this preview
            calculation.
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply. If omitted
            and applyPromoCredit is true, the system auto-computes the usable amount.
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: Optional. Currency code for pricing (e.g. USD, EUR). If empty,
            plan default currency is used.
          format: string
          properties: {}
          type: string
        discountCode:
          description: Optional. Discount or coupon code applied to this preview.
          format: string
          properties: {}
          type: string
        email:
          description: Optional. End-user email. Required when creating a new user
            via ExternalUserId&Email if userId is not provided.
          format: string
          properties: {}
          type: string
        externalUserId:
          description: Optional. Merchant-side unique user identifier. Use together
            with email when userId is not provided.
          format: string
          properties: {}
          type: string
        freeInInitialPeriod:
          description: Optional. If true, the first billing period is treated as free
            or trial, taking precedence over trialEnd.
          format: '*bool'
          properties: {}
          type: boolean
        freeTimeEnd:
          description: Optional. Custom free period end time when freeInInitialPeriod
            is true, as UTC timestamp (seconds). Can shorten or extend the default
            first-period-free behavior.
          format: '*int64'
          properties: {}
          type: integer
        gatewayId:
          description: Optional. Payment gateway ID to be used for this subscription
            preview. If omitted, default gateway selection rules apply.
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Optional. Payment type for the selected gateway, such as card,
            wallet, etc.
          format: string
          properties: {}
          type: string
        planId:
          description: Required. ID of the subscription plan to be purchased.
          format: int64
          properties: {}
          type: integer
        quantity:
          description: Optional. Number of units for the plan. Defaults to 1 if not
            specified.
          format: int64
          properties: {}
          type: integer
        subscriptionStartTime:
          description: Optional. Custom subscription first period start time as UTC
            timestamp (seconds). If set, the first billing period starts from this
            time instead of current time. Not supported with trial, free initial period
            or multi-trial plans.
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: Optional. External tax percentage override, in basis points
            (e.g. 1000 = 10%%). Only available for OpenAPI calls.
          format: '*int64'
          properties: {}
          type: integer
        trialEnd:
          description: Optional. Custom trial end time as UTC timestamp (seconds).
            Overrides plan default trial configuration when greater than now.
          format: int64
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.NewUser'
        userId:
          description: Optional. Internal user ID in UniBee. If provided, it must
            match the email/user object when they are also provided.
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: Optional. ISO country code for VAT calculation. If provided
            together with vatNumber, they must be consistent.
          format: string
          properties: {}
          type: string
        vatNumber:
          description: Optional. Customer VAT number used for VAT validation and tax
            calculation.
          format: string
          properties: {}
          type: string
      required:
      - planId
      type: object
    unibee.api.merchant.subscription.CreatePreviewRes:
      properties:
        addonParams:
          description: Addon parameters used to compute the preview.
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        addons:
          description: Resolved addon plan details included in this preview.
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        applyPromoCredit:
          description: Whether promo credit is effectively applied in this preview.
          format: bool
          properties: {}
          type: boolean
        currency:
          description: Currency used for this preview.
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          description: Total discount amount applied in this preview, including promo
            credit if applicable.
          format: int64
          properties: {}
          type: integer
        discountMessage:
          description: Human-readable message describing discount application result.
          format: string
          properties: {}
          type: string
        email:
          description: Resolved user email used in this preview.
          format: string
          properties: {}
          type: string
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        originAmount:
          description: Original invoice amount before discounts and promo credit,
            in minor units.
          format: int64
          properties: {}
          type: integer
        otherActiveSubscriptionId:
          description: 'other active or incomplete subscription id '
          format: string
          properties: {}
          type: string
        otherPendingCryptoSubscription:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        quantity:
          description: Quantity of the plan used in preview.
          format: int64
          properties: {}
          type: integer
        recurringDiscountCode:
          description: Discount code persisted for later billing cycles (e.g. after
            trial), when applicable.
          format: string
          properties: {}
          type: string
        subscriptionAmountExcludingTax:
          description: Total subscription amount excluding tax for the previewed invoice,
            in minor units.
          format: int64
          properties: {}
          type: integer
        taxAmount:
          description: Total tax amount for the previewed invoice, in minor units.
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: Effective tax percentage applied in this preview, in basis
            points (e.g. 1000 = 10%%).
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Final payable amount for the previewed invoice, including tax
            and after discounts, in minor units.
          format: int64
          properties: {}
          type: integer
        trialEnd:
          description: trial_end, utc time
          format: int64
          properties: {}
          type: integer
        userId:
          description: Resolved user ID used in this preview.
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: Country code used for VAT calculation.
          format: string
          properties: {}
          type: string
        vatCountryName:
          description: Country name used for VAT calculation, when available.
          format: string
          properties: {}
          type: string
        vatNumber:
          description: VAT number used in this preview, if any.
          format: string
          properties: {}
          type: string
        vatNumberValidate:
          $ref: '#/components/schemas/unibee.api.bean.ValidResult'
        vatNumberValidateMessage:
          description: Human-readable message for VAT number validation result.
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.CreateReq:
      properties:
        addonParams:
          description: Optional. List of addon plan parameters to be attached to this
            subscription.
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        allowMultipleActiveSubscription:
          description: Optional. If true, skip the 'one active subscription per user
            per product' check, allowing the user to hold multiple active subscriptions
            under the same product. Merchant is responsible for billing in this case.
          format: bool
          properties: {}
          type: boolean
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit when creating
            the first invoice.
          format: bool
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply. If omitted
            and applyPromoCredit is true, the system auto-computes the usable amount.
          format: '*int64'
          properties: {}
          type: integer
        cancelUrl:
          description: Optional. URL to redirect the user to when the user cancels
            or the payment fails.
          format: string
          properties: {}
          type: string
        confirmCurrency:
          description: Optional. When provided, represents the expected currency code
            for the first invoice and must match the value returned from preview,
            otherwise the request is rejected.
          format: string
          properties: {}
          type: string
        confirmTotalAmount:
          description: Optional. When provided, represents the expected total amount
            (in minor units) for the first invoice and must match the value returned
            from preview, otherwise the request is rejected.
          format: int64
          properties: {}
          type: integer
        currency:
          description: Optional. Currency code for charging (e.g. USD, EUR). If empty,
            plan default currency is used.
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.ExternalDiscountParam'
        discountCode:
          description: Optional. Discount or coupon code to be applied to this subscription
            creation.
          format: string
          properties: {}
          type: string
        email:
          description: Optional. End-user email. One of (ExternalUserId & Email),
            UserId or User object must be provided to identify the user.
          format: string
          properties: {}
          type: string
        externalUserId:
          description: Optional. Merchant-side unique user identifier. Used together
            with email when UserId is not provided.
          format: string
          properties: {}
          type: string
        freeInInitialPeriod:
          description: Optional. If true, the first billing period is treated as free
            or trial. This has higher priority than trialEnd.
          format: '*bool'
          properties: {}
          type: boolean
        freeTimeEnd:
          description: Optional. Custom free period end time when freeInInitialPeriod
            is true, as UTC timestamp (seconds). Has higher priority than trialEnd
            and can shorten or extend the default first-period-free behavior.
          format: '*int64'
          properties: {}
          type: integer
        gatewayId:
          description: Optional. Payment gateway ID used to charge the first invoice
            of this subscription.
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Optional. Payment type for the selected gateway, such as card,
            wallet, etc.
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Optional. Custom metadata map that will be stored on the created
            invoice and subscription.
          format: map[string]interface {}
          properties: {}
          type: object
        paymentMethodId:
          description: Optional. Existing payment method ID to be used for charging
            the first invoice.
          format: string
          properties: {}
          type: string
        paymentUIMode:
          description: 'Optional. Checkout UI mode: hosted | embedded | custom. Default
            is hosted.'
          format: string
          properties: {}
          type: string
        planId:
          description: Required. ID of the subscription plan to be created.
          format: int64
          properties: {}
          type: integer
        productData:
          $ref: '#/components/schemas/unibee.api.bean.PlanProductParam'
        quantity:
          description: Optional. Number of units for the plan. Defaults to 1 if not
            specified.
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: Optional. URL to redirect the user to after successful subscription
            creation or payment completion.
          format: string
          properties: {}
          type: string
        splitPayment:
          description: 'Optional. If true, always use split payment mode: create a
            hosted invoice link without attempting automatic payment. If false, the
            system will try automatic payment first and may still switch to split
            payment based on gateway response and risk control.'
          format: bool
          properties: {}
          type: boolean
        startIncomplete:
          description: 'Optional. If true, the subscription starts in incomplete status
            (now pay later): invoice is created and the subscription becomes active
            temporarily until paid or expired.'
          format: bool
          properties: {}
          type: boolean
        subscriptionStartTime:
          description: Optional. Custom subscription first period start time as UTC
            timestamp (seconds). If set, the first billing period starts from this
            time instead of current time. Not supported with trial, free initial period
            or multi-trial plans.
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          description: Optional. External tax percentage override, in basis points
            (e.g. 1000 = 10%%). Overrides subscription-level taxPercentage when provided.
          format: '*int64'
          properties: {}
          type: integer
        trialEnd:
          description: Optional. Custom trial end time as UTC timestamp (seconds).
            If greater than now, it overrides the plan default trial configuration.
          format: int64
          properties: {}
          type: integer
        user:
          $ref: '#/components/schemas/unibee.api.bean.NewUser'
        userId:
          description: Optional. Internal UniBee user ID. If provided, it must be
            consistent with email/user when they are also provided.
          format: int64
          properties: {}
          type: integer
        vatCountryCode:
          description: Optional. ISO country code for VAT calculation. If provided
            together with vatNumber, they must be consistent.
          format: string
          properties: {}
          type: string
        vatNumber:
          description: Optional. Customer VAT number used for VAT validation and tax
            calculation.
          format: string
          properties: {}
          type: string
      required:
      - planId
      type: object
    unibee.api.merchant.subscription.CreateRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        invoiceId:
          description: ID of the first invoice generated for this subscription.
          format: string
          properties: {}
          type: string
        link:
          description: Hosted payment or invoice link. When paid=false, redirect the
            customer to this link to complete payment.
          format: string
          properties: {}
          type: string
        otherPendingCryptoSubscription:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
        paid:
          description: Whether the first invoice has been successfully paid at the
            time of response.
          format: bool
          properties: {}
          type: boolean
        paymentId:
          description: ID of the payment created for the first invoice, if any.
          format: string
          properties: {}
          type: string
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        token:
          description: Portal authentication token for the user, used by admin portal
            flows.
          format: string
          properties: {}
          type: string
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.merchant.subscription.DetailReq:
      properties:
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.merchant.subscription.DetailRes:
      properties:
        addonParams:
          description: AddonParams
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        addons:
          description: Plan Addon
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        latestInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        unfinishedSubscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.merchant.subscription.HistorySubscriptionImportReq:
      description: Each repetition import overrides existing subscriptions with matching
        ExternalSubscriptionId.
      properties:
        countryCode:
          description: Required. Specifies the ISO 3166-1 alpha-2 country code for
            the subscription (e.g., EE, RU). This code determines the applicable tax
            rules for the subscription.
          format: string
          properties: {}
          required:
          - "true"
          type: string
        currentPeriodEnd:
          description: Required, UTC time, the current period end time of subscription,
            format '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        currentPeriodStart:
          description: Required, UTC time, the current period start time of subscription,
            format '2006-01-02 15:04:05'
          format: string
          properties: {}
          required:
          - "true"
          type: string
        email:
          description: The email of user, one of Email or ExternalUserId is required
          format: string
          properties: {}
          type: string
        externalPlanId:
          description: The external id of plan, one of planId or ExternalPlanId is
            required, plan should created at UniBee at first
          format: string
          properties: {}
          type: string
        externalSubscriptionId:
          description: Required, The external id of subscription
          format: string
          properties: {}
          required:
          - "true"
          type: string
        externalUserId:
          description: 'The external id of user, one of Email or ExternalUserId is
            required '
          format: string
          properties: {}
          type: string
        gateway:
          description: 'Required, should one of stripe|paypal|wire_transfer|changelly '
          format: string
          properties: {}
          required:
          - "true"
          type: string
        gatewayPaymentType:
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        planId:
          description: 'The id of plan, one of planId or ExternalPlanId is required,
            plan should created at UniBee at first '
          format: int64
          properties: {}
          type: integer
        quantity:
          description: 'the quantity of plan, default 1 if not provided '
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
        taxPercentage:
          description: The TaxPercentage of subscription, Only applicable when the
            system VAT gateway not setup, 1000 = 10%
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: 'Required. The total subscription amount including tax, unit
            in cents. Recommendation: Please provide the original price (amount with
            tax before any discounts) to maintain data consistency. Note: The system
            will not validate this amount against the plan price, as external billing
            systems may have different calculation logic.'
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
      type: object
    unibee.api.merchant.subscription.HistorySubscriptionImportRes:
      properties:
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
      type: object
    unibee.api.merchant.subscription.ImportProrationBaseSetupReq:
      description: Backfill the historical paid amount (and optional start time) used
        as the upgrade proration credit base. Only allowed when the subscription's
        latest invoice is a paid, zero-amount invoice without any discount (e.g. migrated/imported
        subscriptions). Overwrites any previously injected proration base.
      properties:
        lastPaidAmount:
          description: Required. Historical paid amount in minor units (cent), used
            directly as the upgrade proration credit base, must be greater than 0
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
        skipImportCheck:
          description: Optional, default false. When true, skips the import-state
            check (subscription Data must start with ImportBy), allowing the proration
            base to be set up even on non-imported subscriptions or ones that already
            entered the next period. The first-invoice zero-amount/paid/no-discount
            checks still apply.
          format: bool
          properties: {}
          type: boolean
        startTime:
          description: Optional. Historical period start time (utc seconds). When
            greater than 0, overrides the proration window start; must be earlier
            than the subscription current period end
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: Required. The id of subscription to backfill the proration
            base for
          format: string
          properties: {}
          required:
          - "true"
          type: string
      type: object
    unibee.api.merchant.subscription.ImportProrationBaseSetupRes:
      properties:
        invoiceId:
          description: The latest invoice id the proration base was written to
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.ListReq:
      properties:
        Email:
          description: The filter email of subscription user
          format: string
          properties: {}
          type: string
        amountEnd:
          description: The filter end amount of subscription
          format: '*int64'
          properties: {}
          type: integer
        amountStart:
          description: The filter start amount of subscription
          format: '*int64'
          properties: {}
          type: integer
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        currency:
          description: The currency of subscription
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: The filter ids of plan
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        planTagFilter:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
        productIds:
          description: The filter ids of product, invalid if planIds is provided
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        searchKey:
          description: Search SubscriptionId|Email
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: Filter, Default All，Status，1-Pending｜2-Active｜3-Suspend | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.ListRes:
      properties:
        subscriptions:
          description: Subscriptions
          format: '[]*detail.SubscriptionDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.NewAdminNoteReq:
      properties:
        note:
          description: Note
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - note
      type: object
    unibee.api.merchant.subscription.NewAdminNoteRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.NewPaymentReq:
      properties:
        cancelUrl:
          description: CancelUrl
          format: string
          properties: {}
          type: string
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        currency:
          description: Currency, either Currency&TotalAmount or PlanId needed
          format: string
          properties: {}
          type: string
        description:
          description: Description
          format: string
          properties: {}
          type: string
        email:
          description: Email, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
        externalPaymentId:
          description: ExternalPaymentId should unique for payment
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
        items:
          description: Items
          format: '[]*payment.Item'
          items:
            $ref: '#/components/schemas/unibee.api.merchant.payment.Item'
          properties: {}
          type: array
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: Name
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId, either TotalAmount&Currency or PlanId needed
          format: int64
          properties: {}
          type: integer
        redirectUrl:
          description: Redirect Url
          format: string
          properties: {}
          type: string
        totalAmount:
          description: Total PaymentAmount, Cent, either TotalAmount&Currency or PlanId
            needed
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
      required:
      - gatewayId
      type: object
    unibee.api.merchant.subscription.NewPaymentRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        externalPaymentId:
          description: The external unique id of payment
          format: string
          properties: {}
          type: string
        link:
          format: string
          properties: {}
          type: string
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
        status:
          description: Status, 10-Created|20-Success|30-Failed|40-Cancelled
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.OnetimeAddonNewReq:
      description: Create payment for subscription onetime addon purchase
      properties:
        addonId:
          description: AddonId, id of one-time addon plan. The new payment amount
            is calculated from the addon amount and quantity
          format: int64
          properties: {}
          type: integer
        applyPromoCredit:
          description: apply promo credit or not
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: apply promo credit amount, auto compute if not specified
          format: '*int64'
          properties: {}
          type: integer
        bypassSubCheck:
          description: When SubscriptionId is blank, allow purchase even if no active/incomplete
            subscription is found. If a subscription is found, the addon still attaches
            to it
          format: bool
          properties: {}
          type: boolean
        cancelUrl:
          description: CancelUrl, back to cancelUrl if user cancel the payment
          format: string
          properties: {}
          type: string
        currency:
          description: The currency of payment
          format: string
          properties: {}
          type: string
        description:
          description: Custom product description for payment gateway and invoice
            line display
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Amount of discount
          format: '*int64'
          properties: {}
          type: integer
        discountCode:
          description: DiscountCode
          format: string
          properties: {}
          type: string
        discountPercentage:
          description: Percentage of discount, 100=1%, ignore if discountAmount specified
          format: '*int64'
          properties: {}
          type: integer
        email:
          description: Email. Used with ExternalUserId when SubscriptionId is blank
            and UserId is not provided
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique. Used with Email when SubscriptionId
            is blank and UserId is not provided
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId, use user's gateway if not provide
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: string
          properties: {}
          type: string
        manualPayment:
          description: Optional. Defaults to true. If true, do not charge the saved
            payment method automatically; return a checkout link for manual payment
            instead.
          format: '*bool'
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，custom data
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: Custom product name for payment gateway and invoice line display.
            Does not change InvoiceName
          format: string
          properties: {}
          type: string
        paymentUIMode:
          description: 'Optional. Checkout UI mode: hosted | embedded | custom. Default
            is hosted.'
          format: string
          properties: {}
          type: string
        quantity:
          description: Quantity, quantity of the new payment which one-time addon
            purchased
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: ReturnUrl, the addon's payment will redirect based on the returnUrl
            provided when it's back from gateway side
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId, id of subscription which addon will attach
            to. If blank, UserId or ExternalUserId&Email is required
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: TaxPercentage，1000 = 10%, default user's taxPercentage if not
            specified
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: UserId. Required when SubscriptionId is blank unless ExternalUserId&Email
            is provided
          format: int64
          properties: {}
          type: integer
      required:
      - addonId
      - quantity
      type: object
    unibee.api.merchant.subscription.OnetimeAddonNewRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        link:
          description: if automatic payment is false, Gateway Link will provided that
            manual payment needed
          format: string
          properties: {}
          type: string
        paid:
          description: true if payment is already successful, false if user still
            needs to complete gateway payment
          format: bool
          properties: {}
          type: boolean
        subscriptionOnetimeAddon:
          $ref: '#/components/schemas/unibee.api.bean.SubscriptionOnetimeAddon'
      type: object
    unibee.api.merchant.subscription.OnetimeAddonPreviewReq:
      description: Preview for subscription onetime addon purchase
      properties:
        addonId:
          description: AddonId, id of one-time addon plan. The new payment amount
            is calculated from the addon amount and quantity
          format: int64
          properties: {}
          type: integer
        applyPromoCredit:
          description: apply promo credit or not
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: apply promo credit amount, auto compute if not specified
          format: '*int64'
          properties: {}
          type: integer
        bypassSubCheck:
          description: When SubscriptionId is blank, allow purchase even if no active/incomplete
            subscription is found. If a subscription is found, the addon still attaches
            to it
          format: bool
          properties: {}
          type: boolean
        currency:
          description: The currency of payment
          format: string
          properties: {}
          type: string
        description:
          description: Custom product description for payment gateway and invoice
            line display
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Amount of discount
          format: '*int64'
          properties: {}
          type: integer
        discountCode:
          description: DiscountCode
          format: string
          properties: {}
          type: string
        discountPercentage:
          description: Percentage of discount, 100=1%, ignore if discountAmount specified
          format: '*int64'
          properties: {}
          type: integer
        email:
          description: Email. Used with ExternalUserId when SubscriptionId is blank
            and UserId is not provided
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId, unique. Used with Email when SubscriptionId
            is blank and UserId is not provided
          format: string
          properties: {}
          type: string
        gatewayId:
          description: GatewayId, use user's gateway if not provide
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，custom data
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: Custom product name for payment gateway and invoice line display.
            Does not change InvoiceName
          format: string
          properties: {}
          type: string
        quantity:
          description: Quantity, quantity of the new payment which one-time addon
            purchased
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId, id of subscription which addon will attach
            to. If blank, UserId or ExternalUserId&Email is required
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: TaxPercentage，1000 = 10%, default user's taxPercentage if not
            specified
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: UserId. Required when SubscriptionId is blank unless ExternalUserId&Email
            is provided
          format: int64
          properties: {}
          type: integer
      required:
      - addonId
      - quantity
      type: object
    unibee.api.merchant.subscription.OnetimeAddonPreviewRes:
      properties:
        addon:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        applyPromoCredit:
          description: apply promo credit or not
          format: bool
          properties: {}
          type: boolean
        currency:
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          format: int64
          properties: {}
          type: integer
        discountMessage:
          format: string
          properties: {}
          type: string
        email:
          format: string
          properties: {}
          type: string
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        originAmount:
          format: int64
          properties: {}
          type: integer
        quantity:
          format: int64
          properties: {}
          type: integer
        taxAmount:
          format: int64
          properties: {}
          type: integer
        taxPercentage:
          format: int64
          properties: {}
          type: integer
        totalAmount:
          format: int64
          properties: {}
          type: integer
        userId:
          format: int64
          properties: {}
          type: integer
        vatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.OnetimeAddonPurchaseListReq:
      properties:
        addonIds:
          description: Filter AddonIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        periodEnd:
          description: PeriodEnd，addon effective period end，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        periodStart:
          description: PeriodStart，addon effective period start，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        status:
          description: Filter Status, Default All，1-Create｜2-Paid｜3-Cancel｜4-Expired
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        subscriptionIds:
          description: Filter SubscriptionIds, Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.merchant.subscription.OnetimeAddonPurchaseListRes:
      properties:
        subscriptionOnetimeAddons:
          description: SubscriptionOnetimeAddons
          format: '[]*detail.SubscriptionOnetimeAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionOnetimeAddonDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.subscription.PendingUpdateDetailReq:
      properties:
        subscriptionPendingUpdateId:
          description: SubscriptionPendingUpdateId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionPendingUpdateId
      type: object
    unibee.api.merchant.subscription.PendingUpdateDetailRes:
      properties:
        SubscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
      type: object
    unibee.api.merchant.subscription.PendingUpdateListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.merchant.subscription.PendingUpdateListRes:
      properties:
        subscriptionPendingUpdateDetails:
          description: Subscription Pending Update Details
          format: '[]*detail.SubscriptionPendingUpdateDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.PreviewSubscriptionNextInvoiceReq:
      properties:
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed if subscriptionId not specified
          format: string
          properties: {}
          type: string
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.PreviewSubscriptionNextInvoiceRes:
      properties:
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        subscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff:
      properties:
        countryCodeAfter:
          format: string
          properties: {}
          type: string
        countryCodeBefore:
          format: string
          properties: {}
          type: string
        currency:
          format: string
          properties: {}
          type: string
        periodEnd:
          format: int64
          properties: {}
          type: integer
        periodStart:
          format: int64
          properties: {}
          type: integer
        taxAmountAfter:
          format: int64
          properties: {}
          type: integer
        taxAmountBefore:
          format: int64
          properties: {}
          type: integer
        taxAmountDelta:
          format: int64
          properties: {}
          type: integer
        totalAmountAfter:
          format: int64
          properties: {}
          type: integer
        totalAmountBefore:
          format: int64
          properties: {}
          type: integer
        totalAmountDelta:
          format: int64
          properties: {}
          type: integer
        totalAmountExcludingTaxAfter:
          format: int64
          properties: {}
          type: integer
        totalAmountExcludingTaxBefore:
          format: int64
          properties: {}
          type: integer
        vatNumberAfter:
          format: string
          properties: {}
          type: string
        vatNumberBefore:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible:
      properties:
        eligible:
          description: Whether the invoice can be regenerated
          format: bool
          properties: {}
          type: boolean
        reason:
          description: Blocking reason when not eligible
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoicePreviewReq:
      properties:
        invoiceId:
          description: InvoiceId to regenerate, defaults to subscription latest invoice
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoicePreviewRes:
      properties:
        diff:
          $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff'
        eligibility:
          $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible'
        newInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        oldInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceReq:
      properties:
        invoiceId:
          description: InvoiceId to regenerate, defaults to subscription latest invoice
          format: string
          properties: {}
          type: string
        reason:
          description: Operation reason for audit log
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - reason
      type: object
    unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceRes:
      properties:
        diff:
          $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff'
        eligibility:
          $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible'
        newInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        oldInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
      type: object
    unibee.api.merchant.subscription.RenewPreviewReq:
      description: Preview renew invoice of an existing subscription.
      properties:
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit to this renewal
            invoice.
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply. If omitted
            and applyPromoCredit is true, the system auto-computes the usable amount.
          format: '*int64'
          properties: {}
          type: integer
        discount:
          $ref: '#/components/schemas/unibee.api.bean.ExternalDiscountParam'
        discountCode:
          description: Optional. Discount or coupon code applied only to this renewal.
            Overrides the subscription's recurring discount for this invoice.
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional. Payment gateway ID used for the renewal invoice.
            If omitted, the subscription's original gateway configuration is used.
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Optional. Payment type for the selected gateway, such as card,
            wallet, etc.
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Optional. Custom metadata map that will be stored on the renewal
            invoice and subscription timeline.
          format: map[string]interface {}
          properties: {}
          type: object
        productData:
          $ref: '#/components/schemas/unibee.api.bean.PlanProductParam'
        productId:
          description: Optional. Product ID used together with userId when subscriptionId
            is not specified, to narrow down which subscription to renew. If 0, the
            system uses its default product selection rules.
          format: int64
          properties: {}
          type: integer
        renewMode:
          description: 'Optional. Renewal period mode: next_period (default, start
            from the current period/trial end when renewing early) or reset_now (start
            a fresh cycle from now).'
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Optional. SubscriptionId to be renewed. Either subscriptionId
            or userId must be provided. When subscriptionId is omitted, the system
            first tries to find the latest active or incomplete subscription for the
            user (and productId if provided), otherwise falls back to the latest subscription.
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: Optional. External tax percentage override for the renewal
            invoice, in basis points (e.g. 1000 = 10%%). Overrides the subscription
            taxPercentage when provided.
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: Optional. UserId associated with the subscription to renew.
            Either subscriptionId or userId must be provided. Used to locate the target
            subscription when subscriptionId is not provided.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.RenewPreviewRes:
      properties:
        applyPromoCredit:
          description: Whether promo credit is effectively applied in this renew preview.
          format: bool
          properties: {}
          type: boolean
        currency:
          description: Currency used for the renew preview.
          format: string
          properties: {}
          type: string
        discountAmount:
          description: Total discount amount applied to the renew invoice, including
            promo credit if applicable.
          format: int64
          properties: {}
          type: integer
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        originAmount:
          description: Original invoice amount before discounts and promo credits
            for the renew, in minor units.
          format: int64
          properties: {}
          type: integer
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        taxAmount:
          description: Total tax amount applied to the renew invoice, in minor units.
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Final payable amount for the renew invoice, including tax and
            after discounts, in minor units.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.RenewReq:
      description: Manually renew an existing subscription by generating a new recurring
        invoice and payment.
      properties:
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit to this renewal
            invoice.
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply. If omitted
            and applyPromoCredit is true, the system auto-computes the usable amount.
          format: '*int64'
          properties: {}
          type: integer
        cancelUrl:
          description: Optional. URL to redirect the customer to when the renewal
            payment is cancelled or fails.
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.ExternalDiscountParam'
        discountCode:
          description: Optional. Discount or coupon code applied only to this renewal.
            Overrides the subscription's recurring discount for this invoice.
          format: string
          properties: {}
          type: string
        gatewayId:
          description: Optional. Payment gateway ID used for the renewal invoice.
            If omitted, the subscription's original gateway configuration is used.
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Optional. Payment type for the selected gateway, such as card,
            wallet, etc.
          format: string
          properties: {}
          type: string
        manualPayment:
          description: Optional. If true, do not create an automatic payment for the
            renewal invoice; the invoice will be created in open status for manual
            collection.
          format: bool
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Optional. Custom metadata map that will be stored on the renewal
            invoice and subscription timeline.
          format: map[string]interface {}
          properties: {}
          type: object
        paymentUIMode:
          description: 'Optional. Checkout UI mode: hosted | embedded | custom. Default
            is hosted.'
          format: string
          properties: {}
          type: string
        productData:
          $ref: '#/components/schemas/unibee.api.bean.PlanProductParam'
        productId:
          description: Optional. Product ID used together with userId when subscriptionId
            is not specified, to narrow down which subscription to renew. If 0, the
            system uses its default product selection rules.
          format: int64
          properties: {}
          type: integer
        renewMode:
          description: 'Optional. Renewal period mode: next_period (default, start
            from the current period/trial end when renewing early) or reset_now (start
            a fresh cycle from now).'
          format: string
          properties: {}
          type: string
        returnUrl:
          description: Optional. URL to redirect the customer to after successful
            renewal or payment completion.
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Optional. SubscriptionId to be renewed. Either subscriptionId
            or userId must be provided. When subscriptionId is omitted, the system
            first tries to find the latest active or incomplete subscription for the
            user (and productId if provided), otherwise falls back to the latest subscription.
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: Optional. External tax percentage override for the renewal
            invoice, in basis points (e.g. 1000 = 10%%). Overrides the subscription
            taxPercentage when provided.
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: Optional. UserId associated with the subscription to renew.
            Either subscriptionId or userId must be provided. Used to locate the target
            subscription when subscriptionId is not provided.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.RenewRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        invoiceId:
          description: ID of the renewal invoice generated by this request.
          format: string
          properties: {}
          type: string
        link:
          description: Hosted payment or invoice link. When paid=false, redirect the
            customer to this link to complete the renewal payment.
          format: string
          properties: {}
          type: string
        paid:
          description: Whether the renewal invoice has been successfully paid at the
            time of response.
          format: bool
          properties: {}
          type: boolean
        paymentId:
          description: ID of the payment created for the renewal invoice, if any.
          format: string
          properties: {}
          type: string
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
      type: object
    unibee.api.merchant.subscription.TimeLineListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        userId:
          description: 'Filter UserId, Default All '
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.TimeLineListRes:
      properties:
        subscriptionTimeLines:
          description: SubscriptionTimeLines
          format: '[]*detail.SubscriptionTimeLineDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionTimeLineDetail'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.UpdateMetadataReq:
      properties:
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: map[string]interface {}
          properties: {}
          type: object
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.subscription.UpdateMetadataRes:
      properties: {}
      type: object
    unibee.api.merchant.subscription.UpdatePreviewReq:
      properties:
        addonParams:
          description: Optional. Target addon configuration after the update.
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit to the update
            preview.
          format: '*bool'
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply in preview.
            If omitted and applyPromoCredit is true, the system auto-computes the
            usable amount.
          format: '*int64'
          properties: {}
          type: integer
        currency:
          description: Optional. Target currency for the updated subscription. If
            not provided, use current subscription currency. Currency change may be
            restricted when proration is required.
          format: '*string'
          properties: {}
          type: string
        discountCode:
          description: Optional. Discount code applied to the update preview.
          format: string
          properties: {}
          type: string
        effectImmediate:
          description: 'Optional. When to apply the plan change: 1 = immediate (current
            period, proration will be computed), 2 = at next period (no proration
            in current period).'
          format: int
          properties: {}
          type: integer
        gatewayId:
          description: Optional. Gateway ID for previewing payment routing. If not
            provided, the subscription's current gateway is used for preview.
          format: int64
          properties: {}
          type: integer
        newPlanId:
          description: Required. Target plan ID to switch the subscription to.
          format: int64
          properties: {}
          type: integer
        prorationDate:
          description: Optional. UTC timestamp at which proration should start when
            effectImmediate = 1. Defaults to current time if not provided.
          format: '*int64'
          properties: {}
          type: integer
        quantity:
          description: Optional. Target quantity for the subscription. If <= 0, it
            defaults to 1.
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: Required. SubscriptionId to be upgraded or downgraded.
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - newPlanId
      type: object
    unibee.api.merchant.subscription.UpdatePreviewRes:
      properties:
        applyPromoCredit:
          description: Whether promo credit is effectively applied in this update
            preview.
          format: bool
          properties: {}
          type: boolean
        currency:
          description: Currency used for the update preview.
          format: string
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
        discountAmount:
          description: Total discount amount applied to the update invoice, including
            promo credit if applicable.
          format: int64
          properties: {}
          type: integer
        discountMessage:
          description: Human-readable message describing discount application result
            for the update.
          format: string
          properties: {}
          type: string
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        nextPeriodInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        originAmount:
          description: Original invoice amount before discounts and promo credit for
            the update, in minor units.
          format: int64
          properties: {}
          type: integer
        prorationDate:
          description: Effective proration start time used in this preview, as UTC
            timestamp (seconds).
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Final payable amount for the update invoice, including tax
            and after discounts, in minor units.
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.UpdateReq:
      properties:
        addonParams:
          description: Optional. Target addon configuration after the update.
          format: '[]*bean.PlanAddonParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
          properties: {}
          type: array
        applyPromoCredit:
          description: Optional. Whether to apply available promo credit when creating
            the update invoice.
          format: bool
          properties: {}
          type: boolean
        applyPromoCreditAmount:
          description: Optional. Maximum promo credit amount to apply. If omitted
            and applyPromoCredit is true, the system auto-computes the usable amount.
          format: '*int64'
          properties: {}
          type: integer
        cancelUrl:
          description: Optional. URL to redirect the customer to when the customer
            cancels or the update payment fails.
          format: string
          properties: {}
          type: string
        confirmCurrency:
          description: Optional. When provided, represents the expected currency code
            for the update invoice and must match the value returned from update_preview,
            otherwise the request is rejected.
          format: string
          properties: {}
          type: string
        confirmTotalAmount:
          description: Optional. When provided, represents the expected total amount
            (in minor units) for the update invoice and must match the value returned
            from update_preview, otherwise the request is rejected.
          format: int64
          properties: {}
          type: integer
        currency:
          description: Optional. Target currency for the updated subscription. If
            not provided, use current subscription currency. Currency change is not
            allowed when a proration invoice is required.
          format: '*string'
          properties: {}
          type: string
        discount:
          $ref: '#/components/schemas/unibee.api.bean.ExternalDiscountParam'
        discountCode:
          description: Optional. Discount or coupon code applied to this update. Overrides
            the subscription's recurring discount for this invoice.
          format: string
          properties: {}
          type: string
        effectImmediate:
          description: 'Optional. Override for when to apply the plan change: 1 =
            immediate (current period, proration will be computed if needed), 2 =
            at next period (no proration in current period). If 0 or omitted, the
            system uses default rules (immediate for upgrades, merchant configuration
            for downgrades, and immediate for non-active subscriptions).'
          format: int
          properties: {}
          type: integer
        gatewayId:
          description: Optional. Gateway ID to be used for the invoice generated by
            this update. If omitted, the subscription's current gateway is used.
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Optional. Payment type for the selected gateway, such as card,
            wallet, etc.
          format: string
          properties: {}
          type: string
        manualPayment:
          description: Optional. Defaults to true. If true, do not create an automatic
            payment for the update invoice; the invoice will be created in open status
            for manual collection.
          format: '*bool'
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Optional. Custom metadata map that will be stored on the update
            invoice and subscription pending update record.
          format: map[string]interface {}
          properties: {}
          type: object
        newPlanId:
          description: Required. Target plan ID to switch the subscription to.
          format: int64
          properties: {}
          type: integer
        paymentUIMode:
          description: 'Optional. Checkout UI mode: hosted | embedded | custom. Default
            is hosted.'
          format: string
          properties: {}
          type: string
        productData:
          $ref: '#/components/schemas/unibee.api.bean.PlanProductParam'
        prorationDate:
          description: Optional. UTC timestamp at which proration should start when
            effectImmediate = 1. Defaults to current time if not provided.
          format: '*int64'
          properties: {}
          type: integer
        quantity:
          description: Required. Target quantity for the subscription after update.
          format: int64
          properties: {}
          type: integer
        returnUrl:
          description: Optional. URL to redirect the customer to after the update
            is completed or payment succeeds.
          format: string
          properties: {}
          type: string
        subscriptionId:
          description: Optional. SubscriptionId to be upgraded or downgraded. Either
            subscriptionId or userId must be provided. When userId is used instead
            of subscriptionId, the only active subscription of that user will be updated.
          format: string
          properties: {}
          type: string
        taxPercentage:
          description: Optional. External tax percentage override for the update invoice,
            in basis points (e.g. 1000 = 10%%). Overrides the subscription taxPercentage
            when provided.
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: Optional. UserId associated with the subscription to update.
            Either subscriptionId or userId must be provided. When subscriptionId
            is omitted, the system uses this userId to locate the active subscription.
          format: int64
          properties: {}
          type: integer
      required:
      - newPlanId
      - quantity
      type: object
    unibee.api.merchant.subscription.UpdateRes:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        invoiceId:
          description: ID of the invoice generated by this update (proration or next-period
            invoice, depending on effectImmediate).
          format: string
          properties: {}
          type: string
        link:
          description: Hosted payment or invoice link. When paid=false and an invoice
            exists, redirect the customer to this link to complete payment.
          format: string
          properties: {}
          type: string
        note:
          description: Additional message describing the update result, used for internal
            or merchant-facing explanations.
          format: string
          properties: {}
          type: string
        paid:
          description: Whether the update invoice has been successfully paid at the
            time of response.
          format: bool
          properties: {}
          type: boolean
        paymentId:
          description: ID of the payment created for the update invoice, if any.
          format: string
          properties: {}
          type: string
        subscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
      type: object
    unibee.api.merchant.subscription.UserPendingCryptoSubscriptionDetailReq:
      properties:
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.UserPendingCryptoSubscriptionDetailRes:
      properties:
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
      type: object
    unibee.api.merchant.subscription.UserSubscriptionDetailReq:
      properties:
        externalUserId:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
        productId:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.subscription.UserSubscriptionDetailRes:
      properties:
        addons:
          description: Plan Addon
          format: '[]*bean.PlanAddonDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
          properties: {}
          type: array
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        latestInvoice:
          $ref: '#/components/schemas/unibee.api.bean.Invoice'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
        unfinishedSubscriptionPendingUpdate:
          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.merchant.tag.DeleteReq:
      properties:
        tagId:
          format: int64
          properties: {}
          type: integer
      required:
      - tagId
      type: object
    unibee.api.merchant.tag.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.tag.DetailReq:
      properties:
        tagId:
          format: int64
          properties: {}
          type: integer
      required:
      - tagId
      type: object
    unibee.api.merchant.tag.DetailRes:
      properties:
        planIds:
          description: Current plan ids bound to this tag
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        tag:
          $ref: '#/components/schemas/unibee.api.bean.Tag'
      type: object
    unibee.api.merchant.tag.EditReq:
      properties:
        color:
          format: '*string'
          properties: {}
          type: string
        description:
          format: '*string'
          properties: {}
          type: string
        name:
          format: '*string'
          properties: {}
          type: string
        planIds:
          description: Plan ids bound to this tag. Omit = unchanged; [] = clear; non-empty
            = full replace.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        sortOrder:
          format: '*int'
          properties: {}
          type: integer
        tagId:
          format: int64
          properties: {}
          type: integer
      required:
      - tagId
      type: object
    unibee.api.merchant.tag.EditRes:
      properties:
        tag:
          $ref: '#/components/schemas/unibee.api.bean.Tag'
      type: object
    unibee.api.merchant.tag.ListReq:
      properties:
        count:
          description: Count per page, default 100
          format: int
          properties: {}
          type: integer
        page:
          description: Page, start 0
          format: int
          properties: {}
          type: integer
        scope:
          description: 0-plan
          format: int
          properties: {}
          type: integer
        searchKey:
          format: string
          properties: {}
          type: string
      required:
      - scope
      type: object
    unibee.api.merchant.tag.ListRes:
      properties:
        tags:
          format: '[]*bean.Tag'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Tag'
          properties: {}
          type: array
        total:
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.tag.NewReq:
      properties:
        color:
          description: Optional UI color
          format: string
          properties: {}
          type: string
        description:
          description: Description
          format: string
          properties: {}
          type: string
        name:
          description: Display name
          format: string
          properties: {}
          type: string
        planIds:
          description: Plan ids to bind to this tag after creation. Omit or [] = no
            bindings.
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        scope:
          description: 0-plan, 1-user, 2-discount_code; P1 only 0
          format: int
          properties: {}
          type: integer
        sortOrder:
          description: Sort order in list UI
          format: int
          properties: {}
          type: integer
      required:
      - scope
      - name
      type: object
    unibee.api.merchant.tag.NewRes:
      properties:
        tag:
          $ref: '#/components/schemas/unibee.api.bean.Tag'
      type: object
    unibee.api.merchant.track.SetupSegmentReq:
      properties:
        serverSideSecret:
          description: ServerSideSecret
          format: string
          properties: {}
          type: string
        userPortalSecret:
          description: UserPortalSecret
          format: string
          properties: {}
          type: string
      required:
      - serverSideSecret
      - userPortalSecret
      type: object
    unibee.api.merchant.track.SetupSegmentRes:
      properties: {}
      type: object
    unibee.api.merchant.user.AdminNoteListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        userId:
          description: The id of user, either ExternalUserId or UserId needed
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.merchant.user.AdminNoteListRes:
      properties:
        noteLists:
          format: '[]*detail.UserAdminNoteDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserAdminNoteDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.user.ChangeEmailReq:
      properties:
        externalUserId:
          description: The externalUserId of user, either ExternalUserId or UserId
            needed
          format: string
          properties: {}
          type: string
        newEmail:
          description: Target Email want to change
          format: string
          properties: {}
          type: string
        userId:
          description: The id of user, either ExternalUserId or UserId needed
          format: int64
          properties: {}
          type: integer
      required:
      - newEmail
      type: object
    unibee.api.merchant.user.ChangeEmailRes:
      properties: {}
      type: object
    unibee.api.merchant.user.ChangeGatewayReq:
      properties:
        gatewayId:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          description: GatewayPaymentType
          format: string
          properties: {}
          type: string
        gatewayUserId:
          description: GatewayUserId, verify and save GatewayUserId via gateway
          format: string
          properties: {}
          type: string
        paymentMethodId:
          description: PaymentMethodId of gateway, available for card type gateway,
            payment automatic will enable if set
          format: string
          properties: {}
          type: string
        userId:
          description: User Id
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - gatewayId
      type: object
    unibee.api.merchant.user.ChangeGatewayRes:
      properties: {}
      type: object
    unibee.api.merchant.user.ClearAutoChargeMethodReq:
      properties:
        userId:
          description: The id of user
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.merchant.user.ClearAutoChargeMethodRes:
      properties: {}
      type: object
    unibee.api.merchant.user.CountReq:
      properties:
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.user.CountRes:
      properties:
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.user.DeleteReq:
      properties:
        forceDelete:
          description: Force delete, if true, will cancel all active subscriptions
            before deleting the user
          format: bool
          properties: {}
          type: boolean
        userId:
          description: UserId
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.merchant.user.DeleteRes:
      properties: {}
      type: object
    unibee.api.merchant.user.FrozenReq:
      properties:
        userId:
          description: UserId
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
      type: object
    unibee.api.merchant.user.FrozenRes:
      properties: {}
      type: object
    unibee.api.merchant.user.GetReq:
      properties:
        userId:
          description: UserId
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
      type: object
    unibee.api.merchant.user.GetRes:
      properties:
        user:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
      type: object
    unibee.api.merchant.user.ListReq:
      properties:
        count:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        deleteInclude:
          description: Deleted Involved，Need Admin
          format: bool
          properties: {}
          type: boolean
        email:
          description: Search Filter Email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        firstName:
          description: Search FirstName
          format: string
          properties: {}
          type: string
        gatewayIds:
          description: GatewayIds, Search Filter GatewayIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        lastName:
          description: Search LastName
          format: string
          properties: {}
          type: string
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        planIds:
          description: PlanIds, Search Filter PlanIds
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        searchKey:
          description: Search FirstName|LastName|Email|Phone|Address|ExternalUserId
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort，user_id|gmt_create|email|user_name|subscription_name|subscription_status|payment_method|recurring_amount|billing_type，Default
            gmt_create
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: Status, 0-Active｜2-Frozen
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        subStatus:
          description: Filter, Default All，1-Pending｜2-Active｜3-Suspend | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        subscriptionId:
          description: Search Filter SubscriptionId
          format: string
          properties: {}
          type: string
        userId:
          description: Filter UserId
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.user.ListRes:
      properties:
        total:
          description: Total
          format: int
          properties: {}
          type: integer
        userAccounts:
          description: User Account Object List
          format: '[]*detail.UserAccountDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.user.NewAdminNoteReq:
      properties:
        note:
          description: Note
          format: string
          properties: {}
          type: string
        userId:
          description: The id of user, either ExternalUserId or UserId needed
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      - note
      type: object
    unibee.api.merchant.user.NewAdminNoteRes:
      properties: {}
      type: object
    unibee.api.merchant.user.NewReq:
      description: 'User Creation If Not Exist '
      properties:
        address:
          description: Address
          format: string
          properties: {}
          type: string
        email:
          description: Email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
        firstName:
          description: First Name
          format: string
          properties: {}
          type: string
        language:
          description: Language
          format: string
          properties: {}
          type: string
        lastName:
          description: Last Name
          format: string
          properties: {}
          type: string
        password:
          description: Password
          format: string
          properties: {}
          type: string
        phone:
          description: Phone
          format: string
          properties: {}
          type: string
      required:
      - email
      type: object
    unibee.api.merchant.user.NewRes:
      properties:
        user:
          $ref: '#/components/schemas/unibee.api.bean.UserAccount'
      type: object
    unibee.api.merchant.user.ReleaseReq:
      properties:
        userId:
          description: UserId
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
      type: object
    unibee.api.merchant.user.ReleaseRes:
      properties: {}
      type: object
    unibee.api.merchant.user.SearchReq:
      properties:
        searchKey:
          description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.user.SearchRes:
      properties:
        userAccounts:
          description: UserAccounts
          format: '[]*detail.UserAccountDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.user.UpdateExternalUserIdReq:
      properties:
        email:
          description: The email of user, either Email or UserId needed
          format: '*string'
          properties: {}
          type: string
        externalUserId:
          description: Target ExternalUserId
          format: string
          properties: {}
          type: string
        userId:
          description: The id of user, either Email or UserId needed
          format: '*int64'
          properties: {}
          type: integer
      required:
      - externalUserId
      type: object
    unibee.api.merchant.user.UpdateExternalUserIdRes:
      properties:
        user:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
      type: object
    unibee.api.merchant.user.UpdateReq:
      properties:
        LinkedIn:
          description: LinkedIn
          format: '*string'
          properties: {}
          type: string
        address:
          description: Billing Address
          format: '*string'
          properties: {}
          type: string
        city:
          description: city
          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
        email:
          description: The email of user, either Email or UserId needed
          format: '*string'
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: '*string'
          properties: {}
          type: string
        facebook:
          description: Facebook
          format: '*string'
          properties: {}
          type: string
        firstName:
          description: First name
          format: '*string'
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: '*string'
          properties: {}
          type: string
        language:
          description: User Language, en|ru|cn|vi|bp
          format: '*string'
          properties: {}
          type: string
        lastName:
          description: Last Name
          format: '*string'
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        otherSocialInfo:
          description: Other Social Info
          format: '*string'
          properties: {}
          type: string
        paymentMethodId:
          description: PaymentMethodId of gateway, available for card type gateway,
            payment automatic will enable if set
          format: '*string'
          properties: {}
          type: string
        phone:
          description: Phone
          format: '*string'
          properties: {}
          type: string
        registrationNumber:
          description: RegistrationNumber
          format: '*string'
          properties: {}
          type: string
        state:
          description: State
          format: string
          properties: {}
          type: string
        telegram:
          description: Telegram
          format: '*string'
          properties: {}
          type: string
        tiktok:
          description: Tiktok
          format: '*string'
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: The id of user, either Email or UserId needed
          format: '*int64'
          properties: {}
          type: integer
        vATNumber:
          description: VAT Number
          format: '*string'
          properties: {}
          type: string
        weChat:
          description: WeChat
          format: '*string'
          properties: {}
          type: string
        whatsApp:
          description: WhatsApp
          format: '*string'
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: '*string'
          properties: {}
          type: string
      type: object
    unibee.api.merchant.user.UpdateRes:
      properties:
        user:
          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
      type: object
    unibee.api.merchant.vat.CountryListReq:
      properties: {}
      type: object
    unibee.api.merchant.vat.CountryListRes:
      properties:
        vatCountryList:
          description: VatCountryList
          format: '[]*bean.VatCountryRate'
          items:
            $ref: '#/components/schemas/unibee.api.bean.VatCountryRate'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.vat.InitDefaultGatewayReq:
      properties: {}
      type: object
    unibee.api.merchant.vat.InitDefaultGatewayRes:
      properties: {}
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryActivateReq:
      properties:
        companyAddress:
          description: company_address
          format: string
          properties: {}
          type: string
        companyName:
          description: company_name
          format: string
          properties: {}
          type: string
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        historyId:
          description: History Id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryActivateRes:
      properties: {}
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryDeactivateReq:
      properties:
        historyId:
          description: History Id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryDeactivateRes:
      properties: {}
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryReq:
      properties:
        count:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
        countryCode:
          description: CountryCode
          format: string
          properties: {}
          type: string
        createTimeEnd:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        createTimeStart:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
        page:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
        searchKey:
          description: Search Key, vatNumber, validateGateway, company, company address,
            message
          format: string
          properties: {}
          type: string
        sortField:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
        sortType:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
        status:
          description: status, 0-Invalid，1-Valid
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
        validateGateway:
          description: Filter Validate Gateway, vatsense
          format: string
          properties: {}
          type: string
        vatNumber:
          description: Filter Vat Number
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.vat.NumberValidateHistoryRes:
      properties:
        numberValidateHistoryList:
          description: NumberValidateHistoryList
          format: '[]*bean.MerchantVatNumberVerifyHistory'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantVatNumberVerifyHistory'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.vat.NumberValidateReq:
      properties:
        vatNumber:
          description: VatNumber
          format: string
          properties: {}
          type: string
      required:
      - vatNumber
      type: object
    unibee.api.merchant.vat.NumberValidateRes:
      properties:
        vatNumberValidate:
          $ref: '#/components/schemas/unibee.api.bean.ValidResult'
      type: object
    unibee.api.merchant.vat.SetupGatewayReq:
      properties:
        IsDefault:
          description: IsDefault, default is true
          format: '*bool'
          properties: {}
          type: boolean
        data:
          description: Data
          format: string
          properties: {}
          type: string
        gatewayName:
          description: GatewayName, em. vatsense
          format: string
          properties: {}
          type: string
      required:
      - gatewayName
      - data
      type: object
    unibee.api.merchant.vat.SetupGatewayRes:
      properties:
        data:
          description: The hide star data
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.vat.SetupGlobalUSVATConfigReq:
      properties:
        global_us_vat_config:
          $ref: '#/components/schemas/unibee.api.bean.USVATGlobalConfig'
      type: object
    unibee.api.merchant.vat.SetupGlobalUSVATConfigRes:
      properties: {}
      type: object
    unibee.api.merchant.vat.SetupUSVATGatewayReq:
      properties:
        apiKeys:
          $ref: '#/components/schemas/unibee.api.bean.USVATGatewayConnectionAPIKeys'
        gatewayName:
          description: GatewayName, em. TaxJar
          format: string
          properties: {}
          type: string
        isDefault:
          description: IsDefault, default is true
          format: '*bool'
          properties: {}
          type: boolean
      required:
      - gatewayName
      type: object
    unibee.api.merchant.vat.SetupUSVATGatewayRes:
      properties: {}
      type: object
    unibee.api.merchant.vat.USVATCategoryListReq:
      properties: {}
      type: object
    unibee.api.merchant.vat.USVATCategoryListRes:
      properties:
        categoryList:
          description: CategoryList
          format: '[]*bean.USVATGatewayProductTaxCode'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USVATGatewayProductTaxCode'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.vat.USVATUploadHistoryListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        gatewayName:
          description: GatewayName, em. TaxJar
          format: string
          properties: {}
          type: string
        invoiceId:
          description: Invoice Id
          format: string
          properties: {}
          type: string
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
        uploadType:
          description: UploadType, PaymentUpload or RefundUpload, default both
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.merchant.vat.USVATUploadHistoryListRes:
      properties:
        historyList:
          description: HistoryList
          format: '[]*bean.MerchantUsVatGatewayCalculateHistory'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantUsVatGatewayCalculateHistory'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.vat.USVATValidateAddressReq:
      properties:
        address:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
      type: object
    unibee.api.merchant.vat.USVATValidateAddressRes:
      properties:
        addresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
      type: object
    unibee.api.merchant.webhook.DeleteEndpointReq:
      properties:
        endpointId:
          description: EndpointId
          format: int64
          properties: {}
          type: integer
      required:
      - endpointId
      type: object
    unibee.api.merchant.webhook.DeleteEndpointRes:
      properties: {}
      type: object
    unibee.api.merchant.webhook.EndpointListReq:
      properties: {}
      type: object
    unibee.api.merchant.webhook.EndpointListRes:
      properties:
        endpointList:
          description: EndpointList
          format: '[]*bean.MerchantWebhookEndpoint'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantWebhookEndpoint'
          properties: {}
          type: array
        zapierCredential:
          $ref: '#/components/schemas/unibee.api.bean.MerchantZapierCredential'
      type: object
    unibee.api.merchant.webhook.EndpointLogListReq:
      properties:
        count:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
        endpointId:
          description: EndpointId
          format: int64
          properties: {}
          type: integer
        page:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      required:
      - endpointId
      type: object
    unibee.api.merchant.webhook.EndpointLogListRes:
      properties:
        endpointLogList:
          description: EndpointLogList
          format: '[]*bean.MerchantWebhookLog'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MerchantWebhookLog'
          properties: {}
          type: array
        total:
          description: Total
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.merchant.webhook.EventListReq:
      properties: {}
      type: object
    unibee.api.merchant.webhook.EventListRes:
      properties:
        eventList:
          description: EventList
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.merchant.webhook.GetWebhookSecretReq:
      properties: {}
      type: object
    unibee.api.merchant.webhook.GetWebhookSecretRes:
      properties:
        secret:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.webhook.GetWebhookZapierConnectURLReq:
      properties:
        returnUrl:
          description: ReturnUrl When Webhook Zapier back
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.webhook.GetWebhookZapierConnectURLRes:
      properties:
        zapierConnectUrl:
          description: Zapier Connect Url
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.merchant.webhook.NewEndpointReq:
      properties:
        events:
          description: Events
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        productIds:
          description: Optional product ids filter, empty means all products, 0 means
            default product
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        url:
          description: Url
          format: string
          properties: {}
          type: string
      required:
      - url
      type: object
    unibee.api.merchant.webhook.NewEndpointRes:
      properties: {}
      type: object
    unibee.api.merchant.webhook.RemoveWebhookZapierConnectReq:
      properties: {}
      type: object
    unibee.api.merchant.webhook.RemoveWebhookZapierConnectRes:
      properties: {}
      type: object
    unibee.api.merchant.webhook.ResendWebhookReq:
      properties:
        logId:
          description: LogId
          format: int64
          properties: {}
          type: integer
      required:
      - logId
      type: object
    unibee.api.merchant.webhook.ResendWebhookRes:
      properties:
        sendResult:
          description: SendResult
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.merchant.webhook.UpdateEndpointReq:
      properties:
        endpointId:
          description: EndpointId
          format: int64
          properties: {}
          type: integer
        events:
          description: Events To Update
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        productIds:
          description: Optional product ids filter, nil means no change, empty means
            all products, 0 means default product
          format: '*[]int64'
          items:
            format: '[]int64'
            items:
              format: int64
              properties: {}
              type: integer
            properties: {}
            type: array
          properties: {}
          type: array
        url:
          description: Url To Update
          format: string
          properties: {}
          type: string
      required:
      - endpointId
      - url
      type: object
    unibee.api.merchant.webhook.UpdateEndpointRes:
      properties: {}
      type: object
    unibee.api.system.cronjob.ListBackfillTasksReq:
      properties: {}
      type: object
    unibee.api.system.cronjob.ListBackfillTasksRes:
      properties:
        allowedTasks:
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        batchSizeHint:
          format: string
          properties: {}
          type: string
        lockTaskName:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.cronjob.TriggerBackfillTaskReq:
      properties:
        taskName:
          description: 'Backfill task name: TaskBackfillInvoicePlanIds | TaskBackfillInvoicePaidTime
            | TaskBackfillRefundAdminMemberId'
          format: string
          properties: {}
          type: string
      required:
      - taskName
      type: object
    unibee.api.system.cronjob.TriggerBackfillTaskRes:
      properties:
        allowedTasks:
          description: All task names accepted by this endpoint
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        batchSizeHint:
          description: Approximate rows processed per invocation
          format: string
          properties: {}
          type: string
        lockTaskName:
          description: Redis lock scope shared with @hourly cron
          format: string
          properties: {}
          type: string
        message:
          description: Human-readable result
          format: string
          properties: {}
          type: string
        taskName:
          description: Task that was executed
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.information.GetReq:
      properties: {}
      type: object
    unibee.api.system.information.GetRes:
      properties:
        buildVersion:
          description: System Build Version
          format: string
          properties: {}
          type: string
        countryCodeToName:
          additionalProperties:
            format: string
            properties: {}
            type: string
          description: Country Code to Name mapping (ISO 3166-1 alpha-2)
          format: map[string]string
          properties: {}
          type: object
        env:
          description: 'System Env, em: daily|stage|local|prod'
          format: string
          properties: {}
          type: string
        gateway:
          description: Support Gateway List
          format: '[]*detail.Gateway'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
          properties: {}
          type: array
        isProd:
          description: Check System Env Is Prod, true|false
          format: bool
          properties: {}
          type: boolean
        mode:
          description: System Mode
          format: string
          properties: {}
          type: string
        oauth:
          $ref: '#/components/schemas/unibee.api.system.information.OAuthConfig'
        supportCountryCode:
          description: Support Country Code List (ISO 3166-1 alpha-2)
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        supportCurrency:
          description: Support Currency List
          format: '[]*bean.Currency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Currency'
          properties: {}
          type: array
        supportLanguage:
          description: Support Language List
          format: '[]*information.Language'
          items:
            $ref: '#/components/schemas/unibee.api.system.information.Language'
          properties: {}
          type: array
        supportTimeZone:
          description: Support TimeZone List
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        usStateCodeToName:
          additionalProperties:
            format: string
            properties: {}
            type: string
          description: US State Code to Name mapping (USPS 2-letter codes)
          format: map[string]string
          properties: {}
          type: object
      type: object
    unibee.api.system.information.Language:
      properties:
        code:
          description: Language code (e.g., en, ru, vi, cn, pt)
          format: string
          properties: {}
          type: string
        fullName:
          description: Language full name (e.g., English, Russian, Vietnamese, Chinese,
            Portuguese)
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.information.OAuthConfig:
      properties:
        githubClientId:
          description: GitHub OAuth client ID
          format: string
          properties: {}
          type: string
        googleClientId:
          description: Google OAuth client ID
          format: string
          properties: {}
          type: string
        tokenSecret:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.information.SendMockMQReq:
      properties:
        message:
          description: Send Mock MQ Message
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.information.SendMockMQRes:
      properties: {}
      type: object
    unibee.api.system.invoice.BatchSendInvoiceWebhookEventReq:
      properties:
        invoiceIds:
          description: InvoiceIds
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      required:
      - invoiceIds
      type: object
    unibee.api.system.invoice.BatchSendInvoiceWebhookEventRes:
      properties: {}
      type: object
    unibee.api.system.invoice.BulkChannelSyncReq:
      properties:
        merchantId:
          description: merchantId
          format: string
          properties: {}
          type: string
      required:
      - merchantId
      type: object
    unibee.api.system.invoice.BulkChannelSyncRes:
      properties: {}
      type: object
    unibee.api.system.invoice.ChannelSyncReq:
      properties:
        invoiceId:
          description: invoiceId
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchantId
          format: string
          properties: {}
          type: string
      required:
      - merchantId
      - invoiceId
      type: object
    unibee.api.system.invoice.ChannelSyncRes:
      properties: {}
      type: object
    unibee.api.system.invoice.CreateNextSplitPaymentReq:
      description: Manually create next split payment for an invoice (for testing,
        specify invoiceId and amount)
      properties:
        amount:
          description: The amount for this split payment (in cents)
          format: int64
          properties: {}
          type: integer
        gatewayId:
          description: The gateway id for this split payment (optional, defaults to
            invoice gateway)
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          description: The gateway payment type (optional, required if gateway has
            multiple payment types)
          format: string
          properties: {}
          type: string
        invoiceId:
          description: The invoice id for split payment
          format: string
          properties: {}
          type: string
        st:
          description: security token
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - st
      - amount
      type: object
    unibee.api.system.invoice.CreateNextSplitPaymentRes:
      properties:
        link:
          description: The payment link
          format: string
          properties: {}
          type: string
        paymentId:
          description: The payment id created
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.invoice.CreatePaymentReq:
      description: Create new payment for invoice (from InvoiceChangeMethod page);
        when switching gateway, pass gatewayId and gatewayPaymentType
      properties:
        gatewayId:
          description: The gateway id (optional when not switching gateway)
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          description: The gateway payment type (optional, required when gateway has
            multiple payment types)
          format: string
          properties: {}
          type: string
        invoiceId:
          description: The invoice id
          format: string
          properties: {}
          type: string
        st:
          description: security token
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - st
      type: object
    unibee.api.system.invoice.CreatePaymentRes:
      properties:
        link:
          description: The payment link or hosted UI link (when amount limit, redirect
            to split payment)
          format: string
          properties: {}
          type: string
        paymentId:
          description: The payment id created (when success)
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.invoice.DetailReq:
      description: Get detail of invoice by link (invoiceId and st)
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        st:
          description: security token
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - st
      type: object
    unibee.api.system.invoice.DetailRes:
      properties:
        cancelUrl:
          format: string
          properties: {}
          type: string
        creditNotes:
          description: CreditNotes Object List Link To Invoice
          format: '[]*detail.InvoiceDetail'
          items:
            $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
          properties: {}
          type: array
        invoice:
          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
        language:
          description: User language preference for display
          format: string
          properties: {}
          type: string
        returnUrl:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.invoice.GetSplitPaymentsReq:
      description: Get all split payments for an invoice with payment statistics
      properties:
        invoiceId:
          description: The invoice id
          format: string
          properties: {}
          type: string
        st:
          description: security token
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - st
      type: object
    unibee.api.system.invoice.GetSplitPaymentsRes:
      properties:
        paidAmount:
          description: Total paid amount from successful split payments in cents
          format: int64
          properties: {}
          type: integer
        payments:
          description: List of split payments
          format: '[]*bean.SplitPaymentInfo'
          items:
            $ref: '#/components/schemas/unibee.api.bean.SplitPaymentInfo'
          properties: {}
          type: array
        remainingAmount:
          description: Remaining amount to be paid in cents
          format: int64
          properties: {}
          type: integer
        totalAmount:
          description: Total invoice amount in cents
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.system.invoice.InternalWebhookSyncReq:
      description: Giving startId or startTime which data from, and endId or endTime
        which data to, unibee-api will create thread to sync data paging by count
        100 to the giving end
      properties:
        endId:
          description: The end Id of invoice to sync data
          format: '*string'
          properties: {}
          type: string
        endTime:
          description: The end time to sync data, ignore if EndId provided
          format: '*int64'
          properties: {}
          type: integer
        isSynchronous:
          description: Synchronous or not, default false
          format: bool
          properties: {}
          type: boolean
        startId:
          description: The start Id of invoice to sync data
          format: '*string'
          properties: {}
          type: string
        startTime:
          description: The start time to sync data, ignore if StartId provided
          format: '*int64'
          properties: {}
          type: integer
      type: object
    unibee.api.system.invoice.InternalWebhookSyncRes:
      properties:
        firstId:
          description: The first invoiceId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        lastId:
          description: The last invoiceId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        total:
          description: The total of sync, only output when isSynchronous=true
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.system.invoice.MerchantInfoReq:
      description: Get the seller billing info (address/VAT) for an invoice's merchant,
        gated by invoiceId and st. Branding fields (name/logo) come from the invoice
        detail merchant object.
      properties:
        invoiceId:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
        st:
          description: security token
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      - st
      type: object
    unibee.api.system.invoice.MerchantInfoRes:
      properties:
        address:
          description: Merchant legal/billing address
          format: string
          properties: {}
          type: string
        companyVatNumber:
          description: Merchant VAT number
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.invoice.QuickbooksSyncReq:
      properties:
        invoiceId:
          description: invoiceId
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.system.invoice.QuickbooksSyncRes:
      properties: {}
      type: object
    unibee.api.system.invoice.ReconcileDuplicateAutomaticPaymentReq:
      properties:
        duplicatePaymentId:
          description: The successful automatic payment to move onto a new reconciliation
            invoice
          format: string
          properties: {}
          type: string
        originalInvoiceId:
          description: The paid invoice that currently contains both the normal payment
            and duplicate automatic payment
          format: string
          properties: {}
          type: string
        sendWebhook:
          description: Whether to enqueue invoice.created and invoice.paid webhooks,
            default true. Set false for one-time addon reconciliation to avoid granting
            entitlements again
          format: '*bool'
          properties: {}
          type: boolean
      required:
      - originalInvoiceId
      - duplicatePaymentId
      type: object
    unibee.api.system.invoice.ReconcileDuplicateAutomaticPaymentRes:
      properties:
        alreadyReconciled:
          description: Whether the payment had already been reconciled by an earlier
            call
          format: bool
          properties: {}
          type: boolean
        invoiceId:
          description: The reconciliation invoice id
          format: string
          properties: {}
          type: string
        paymentId:
          description: The duplicate payment id
          format: string
          properties: {}
          type: string
        webhooksSent:
          description: Whether invoice.created and invoice.paid were enqueued by this
            call
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.system.mcpdoc.EndpointItem:
      properties:
        method:
          description: HTTP Method
          format: string
          properties: {}
          type: string
        operationId:
          description: OpenAPI Operation ID
          format: string
          properties: {}
          type: string
        path:
          description: Endpoint Path
          format: string
          properties: {}
          type: string
        summary:
          description: OpenAPI Summary
          format: string
          properties: {}
          type: string
        tags:
          description: OpenAPI Tags
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.system.mcpdoc.EndpointReq:
      properties:
        method:
          description: HTTP method
          format: string
          properties: {}
          type: string
        path:
          description: Endpoint path
          format: string
          properties: {}
          type: string
      required:
      - path
      - method
      type: object
    unibee.api.system.mcpdoc.EndpointRes:
      properties:
        description:
          description: Description
          format: string
          properties: {}
          type: string
        error:
          description: Error Message
          format: string
          properties: {}
          type: string
        found:
          description: Endpoint Found Or Not
          format: bool
          properties: {}
          type: boolean
        method:
          description: HTTP Method
          format: string
          properties: {}
          type: string
        parameters:
          $ref: '#/components/schemas/interface'
        path:
          description: Endpoint Path
          format: string
          properties: {}
          type: string
        requestBody:
          $ref: '#/components/schemas/interface'
        responses:
          $ref: '#/components/schemas/interface'
        security:
          $ref: '#/components/schemas/interface'
        specUrl:
          description: OpenAPI Spec URL
          format: string
          properties: {}
          type: string
        summary:
          description: Summary
          format: string
          properties: {}
          type: string
        tags:
          description: Tags
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.system.mcpdoc.ExampleCurlReq:
      properties:
        authToken:
          description: Optional Bearer token for curl generation
          format: string
          properties: {}
          type: string
        method:
          description: HTTP method
          format: string
          properties: {}
          type: string
        path:
          description: Endpoint path
          format: string
          properties: {}
          type: string
      required:
      - path
      - method
      type: object
    unibee.api.system.mcpdoc.ExampleCurlRes:
      properties:
        curl:
          description: Generated curl command
          format: string
          properties: {}
          type: string
        error:
          description: Error Message
          format: string
          properties: {}
          type: string
        found:
          description: Endpoint Found Or Not
          format: bool
          properties: {}
          type: boolean
        note:
          description: Generated curl is for documentation and debugging only
          format: string
          properties: {}
          type: string
        specUrl:
          description: OpenAPI Spec URL
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.mcpdoc.PlaybookReq:
      properties:
        scenario:
          description: 'Scenario: merchant_subscription|checkout_payment|system_refund'
          format: string
          properties: {}
          type: string
      required:
      - scenario
      type: object
    unibee.api.system.mcpdoc.PlaybookRes:
      properties:
        scenario:
          description: Scenario Name
          format: string
          properties: {}
          type: string
        specUrl:
          description: OpenAPI Spec URL
          format: string
          properties: {}
          type: string
        steps:
          description: Integration Steps
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    unibee.api.system.mcpdoc.SearchReq:
      properties:
        limit:
          description: Result limit, default 20, max 100
          format: int
          properties: {}
          type: integer
        pathPrefix:
          description: Filter by path prefix
          format: string
          properties: {}
          type: string
        query:
          description: Keyword for path/summary/description
          format: string
          properties: {}
          type: string
        tag:
          description: Filter by exact tag
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.mcpdoc.SearchRes:
      properties:
        items:
          description: Matched Endpoints
          format: '[]*mcpdoc.EndpointItem'
          items:
            $ref: '#/components/schemas/unibee.api.system.mcpdoc.EndpointItem'
          properties: {}
          type: array
        specUrl:
          description: OpenAPI Spec URL
          format: string
          properties: {}
          type: string
        total:
          description: Matched Item Count
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.system.mcpdoc.SourceReq:
      properties: {}
      type: object
    unibee.api.system.mcpdoc.SourceRes:
      properties:
        cacheTtlSeconds:
          description: Spec Cache TTL In Seconds
          format: int64
          properties: {}
          type: integer
        executionBoundary:
          description: Execution Boundary
          format: string
          properties: {}
          type: string
        notes:
          description: Service Notes
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        servicePurpose:
          description: Service Purpose
          format: string
          properties: {}
          type: string
        source:
          description: Source Name
          format: string
          properties: {}
          type: string
        specUrl:
          description: OpenAPI Spec URL
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.payment.DetailReq:
      properties:
        paymentId:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.system.payment.DetailRes:
      properties:
        cancelUrl:
          format: string
          properties: {}
          type: string
        invoiceHostedLink:
          description: Hosted invoice page URL without automatic payment creation
          format: string
          properties: {}
          type: string
        language:
          description: Display language
          format: string
          properties: {}
          type: string
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.PublicMerchant'
        payment:
          $ref: '#/components/schemas/unibee.api.bean.Payment'
        paymentStatus:
          description: Payment Status，10-pending，20-success，30-failure, 40-cancel
          format: int
          properties: {}
          type: integer
        returnUrl:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.payment.GetPaymentExchangeRateReq:
      properties:
        fromCurrency:
          description: From Currency
          format: string
          properties: {}
          type: string
        toCurrency:
          description: To Currency
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.payment.GetPaymentExchangeRateRes:
      properties:
        exchangeRate:
          format: float64
          properties: {}
          type: number
      type: object
    unibee.api.system.payment.PaymentCallbackAgainReq:
      properties:
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.system.payment.PaymentCallbackAgainRes:
      properties: {}
      type: object
    unibee.api.system.payment.PaymentGatewayCheckReq:
      properties:
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.system.payment.PaymentGatewayCheckRes:
      properties: {}
      type: object
    unibee.api.system.payment.PaymentGatewayDetailReq:
      properties:
        paymentId:
          description: PaymentId
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.system.payment.PaymentGatewayDetailRes:
      properties:
        paymentDetail:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
      type: object
    unibee.api.system.payment.StripeSmartRetryDetailReq:
      properties:
        invoiceId:
          description: UniBee invoice ID; queries all related payments when paymentId
            is empty
          format: string
          properties: {}
          type: string
        paymentId:
          description: Optional UniBee payment ID; limits the query to one payment
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.payment.StripeSmartRetryDetailRes:
      properties:
        smartRetryDetail:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
      type: object
    unibee.api.system.payment.StripeSmartRetryStopReq:
      properties:
        paymentId:
          description: UniBee payment ID
          format: string
          properties: {}
          type: string
      required:
      - paymentId
      type: object
    unibee.api.system.payment.StripeSmartRetryStopRes:
      properties:
        smartRetryStop:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
      type: object
    unibee.api.system.plan.DetailReq:
      properties:
        currency:
          description: Optional. When set and supported by merchant multi-currency
            config, plan amount, currency, and multi-trial prices are returned in
            this currency; otherwise default behavior
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
      required:
      - planId
      type: object
    unibee.api.system.plan.DetailRes:
      properties:
        merchant:
          $ref: '#/components/schemas/unibee.api.bean.PublicMerchant'
        plan:
          $ref: '#/components/schemas/unibee.api.bean.detail.PublicPlanDetail'
      type: object
    unibee.api.system.refund.BulkChannelSyncReq:
      properties:
        merchantId:
          description: merchantId
          format: string
          properties: {}
          type: string
      required:
      - merchantId
      type: object
    unibee.api.system.refund.BulkChannelSyncRes:
      properties: {}
      type: object
    unibee.api.system.refund.GatewayDetailReq:
      properties:
        refundId:
          format: string
          properties: {}
          type: string
      required:
      - refundId
      type: object
    unibee.api.system.refund.GatewayDetailRes:
      properties:
        refundDetail:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
      type: object
    unibee.api.system.subscription.BatchSendSubActivateWebhookEventReq:
      properties:
        subIds:
          description: SubIds
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      required:
      - subIds
      type: object
    unibee.api.system.subscription.BatchSendSubActivateWebhookEventRes:
      properties: {}
      type: object
    unibee.api.system.subscription.BatchSendSubUpdateWebhookEventReq:
      properties:
        subIds:
          description: SubIds
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      required:
      - subIds
      type: object
    unibee.api.system.subscription.BatchSendSubUpdateWebhookEventRes:
      properties: {}
      type: object
    unibee.api.system.subscription.ClearSubscriptionBlacklistReq:
      properties:
        password:
          description: Admin password for blacklist management operations
          format: string
          properties: {}
          type: string
        remoteIP:
          description: The IP address to clear from blacklist (clears both Preview
            and Create endpoints, including rate limit counters)
          format: string
          properties: {}
          type: string
      required:
      - remoteIP
      - password
      type: object
    unibee.api.system.subscription.ClearSubscriptionBlacklistRes:
      properties:
        message:
          description: Operation result message
          format: string
          properties: {}
          type: string
        success:
          description: Whether the operation was successful
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.system.subscription.InternalWebhookSyncReq:
      description: Giving startId or startTime which data from, and endId or endTime
        which data to, unibee-api will create thread to sync data paging by count
        100 to the giving end
      properties:
        endId:
          description: The end auto-increase Id of Subscription to sync data
          format: '*string'
          properties: {}
          type: string
        endTime:
          description: The end time to sync data, ignore if EndId provided
          format: '*int64'
          properties: {}
          type: integer
        isSynchronous:
          description: Synchronous or not, default false
          format: bool
          properties: {}
          type: boolean
        startId:
          description: The start auto-increase Id of Subscription to sync data
          format: '*string'
          properties: {}
          type: string
        startTime:
          description: The start time to sync data, ignore if StartId provided
          format: '*int64'
          properties: {}
          type: integer
      type: object
    unibee.api.system.subscription.InternalWebhookSyncRes:
      properties:
        firstId:
          description: The first subscriptionId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        lastId:
          description: The last subscriptionId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        total:
          description: The total of sync, only output when isSynchronous=true
          format: int
          properties: {}
          type: integer
      type: object
    unibee.api.system.subscription.ManualTriggerPendingUpdatePaymentSuccessReq:
      description: Manually trigger HandlePendingUpdatePaymentSuccess for a paid invoice
        that has not been processed, to handle cases where scheduled tasks missed
        processing downgrades
      properties:
        invoiceId:
          description: Invoice Id
          format: string
          properties: {}
          type: string
      required:
      - invoiceId
      type: object
    unibee.api.system.subscription.ManualTriggerPendingUpdatePaymentSuccessRes:
      properties:
        message:
          description: Operation result message
          format: string
          properties: {}
          type: string
        success:
          description: Whether the operation was successful
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.system.subscription.PayCheckReq:
      description: Public endpoint for hosted checkout page to poll subscription payment
        status after gateway redirect. Returns only minimal fields (no user/PII).
        SubscriptionId is high-entropy and used as a capability token.
      properties:
        subscriptionId:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      type: object
    unibee.api.system.subscription.PayCheckRes:
      properties:
        latestInvoiceId:
          description: Latest invoice id of the subscription
          format: string
          properties: {}
          type: string
        payStatus:
          description: Pay Status，1-Pending，2-Active(Paid)，3-PendingInActive，4-Cancel,
            5-Expired, 6-Suspended, 8-Processing, 9-Failed
          format: consts.SubscriptionStatusEnum
          properties: {}
          type: integer
      type: object
    unibee.api.system.subscription.QuerySubscriptionBlacklistReq:
      properties:
        password:
          description: Admin password for blacklist management operations
          format: string
          properties: {}
          type: string
        remoteIP:
          description: The IP address to query blacklist status
          format: string
          properties: {}
          type: string
      required:
      - remoteIP
      - password
      type: object
    unibee.api.system.subscription.QuerySubscriptionBlacklistRes:
      properties:
        createStatus:
          $ref: '#/components/schemas/unibee.api.system.subscription.SubscriptionEndpointBlacklistStatus'
        isPrivateIP:
          description: Whether the IP is a private/internal IP (not subject to rate
            limiting)
          format: bool
          properties: {}
          type: boolean
        previewStatus:
          $ref: '#/components/schemas/unibee.api.system.subscription.SubscriptionEndpointBlacklistStatus'
        remoteIP:
          description: The queried IP address
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.system.subscription.SendUserSubUpdateWebhookEventReq:
      description: Single userId; resolve latest subscription like merchant user_subscription_detail
        (productId optional), then send webhooks same as batch_sent_sub_update_webhook_event.
      properties:
        productId:
          description: Product id for plan scope; default product when omitted or
            0, same as merchant user_subscription_detail
          format: int64
          properties: {}
          type: integer
        userId:
          description: User id
          format: int64
          properties: {}
          type: integer
      required:
      - userId
      type: object
    unibee.api.system.subscription.SendUserSubUpdateWebhookEventRes:
      properties:
        subscription:
          $ref: '#/components/schemas/unibee.api.bean.Subscription'
      type: object
    unibee.api.system.subscription.SubscriptionEndpointBlacklistStatus:
      properties:
        currentLevel:
          description: 'Current punishment level: 0=No restriction, 1=Temporary rate
            limit (5min), 2=Short-term blacklist (1h), 3=Long-term blacklist (24h)'
          format: int
          properties: {}
          type: integer
        endpoint:
          description: Endpoint name (Preview or Create)
          format: string
          properties: {}
          type: string
        levelDescription:
          description: Description of current level
          format: string
          properties: {}
          type: string
        nextLevelWarning:
          description: Warning about what happens if violated again
          format: string
          properties: {}
          type: string
        punishmentExpiry:
          description: Unix timestamp when current punishment expires (0 if no punishment)
          format: int64
          properties: {}
          type: integer
        rateLimitCount:
          description: Current rate limit counter (requests in current 1-minute window)
          format: int
          properties: {}
          type: integer
        rateLimitMax:
          description: Maximum allowed requests per minute for this endpoint
          format: int
          properties: {}
          type: integer
        remainingRequests:
          description: Remaining requests available in current window (0 if blacklisted)
          format: int
          properties: {}
          type: integer
        violationCount:
          description: Number of violations in the past 5 minutes
          format: int
          properties: {}
          type: integer
        violationExpiry:
          description: Unix timestamp when violation count resets (0 if no violations)
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.system.subscription.TestClockWalkReq:
      properties:
        newTestClock:
          description: NewTestClock
          format: int64
          properties: {}
          type: integer
        subscriptionId:
          description: Subscription Id
          format: string
          properties: {}
          type: string
      required:
      - subscriptionId
      - newTestClock
      type: object
    unibee.api.system.subscription.TestClockWalkRes:
      properties: {}
      type: object
    unibee.api.system.user.InternalWebhookSyncReq:
      description: Giving startId or startTime which data from, and endId or endTime
        which data to, unibee-api will create thread to sync data paging by count
        100 to the giving end
      properties:
        endId:
          description: The end Id of User to sync data
          format: '*string'
          properties: {}
          type: string
        endTime:
          description: The end time to sync data, ignore if EndId provided
          format: '*int64'
          properties: {}
          type: integer
        isSynchronous:
          description: Synchronous or not, default false
          format: bool
          properties: {}
          type: boolean
        startId:
          description: The start Id of User to sync data
          format: '*string'
          properties: {}
          type: string
        startTime:
          description: The start time to sync data, ignore if StartId provided
          format: '*int64'
          properties: {}
          type: integer
      type: object
    unibee.api.system.user.InternalWebhookSyncRes:
      properties:
        firstId:
          description: The first userId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        lastId:
          description: The last userId of sync data, only output when isSynchronous=true
          format: string
          properties: {}
          type: string
        total:
          description: The total of sync, only output when isSynchronous=true
          format: int
          properties: {}
          type: integer
      type: object
    unibee.internal.interface.GatewayPaymentType:
      properties:
        autoCharge:
          format: bool
          properties: {}
          type: boolean
        category:
          format: string
          properties: {}
          type: string
        countryName:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
        supportCurrencies:
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
    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.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.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
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http
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
openapi: 3.0.0
paths:
  /merchant/amount_multi_currencies_exchange:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.AmountMultiCurrenciesExchangeReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      multiCurrencyConfigs:
                        description: Merchant's MultiCurrencies
                        format: '[]*bean.PlanMultiCurrency'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrency'
                        properties: {}
                        type: array
                    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: ""
      summary: Amount Multi Currencies Exchange
      tags:
      - Merchant
  /merchant/auth/session_login:
    post:
      description: Session login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.SessionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      return_url:
                        description: Return URL
                        format: string
                        properties: {}
                        type: string
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Session Login
      tags:
      - Member Authentication
  /merchant/auth/sso/clear_totp:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.ClearTotpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Member Clear Member 2FA Key With ResumeCode
      tags:
      - Member Authentication
  /merchant/auth/sso/login:
    post:
      description: Merchant Password login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.LoginReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Merchant Password Login
      tags:
      - Member Authentication
  /merchant/auth/sso/loginOTP:
    post:
      description: Send email to member with OTP code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.LoginOtpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: OTP Login
      tags:
      - Member Authentication
  /merchant/auth/sso/loginOTPVerify:
    post:
      description: OTP login for member, verify OTP code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.LoginOtpVerifyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: OTP Login Code Verification
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/github:
    get:
      description: Merchant Oauth Github
      parameters:
      - description: Github Code
        in: query
        name: githubCode
        schema:
          description: Github Code
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      sign:
                        description: Sign
                        format: string
                        properties: {}
                        type: string
                      userInfo:
                        $ref: '#/components/schemas/unibee.api.merchant.auth.GitHubUserInfo'
                    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: ""
      summary: Get Oauth Github
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/google:
    get:
      description: Merchant Oauth Google
      parameters:
      - description: Google Code
        in: query
        name: googleCode
        schema:
          description: Google Code
          format: string
          properties: {}
          type: string
      - description: The Google Redirect Uri
        in: query
        name: redirectUri
        schema:
          description: The Google Redirect Uri
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      sign:
                        description: Sign
                        format: string
                        properties: {}
                        type: string
                      userInfo:
                        $ref: '#/components/schemas/unibee.api.merchant.auth.GoogleUserInfo'
                    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: ""
      summary: Get Oauth Google
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/login:
    post:
      description: 'OAuth login. Pass OAuth token in request header (Auth.js JWT).
        Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.LoginOAuthReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: OAuth Login
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/members:
    get:
      description: 'Merchant Get Oauth Connected Members. Pass OAuth token in request
        header (Auth.js JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMembers:
                        description: Merchant Member Object List
                        format: '[]*detail.MerchantMemberDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Oauth Members
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/register:
    post:
      description: 'Merchant OAuth Register. Pass OAuth token in request header (Auth.js
        JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.RegisterOAuthReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Register OAuth
      tags:
      - Member Authentication
  /merchant/auth/sso/oauth/setup:
    post:
      description: 'Member OAuth Setup. Pass OAuth token in request header (Auth.js
        JWT). Headers: X-Auth-JS-Token | X-Auth-Token | X-OAuth-Token'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.SetupOAuthReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: OAuth Setup
      tags:
      - Member Authentication
  /merchant/auth/sso/passwordForgetOTP:
    post:
      description: Send email to member with OTP code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.PasswordForgetOtpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: OTP Password Forget
      tags:
      - Member Authentication
  /merchant/auth/sso/passwordForgetOTPVerify:
    post:
      description: Password forget OTP process, verify OTP code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.PasswordForgetOtpVerifyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: OTP Password Forget Code Verification
      tags:
      - Member Authentication
  /merchant/auth/sso/passwordForgetTotpVerify:
    post:
      description: Password forget 2FA process, verify 2FA code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.PasswordForgetTotpVerifyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: 2FA Password Forget Code Verification
      tags:
      - Member Authentication
  /merchant/auth/sso/passwordSetup:
    post:
      description: Member Password Setup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.PasswordSetupOtpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Password Setup
      tags:
      - Member Authentication
  /merchant/auth/sso/register:
    post:
      description: Register with owner permission, send email with OTP code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.RegisterReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Register
      tags:
      - Member Authentication
  /merchant/auth/sso/register_email_check:
    post:
      description: Check Register Email
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.RegisterEmailCheckReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      valid:
                        description: Valid
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Register Email Check
      tags:
      - Member Authentication
  /merchant/auth/sso/register_without_verification:
    post:
      description: Register with owner permission without code verification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.RegisterWithoutVerificationReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: RegisterWithoutCode
      tags:
      - Member Authentication
  /merchant/auth/sso/registerVerify:
    post:
      description: 'Merchant Register, verify OTP code '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.auth.RegisterVerifyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      token:
                        description: Access token of admin portal
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Register Verify
      tags:
      - Member Authentication
  /merchant/checkout/archive:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.ArchiveReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Archive Merchant Checkout
      tags:
      - Checkout Setup
  /merchant/checkout/detail:
    get:
      parameters:
      - description: checkout id
        in: query
        name: checkoutId
        required: true
        schema:
          description: checkout id
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckout:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                    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: ""
      summary: Get Merchant Checkout Detail
      tags:
      - Checkout Setup
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckout:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                    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: ""
      summary: Get Merchant Checkout Detail
      tags:
      - Checkout Setup
  /merchant/checkout/edit_checkout:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckout:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                    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: ""
      summary: Edit Merchant Checkout
      tags:
      - Checkout Setup
  /merchant/checkout/get_link:
    get:
      parameters:
      - description: checkout id
        in: query
        name: checkoutId
        required: true
        schema:
          description: checkout id
          format: int64
          properties: {}
          type: integer
      - in: query
        name: planId
        required: true
        schema:
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      link:
                        description: Merchant Checkout Link
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Merchant Checkout Link
      tags:
      - Checkout Setup
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.GetLinkReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      link:
                        description: Merchant Checkout Link
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Merchant Checkout Link
      tags:
      - Checkout Setup
  /merchant/checkout/list:
    get:
      parameters:
      - description: Search checkout id|name|description
        in: query
        name: SearchKey
        schema:
          description: Search checkout id|name|description
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckouts:
                        description: MerchantCheckout List Object
                        format: '[]*bean.MerchantCheckout'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Merchant Checkout list
      tags:
      - Checkout Setup
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckouts:
                        description: MerchantCheckout List Object
                        format: '[]*bean.MerchantCheckout'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Merchant Checkout list
      tags:
      - Checkout Setup
  /merchant/checkout/new_checkout:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.checkout.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantCheckout:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantCheckout'
                    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: ""
      summary: New Merchant Checkout
      tags:
      - Checkout Setup
  /merchant/country_config_list:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.CountryConfigListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      configs:
                        description: Configs
                        format: '[]*bean.MerchantCountryConfig'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantCountryConfig'
                        properties: {}
                        type: array
                    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: ""
      summary: Edit Country Config
      tags:
      - Merchant
  /merchant/credit/config_list:
    get:
      parameters:
      - description: type list of credit account, 1-main account, 2-promo credit account
        in: query
        name: types
        schema:
          description: type list of credit account, 1-main account, 2-promo credit
            account
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: currency
        in: query
        name: currency
        schema:
          description: currency
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfigs:
                        description: CreditConfig List Object
                        format: '[]*bean.CreditConfig'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Credit Config list
      tags:
      - Credit
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.ConfigListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfigs:
                        description: CreditConfig List Object
                        format: '[]*bean.CreditConfig'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Credit Config list
      tags:
      - Credit
  /merchant/credit/credit_account_list:
    get:
      description: Get Credit Account list
      parameters:
      - description: filter id of user
        in: query
        name: userId
        schema:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      - description: filter email of user
        in: query
        name: email
        schema:
          description: filter email of user
          format: string
          properties: {}
          type: string
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditAccounts:
                        description: Credit Account List
                        format: '[]*detail.CreditAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.CreditAccountDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Credit Account List
      tags:
      - Credit
  /merchant/credit/credit_transaction_list:
    get:
      description: Get Credit Transaction list
      parameters:
      - description: filter type of account, 1-main account, 2-promo credit account
        in: query
        name: accountType
        required: true
        schema:
          description: filter type of account, 1-main account, 2-promo credit account
          format: int
          properties: {}
          type: integer
      - description: filter id of user
        in: query
        name: userId
        schema:
          description: filter id of user
          format: int64
          properties: {}
          type: integer
      - description: filter email of user
        in: query
        name: email
        schema:
          description: filter email of user
          format: string
          properties: {}
          type: string
      - description: filter currency of account
        in: query
        name: currency
        schema:
          description: filter currency of account
          format: string
          properties: {}
          type: string
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: transaction type。1-recharge income，2-payment out，3-refund income，4-withdraw
          out，5-withdraw failed income, 6-admin change，7-recharge refund out
        in: query
        name: transactionTypes
        schema:
          description: transaction type。1-recharge income，2-payment out，3-refund income，4-withdraw
            out，5-withdraw failed income, 6-admin change，7-recharge refund out
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditTransactions:
                        description: Credit Transaction List
                        format: '[]*detail.CreditTransactionDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.CreditTransactionDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Credit Transaction List
      tags:
      - Credit
    post:
      description: Get Credit Transaction list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.CreditTransactionListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditTransactions:
                        description: Credit Transaction List
                        format: '[]*detail.CreditTransactionDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.CreditTransactionDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Credit Transaction List
      tags:
      - Credit
  /merchant/credit/detail:
    get:
      parameters:
      - description: The credit account Id
        in: query
        name: id
        required: true
        schema:
          description: The credit account Id
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.detail.CreditAccountDetail'
                      creditTransactions:
                        description: Credit Transaction List
                        format: '[]*bean.CreditTransaction'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
                        properties: {}
                        type: array
                    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: ""
      summary: Credit Account Detail
      tags:
      - Credit
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.detail.CreditAccountDetail'
                      creditTransactions:
                        description: Credit Transaction List
                        format: '[]*bean.CreditTransaction'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
                        properties: {}
                        type: array
                    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: ""
      summary: Credit Account Detail
      tags:
      - Credit
  /merchant/credit/edit_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.EditConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfig:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                    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: ""
      summary: Edit Credit Config
      tags:
      - Credit
  /merchant/credit/edit_credit_account:
    post:
      description: Edit User Credit Account Config
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.EditCreditAccountReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      UserCreditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
                    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: ""
      summary: Edit User Credit Account Config
      tags:
      - Credit
  /merchant/credit/edit_promo_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.EditPromoConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfig:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                    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: ""
      summary: Edit Promo Credit Config
      tags:
      - Promo Credit
  /merchant/credit/get_promo_config:
    get:
      parameters:
      - description: currency
        in: query
        name: currency
        schema:
          description: currency
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfig:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                    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: ""
      summary: Get Promo Credit Config
      tags:
      - Promo Credit
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.PromoConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfig:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                    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: ""
      summary: Get Promo Credit Config
      tags:
      - Promo Credit
  /merchant/credit/get_promo_config_statistics:
    get:
      parameters:
      - description: currency
        in: query
        name: currency
        schema:
          description: currency
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfigStatistics:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfigStatistics'
                    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: ""
      summary: Get Promo Credit Config Statistics
      tags:
      - Promo Credit
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.PromoConfigStatisticsReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfigStatistics:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfigStatistics'
                    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: ""
      summary: Get Promo Credit Config Statistics
      tags:
      - Promo Credit
  /merchant/credit/new_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.NewConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditConfig:
                        $ref: '#/components/schemas/unibee.api.bean.CreditConfig'
                    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: ""
      summary: Setup Credit Config
      tags:
      - Credit
  /merchant/credit/new_credit_recharge:
    post:
      description: New Credit Recharge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.NewCreditRechargeReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
                      creditRecharge:
                        $ref: '#/components/schemas/unibee.api.bean.CreditRecharge'
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      link:
                        format: string
                        properties: {}
                        type: string
                      merchant:
                        $ref: '#/components/schemas/unibee.api.bean.Merchant'
                      paid:
                        description: Paid，true|false
                        format: bool
                        properties: {}
                        type: boolean
                      payment:
                        $ref: '#/components/schemas/unibee.api.bean.Payment'
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: New Credit Recharge
      tags:
      - Credit
  /merchant/credit/promo_credit_decrement:
    post:
      description: Decrease user promo credit amount, the amount after decreased should
        greater than 0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.PromoCreditDecrementReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      UserPromoCreditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
                      creditTransaction:
                        $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
                    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: ""
      summary: Promo Credit Decrement
      tags:
      - Promo Credit
  /merchant/credit/promo_credit_increment:
    post:
      description: Increase user promo credit amount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.PromoCreditIncrementReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      UserPromoCreditAccount:
                        $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
                      creditTransaction:
                        $ref: '#/components/schemas/unibee.api.bean.CreditTransaction'
                    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: ""
      summary: Promo Credit Increment
      tags:
      - Promo Credit
  /merchant/credit/promo_credit_refund_from_invoice:
    post:
      description: Refund user promo credit amount from refund invoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.credit.PromoCreditRefundFromInvoiceReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Promo Credit Refund
      tags:
      - Promo Credit
  /merchant/discount/activate:
    post:
      description: Activate discount code, the discount code can only effect to payment
        or subscription after activated
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.ActivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Activate Discount Code
      tags:
      - Discount
  /merchant/discount/batch/children/detail:
    get:
      description: Get detail of a specific batch child code
      parameters:
      - description: The child code's Id
        in: query
        name: id
        required: true
        schema:
          description: The child code's Id
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      child:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCode'
                    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: ""
      summary: Get Batch Child Code Detail
      tags:
      - Batch Discount
    post:
      description: Get detail of a specific batch child code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchChildrenDetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      child:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCode'
                    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: ""
      summary: Get Batch Child Code Detail
      tags:
      - Batch Discount
  /merchant/discount/batch/children/generate:
    post:
      description: Generate child codes for a batch template. Template must be in
        active status. Supports initial generation, retry on failure, and incremental
        expansion. Either templateId or templateCode must be provided. If quantity
        > 1000, isAsync must be set to true. Default is synchronous execution.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchChildrenGenerateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      existingCount:
                        description: Already generated count before this operation
                        format: int64
                        properties: {}
                        type: integer
                      failedCount:
                        description: Failed count in this operation (only for synchronous
                          execution)
                        format: int
                        properties: {}
                        type: integer
                      generatedCount:
                        description: Newly generated count in this operation (only
                          for synchronous execution)
                        format: int
                        properties: {}
                        type: integer
                      isAsync:
                        description: Whether the generation is running asynchronously
                        format: bool
                        properties: {}
                        type: boolean
                      successCount:
                        description: Successfully inserted count in this operation
                          (only for synchronous execution)
                        format: int
                        properties: {}
                        type: integer
                      templateCode:
                        description: Template code prefix
                        format: string
                        properties: {}
                        type: string
                      templateId:
                        description: Template ID
                        format: int64
                        properties: {}
                        type: integer
                      totalTarget:
                        description: Target total quantity
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Generate Batch Child Codes
      tags:
      - Batch Discount
  /merchant/discount/batch/children/list:
    get:
      description: Get list of child codes for a specific batch template
      parameters:
      - description: The template's Id
        in: query
        name: templateId
        required: true
        schema:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
      - description: Filter by child code, fuzzy search
        in: query
        name: code
        schema:
          description: Filter by child code, fuzzy search
          format: string
          properties: {}
          type: string
      - description: Sort field, gmt_create|gmt_modify, default gmt_create
        in: query
        name: sortField
        schema:
          description: Sort field, gmt_create|gmt_modify, default gmt_create
          format: string
          properties: {}
          type: string
      - description: Sort type, asc|desc, default desc
        in: query
        name: sortType
        schema:
          description: Sort type, asc|desc, default desc
          format: string
          properties: {}
          type: string
      - description: Page number, start from 0
        in: query
        name: page
        schema:
          description: Page number, start from 0
          format: int
          properties: {}
          type: integer
      - description: Count per page
        in: query
        name: count
        schema:
          description: Count per page
          format: int
          properties: {}
          type: integer
      - description: Filter by create time start, UTC timestamp in seconds
        in: query
        name: createTimeStart
        schema:
          description: Filter by create time start, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
      - description: Filter by create time end, UTC timestamp in seconds
        in: query
        name: createTimeEnd
        schema:
          description: Filter by create time end, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      children:
                        description: Child code list
                        format: '[]*bean.MerchantBatchDiscountCode'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCode'
                        properties: {}
                        type: array
                      total:
                        description: Total count
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Batch Child Codes List
      tags:
      - Batch Discount
  /merchant/discount/batch/template/detail:
    get:
      description: Get batch discount template detail
      parameters:
      - description: The template's Id
        in: query
        name: id
        required: true
        schema:
          description: The template's Id
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      template:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                    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: ""
      summary: Get Batch Template Detail
      tags:
      - Batch Discount
    post:
      description: Get batch discount template detail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchTemplateDetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      template:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                    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: ""
      summary: Get Batch Template Detail
      tags:
      - Batch Discount
  /merchant/discount/batch/template/edit:
    post:
      description: Edit batch discount template. CodePrefix cannot be modified. Quantity
        can only be increased after activation.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchTemplateEditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      template:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                    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: ""
      summary: Edit Batch Discount Template
      tags:
      - Batch Discount
  /merchant/discount/batch/template/list:
    get:
      description: Get batch discount template list
      parameters:
      - description: Filter by discount_type, 1-percentage, 2-fixed_amount
        in: query
        name: discountType
        schema:
          description: Filter by discount_type, 1-percentage, 2-fixed_amount
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by billing_type, 1-one-time, 2-recurring
        in: query
        name: billingType
        schema:
          description: Filter by billing_type, 1-one-time, 2-recurring
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by status, 1-editable, 2-active, 3-deactive, 4-expire,
          10-archive
        in: query
        name: status
        schema:
          description: Filter by status, 1-editable, 2-active, 3-deactive, 4-expire,
            10-archive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by code prefix
        in: query
        name: codePrefix
        schema:
          description: Filter by code prefix
          format: string
          properties: {}
          type: string
      - description: Search by code prefix or name
        in: query
        name: searchKey
        schema:
          description: Search by code prefix or name
          format: string
          properties: {}
          type: string
      - description: Filter by currency
        in: query
        name: currency
        schema:
          description: Filter by currency
          format: string
          properties: {}
          type: string
      - description: Sort field, gmt_create|gmt_modify, default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort field, gmt_create|gmt_modify, default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort type, asc|desc, default desc
        in: query
        name: sortType
        schema:
          description: Sort type, asc|desc, default desc
          format: string
          properties: {}
          type: string
      - description: Page number, start from 0
        in: query
        name: page
        schema:
          description: Page number, start from 0
          format: int
          properties: {}
          type: integer
      - description: Count per page
        in: query
        name: count
        schema:
          description: Count per page
          format: int
          properties: {}
          type: integer
      - description: Filter by create time start, UTC timestamp in seconds
        in: query
        name: createTimeStart
        schema:
          description: Filter by create time start, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
      - description: Filter by create time end, UTC timestamp in seconds
        in: query
        name: createTimeEnd
        schema:
          description: Filter by create time end, UTC timestamp in seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      activeTemplateCount:
                        description: Total count of active template codes
                        format: int64
                        properties: {}
                        type: integer
                      templates:
                        description: Batch template list
                        format: '[]*bean.MerchantBatchDiscountCodeTemplate'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                        properties: {}
                        type: array
                      total:
                        description: Total count
                        format: int
                        properties: {}
                        type: integer
                      totalChildCodeCount:
                        description: Total count of all child codes
                        format: int64
                        properties: {}
                        type: integer
                      usageRate:
                        description: Usage rate (usedChildCodeCount / totalChildCodeCount),
                          0-1
                        format: float64
                        properties: {}
                        type: number
                      usedChildCodeCount:
                        description: Total count of used child codes
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Batch Template List
      tags:
      - Batch Discount
  /merchant/discount/batch/template/new:
    post:
      description: Create a batch discount code template. Template must be activated
        before generating child codes.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchTemplateNewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      template:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                    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: ""
      summary: Create Batch Discount Template
      tags:
      - Batch Discount
  /merchant/discount/batch/template/quantity_increment:
    post:
      description: Increment batch template quantity. Template must be activated.
        Total quantity after increment must not exceed 10000.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.BatchTemplateQuantityIncrementReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      template:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantBatchDiscountCodeTemplate'
                    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: ""
      summary: Increment Template Quantity
      tags:
      - Batch Discount
  /merchant/discount/deactivate:
    post:
      description: Deactivate discount code
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.DeactivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Deactivate Discount Code
      tags:
      - Discount
  /merchant/discount/decrease_quantity:
    post:
      description: Decrease discount code quantity, the quantity after decreased should
        greater than 0, the action may disable quantity control if quantity decrease
        to 0 or lower than quantityUsed after decreased
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.QuantityDecrementReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discountCode:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                    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: ""
      summary: Quantity Decrement
      tags:
      - Discount
  /merchant/discount/delete:
    post:
      description: Delete discount code before activate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Discount Code
      tags:
      - Discount
  /merchant/discount/detail:
    get:
      parameters:
      - description: The discount's Id
        in: query
        name: id
        required: true
        schema:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantDiscountCodeDetail'
                    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: ""
      summary: Get Merchant Discount Detail
      tags:
      - Discount
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantDiscountCodeDetail'
                    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: ""
      summary: Get Merchant Discount Detail
      tags:
      - Discount
  /merchant/discount/edit:
    post:
      description: Edit the discount code before activate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                    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: ""
      summary: Edit Discount Code
      tags:
      - Discount
  /merchant/discount/list:
    get:
      description: Get discountCode list
      parameters:
      - description: discount_type, 1-percentage, 2-fixed_amount
        in: query
        name: discountType
        schema:
          description: discount_type, 1-percentage, 2-fixed_amount
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: billing_type, 1-one-time, 2-recurring
        in: query
        name: billingType
        schema:
          description: billing_type, 1-one-time, 2-recurring
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: status, 1-editable, 2-active, 3-deactive, 4-expire, 10-archive
        in: query
        name: status
        schema:
          description: status, 1-editable, 2-active, 3-deactive, 4-expire, 10-archive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter Code
        in: query
        name: code
        schema:
          description: Filter Code
          format: string
          properties: {}
          type: string
      - description: Search Key, code or name
        in: query
        name: searchKey
        schema:
          description: Search Key, code or name
          format: string
          properties: {}
          type: string
      - description: Filter Currency
        in: query
        name: currency
        schema:
          description: Filter Currency
          format: string
          properties: {}
          type: string
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discounts:
                        description: Discount Object List
                        format: '[]*detail.MerchantDiscountCodeDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantDiscountCodeDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Discount Code List
      tags:
      - Discount
  /merchant/discount/new:
    post:
      description: Create a new discount code, code can used in onetime or subscription
        purchase to make discount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                    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: ""
      summary: New Discount Code
      tags:
      - Discount
  /merchant/discount/plan_apply_preview:
    post:
      description: Check discount can apply to plan, Only check rules about plan，the
        actual usage is subject to the subscription interface
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.PlanApplyPreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      allPlansAllowed:
                        description: True = discount applies to all plans in cart;
                          false = only to allowedPlanIds
                        format: bool
                        properties: {}
                        type: boolean
                      allowedPlanIds:
                        description: Plan ids that get this discount (when partial
                          apply); empty or same as main+addons when all plans allowed
                        format: '[]int64'
                        items:
                          format: int64
                          properties: {}
                          type: integer
                        properties: {}
                        type: array
                      discountAmount:
                        description: The discount amount can apply to plan
                        format: int64
                        properties: {}
                        type: integer
                      discountCode:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                      failureReason:
                        description: The apply preview failure reason
                        format: string
                        properties: {}
                        type: string
                      valid:
                        description: The apply preview result, true or false
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Plan Apply Preview
      tags:
      - User Discount
  /merchant/discount/quantity_increment:
    post:
      description: Increase discount code quantity, if original quantity is 0, increase
        greater than 0 will enable quantity control
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.discount.QuantityIncrementReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      discountCode:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                    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: ""
      summary: Quantity Increment
      tags:
      - Discount
  /merchant/discount/user_discount_list:
    get:
      description: Get user discountCode list
      parameters:
      - description: The discount's Id
        in: query
        name: id
        required: true
        schema:
          description: The discount's Id
          format: int64
          properties: {}
          type: integer
      - description: Filter UserIds Default All
        in: query
        name: userIds
        schema:
          description: Filter UserIds Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter Email Default All
        in: query
        name: email
        schema:
          description: Filter Email Default All
          format: string
          properties: {}
          type: string
      - description: Filter PlanIds Default All
        in: query
        name: planIds
        schema:
          description: Filter PlanIds Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter SubscriptionIds Default All
        in: query
        name: subscriptionIds
        schema:
          description: Filter SubscriptionIds Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      - description: Filter Status Default All, 1-used, 2-rollback
        in: query
        name: status
        schema:
          description: Filter Status Default All, 1-used, 2-rollback
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter Child Code (fuzzy search), only available when Id is batch
          template ID
        in: query
        name: childCode
        schema:
          description: Filter Child Code (fuzzy search), only available when Id is
            batch template ID
          format: string
          properties: {}
          type: string
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                      userDiscounts:
                        description: User Discount Object List
                        format: '[]*detail.MerchantUserDiscountCodeDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantUserDiscountCodeDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: Get User Discount Code List
      tags:
      - User Discount
  /merchant/edit_country_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.EditCountryConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Get Country Config List
      tags:
      - Merchant
  /merchant/edit_totp_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.EditTotpConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Edit 2FA Config
      tags:
      - Merchant
  /merchant/email/custom_localization_template_sync:
    post:
      description: Sync the custom localization email template to gateway (sendgrid)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.CustomizeLocalizationTemplateSyncReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Customize Localization Template Sync
      tags:
      - Email Template
  /merchant/email/email_sender_setup:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.SenderSetupReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Email Sender Setup
      tags:
      - Email
  /merchant/email/gateway_set_default:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.GatewaySetDefaultReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Email Gateway Set Default
      tags:
      - Email
  /merchant/email/gateway_setup:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.GatewaySetupReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      data:
                        description: The hide star data
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Email Gateway Setup(Sendgrid)
      tags:
      - Email
  /merchant/email/gateway_setup_v2:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.GatewaySetupV2Req'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Email Gateway Setup V2(Sendgrid|smtp)
      tags:
      - Email
  /merchant/email/history_list:
    get:
      description: Get email send history list
      parameters:
      - description: Search Key, email or title
        in: query
        name: searchKey
        schema:
          description: Search Key, email or title
          format: string
          properties: {}
          type: string
      - description: Filter Email
        in: query
        name: email
        schema:
          description: Filter Email
          format: string
          properties: {}
          type: string
      - description: status, 0-pending, 1-success, 2-failure
        in: query
        name: status
        schema:
          description: status, 0-pending, 1-success, 2-failure
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      emailHistories:
                        description: Email History Object List
                        format: '[]*detail.MerchantEmailHistoryDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantEmailHistoryDetail'
                        properties: {}
                        type: array
                      emailHistoryStatistics:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantEmailHistoryStatistics'
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Email History List
      tags:
      - Email
  /merchant/email/send_email_to_user:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.SendEmailToUserReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Send Email To User
      tags:
      - Email
  /merchant/email/send_email_via_api_credential:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.SendEmailViaAPICredentialReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Send Email Via API Credential
      tags:
      - Email
  /merchant/email/send_template_email_to_user:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.SendTemplateEmailToUserReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Send Template Email To User
      tags:
      - Email
  /merchant/email/template_activate_localization_version:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.ActivateLocalizationVersionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Activate Email Template Localization Version
      tags:
      - Email Template
  /merchant/email/template_add_localization_version:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.AddLocalizationVersionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      localizationVersion:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationVersion'
                    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: ""
      summary: Add Email Template Localization Version
      tags:
      - Email Template
  /merchant/email/template_delete_localization_version:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.DeleteLocalizationVersionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Email Template Localization Version
      tags:
      - Email Template
  /merchant/email/template_edit_localization_version:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.EditLocalizationVersionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      localizationVersion:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantLocalizationVersion'
                    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: ""
      summary: Edit Email Template Localization Version
      tags:
      - Email Template
  /merchant/email/template_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      emailTemplateList:
                        description: Email Template Object List
                        format: '[]*bean.MerchantEmailTemplate'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantEmailTemplate'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Email Template List
      tags:
      - Email Template
  /merchant/email/template_test_localization_version:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.email.TestLocalizationVersionReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Test Email Template Localization Version
      tags:
      - Email Template
  /merchant/gateway/archive:
    post:
      description: Archive the exist payment gateway，available for setup new one,
        the old user continue using the old gateway
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.ArchiveReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway Archive
      tags:
      - Gateway
  /merchant/gateway/detail:
    get:
      description: Get Payment Gateway Detail
      parameters:
      - description: The id of payment gateway, either gatewayId or gatewayName should
          provided
        in: query
        name: gatewayId
        schema:
          description: The id of payment gateway, either gatewayId or gatewayName
            should provided
          format: '*int64'
          properties: {}
          type: integer
      - description: The specified name of payment gateway, either gatewayId or gatewayName
          should provided, stripe|paypal|changelly|unitpay|payssion|cryptadium, return
          default gateway if provided
        in: query
        name: gatewayName
        schema:
          description: The specified name of payment gateway, either gatewayId or
            gatewayName should provided, stripe|paypal|changelly|unitpay|payssion|cryptadium,
            return default gateway if provided
          format: '*string'
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway
      tags:
      - Gateway
    post:
      description: Get Payment Gateway Detail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway
      tags:
      - Gateway
  /merchant/gateway/edit:
    post:
      description: Edit the exist payment gateway
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway Edit
      tags:
      - Gateway
  /merchant/gateway/edit_country_config:
    post:
      description: Edit country config for payment gateway, to enable or disable the
        payment for countryCode, default is enable
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.EditCountryConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Payment Gateway Country Config Edit
      tags:
      - Gateway
  /merchant/gateway/edit_sort:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.EditSortReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateways:
                        description: Payment Gateway Setup Object List
                        format: '[]*detail.Gateway'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                        properties: {}
                        type: array
                    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: ""
      summary: Edit Payment Gateway Sort
      tags:
      - Gateway
  /merchant/gateway/list:
    get:
      parameters:
      - description: Filter archive gateway or not, default all
        in: query
        name: archive
        schema:
          description: Filter archive gateway or not, default all
          format: '*bool'
          properties: {}
          type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateways:
                        description: Payment Gateway Object List
                        format: '[]*detail.Gateway'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Payment Gateway List
      tags:
      - Gateway
  /merchant/gateway/restore:
    post:
      description: Restore the exist payment gateway
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.RestoreReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway Restore
      tags:
      - Gateway
  /merchant/gateway/set_default:
    post:
      description: Set default the exist payment gateway
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.SetDefaultReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway Set Default
      tags:
      - Gateway
  /merchant/gateway/setup:
    post:
      description: Setup Payment gateway
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.SetupReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Payment Gateway Setup
      tags:
      - Gateway
  /merchant/gateway/setup_exchange_rate_api:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.SetupExchangeApiReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      data:
                        description: The hide star key of exchange rate api
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Exchange Rate Api Setup
      tags:
      - Gateway
  /merchant/gateway/setup_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateways:
                        description: Payment Gateway Setup Object List
                        format: '[]*detail.Gateway'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Payment Gateway Setup List
      tags:
      - Gateway
  /merchant/gateway/setup_webhook:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.SetupWebhookReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gatewayWebhookUrl:
                        description: The webhook endpoint url of payment gateway,
                          if gateway is stripe, the url will setting to stripe by
                          api automatic
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Payment Gateway Webhook Setup
      tags:
      - Gateway
  /merchant/gateway/wire_transfer_edit:
    post:
      description: Edit the wire transfer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.WireTransferEditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Wire Transfer Edit
      tags:
      - Gateway
  /merchant/gateway/wire_transfer_setup:
    post:
      description: Setup the wire transfer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.gateway.WireTransferSetupReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                    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: ""
      summary: Wire Transfer Setup
      tags:
      - Gateway
  /merchant/get:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      Currency:
                        description: Currency List
                        format: '[]*bean.Currency'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Currency'
                        properties: {}
                        type: array
                      MemberRoles:
                        description: The member role list'
                        format: '[]*bean.MerchantRole'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantRole'
                        properties: {}
                        type: array
                      TimeZone:
                        description: TimeZone List
                        format: '[]string'
                        items:
                          format: string
                          properties: {}
                          type: string
                        properties: {}
                        type: array
                      analyticsHost:
                        description: Analytics Host
                        format: string
                        properties: {}
                        type: string
                      cloudFeatureAnalyticsEnabled:
                        description: Analytics Feature Enabled For Cloud Version
                        format: bool
                        properties: {}
                        type: boolean
                      cname:
                        description: CNAME value for merchant to configure
                        format: string
                        properties: {}
                        type: string
                      cnameDomain:
                        description: Merchant CNAME Domain
                        format: string
                        properties: {}
                        type: string
                      defaultCurrency:
                        description: Default Currency
                        format: string
                        properties: {}
                        type: string
                      defaultEmailGateway:
                        description: Default Email Gateway
                        format: string
                        properties: {}
                        type: string
                      emailGateways:
                        additionalProperties:
                          $ref: '#/components/schemas/unibee.api.bean.EmailGatewayConnectionAPIKeys'
                        description: Email Gateway Map
                        format: map[string]*bean.EmailGatewayConnectionAPIKeys
                        properties: {}
                        type: object
                      emailSender:
                        $ref: '#/components/schemas/unibee.api.bean.Sender'
                      env:
                        description: 'System Env, em: daily|stage|local|prod'
                        format: string
                        properties: {}
                        type: string
                      exchangeRateApiKey:
                        description: ExchangeRateApiKey
                        format: string
                        properties: {}
                        type: string
                      gateways:
                        description: Gateway List
                        format: '[]*detail.Gateway'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                        properties: {}
                        type: array
                      globalTOPTEnabled:
                        description: GlobalTOPTEnabled
                        format: bool
                        properties: {}
                        type: boolean
                      globalUSVATConfig:
                        $ref: '#/components/schemas/unibee.api.bean.USVATGlobalConfig'
                      isOwner:
                        description: Check Member is Owner
                        format: bool
                        properties: {}
                        type: boolean
                      isProd:
                        description: Check System Env Is Prod, true|false
                        format: bool
                        properties: {}
                        type: boolean
                      merchant:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantProfile'
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                      multiCurrencyConfigs:
                        description: Merchant's MultiCurrency Configs
                        format: '[]*bean.MerchantMultiCurrencyConfig'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantMultiCurrencyConfig'
                        properties: {}
                        type: array
                      openApiHost:
                        description: OpenApi Host
                        format: string
                        properties: {}
                        type: string
                      openApiKey:
                        description: OpenAPIKey
                        format: string
                        properties: {}
                        type: string
                      quickBooksCompanyName:
                        description: QuickBooksCompanyName
                        format: string
                        properties: {}
                        type: string
                      quickBooksLastSyncError:
                        description: QuickBooksLastSyncError
                        format: string
                        properties: {}
                        type: string
                      quickBooksLastSynchronized:
                        description: QuickBooksLastSynchronized
                        format: string
                        properties: {}
                        type: string
                      segmentServerSideKey:
                        description: SegmentServerSideKey
                        format: string
                        properties: {}
                        type: string
                      segmentUserPortalKey:
                        description: SegmentUserPortalKey
                        format: string
                        properties: {}
                        type: string
                      sendGridKey:
                        description: SendGridKey
                        format: string
                        properties: {}
                        type: string
                      taxJarApiKeys:
                        $ref: '#/components/schemas/unibee.api.bean.USVATGatewayConnectionAPIKeys'
                      vatSenseKey:
                        description: VatSenseKey
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Profile
      tags:
      - Merchant
  /merchant/get_exchange_rate:
    post:
      description: Get raw exchange rate from the upstream provider, with shared Redis
        cache and cloud fallback. Ignores merchant's multi-currency fixed-rate settings.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.GetExchangeRateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      exchangeRate:
                        description: Exchange rate from FromCurrency to ToCurrency
                        format: float64
                        properties: {}
                        type: number
                      fromCurrency:
                        description: From currency code
                        format: string
                        properties: {}
                        type: string
                      toCurrency:
                        description: To currency code
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Exchange Rate
      tags:
      - Merchant
  /merchant/get_license:
    get:
      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: ""
      summary: Get License
      tags:
      - Merchant
  /merchant/get_license_update_url:
    get:
      parameters:
      - description: Id of plan to update
        in: query
        name: planId
        schema:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
      - description: ReturnUrl
        in: query
        name: returnUrl
        schema:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      - description: CancelUrl
        in: query
        name: cancelUrl
        schema:
          description: CancelUrl
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get License Update Url
      tags:
      - Merchant
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.GetLicenseUpdateUrlReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get License Update Url
      tags:
      - Merchant
  /merchant/integration/quickbooks/disconnection:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Disconnection Quickbooks
      tags:
      - Integrations
  /merchant/integration/quickbooks/get_authorization_url:
    get:
      parameters:
      - description: ReturnUrl
        in: query
        name: returnUrl
        schema:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      authorizationUrl:
                        description: Authorization URL
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Quickbooks Authorization Connection URL
      tags:
      - Integrations
  /merchant/invoice/cancel:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.CancelReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Cancel Invoice
      tags:
      - Invoice
  /merchant/invoice/clearPayment:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.ClearPaymentReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Clear Invoice Current Pending Payment
      tags:
      - Invoice
  /merchant/invoice/create_mark_refund:
    post:
      description: Create a manual refund record for a paid invoice when refund has
        been processed offline via crypto, wire transfer or External gateway, and
        mark it as requested. Supports crypto, wire transfer and external invoices.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.CreateMarkRefundReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      refund:
                        $ref: '#/components/schemas/unibee.api.bean.Refund'
                    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: ""
      summary: Create And Mark Manual Refund (Crypto/WireTransfer/External)
      tags:
      - Invoice
  /merchant/invoice/credit_note/list:
    post:
      description: Bulk credit note invoice list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.CreditNoteListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditNotes:
                        description: CreditNote Detail Object List
                        format: '[]*detail.CreditNoteDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.CreditNoteDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Bulk CreditNote(Refund Invoice) Invoice List
      tags:
      - Invoice
  /merchant/invoice/delete:
    post:
      description: Delete invoice of pending status
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Pending Invoice
      tags:
      - Invoice
  /merchant/invoice/detail:
    get:
      description: Get detail of invoice
      parameters:
      - description: The unique id of invoice
        in: query
        name: invoiceId
        required: true
        schema:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditNotes:
                        description: CreditNotes Object List Link To Invoice
                        format: '[]*detail.InvoiceDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                        properties: {}
                        type: array
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Invoice Detail
      tags:
      - Invoice
    post:
      description: Get detail of invoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      creditNotes:
                        description: CreditNotes Object List Link To Invoice
                        format: '[]*detail.InvoiceDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                        properties: {}
                        type: array
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Invoice Detail
      tags:
      - Invoice
  /merchant/invoice/edit:
    post:
      description: Edit invoice of pending status
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Invoice Edit
      tags:
      - Invoice
  /merchant/invoice/edit_paid_invoice_billing_details:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.EditPaidInvoiceBillingDetailsReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Edit Paid Invoice Billing Details (Exception)
      tags:
      - Invoice
  /merchant/invoice/external_gateway_invoice/mark_paid:
    post:
      deprecated: true
      description: 'Deprecated. Please use payment-level external gateway APIs: /merchant/payment/external_gateway_payment/mark_paid.
        This invoice-level API is kept for compatibility only.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsPaidReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: Invoice id
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: Created or reused payment id
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                      subscriptionId:
                        description: Subscription id
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: '[Deprecated] Mark External Gateway Invoice As Paid'
      tags:
      - Invoice
  /merchant/invoice/external_gateway_invoice/mark_refunded:
    post:
      deprecated: true
      description: Deprecated placeholder. External refund flow will be redesigned.
        Do not use this invoice-level API for new integrations.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.MarkExternalGatewayInvoiceAsRefundedReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: Invoice id
                        format: string
                        properties: {}
                        type: string
                      refundId:
                        description: Created refund id
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: '[Deprecated] Mark External Gateway Invoice As Refunded'
      tags:
      - Invoice
  /merchant/invoice/external_gateway_invoice/update_payment_link:
    post:
      deprecated: true
      description: 'Deprecated. Please use payment-level external gateway APIs: /merchant/payment/external_gateway_payment/update_link.
        This invoice-level API is kept for compatibility only.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.UpdateExternalGatewayInvoicePaymentLinkReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: Invoice id
                        format: string
                        properties: {}
                        type: string
                      paymentLink:
                        description: Updated payment link
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: '[Deprecated] Update External Gateway Invoice Payment Link'
      tags:
      - Invoice
  /merchant/invoice/finish:
    post:
      description: Finish invoice, generate invoice link
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.FinishReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                    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: ""
      summary: Finish Invoice
      tags:
      - Invoice
  /merchant/invoice/history_invoice_import:
    post:
      description: Each repetition import overrides existing invoices with matching
        InvoiceId (BizType=Import).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.HistoryInvoiceImportReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: History Invoice Import (supports override)
      tags:
      - Invoice Import
  /merchant/invoice/history_invoice_import/delete:
    post:
      description: Delete an imported history invoice (BizType=Import) and its related
        payment/refund if applicable.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.HistoryInvoiceImportDeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete imported history invoice
      tags:
      - Invoice Import
  /merchant/invoice/list:
    get:
      description: Get invoice list
      parameters:
      - description: The firstName of invoice
        in: query
        name: firstName
        schema:
          description: The firstName of invoice
          format: string
          properties: {}
          type: string
      - description: The lastName of invoice
        in: query
        name: lastName
        schema:
          description: The lastName of invoice
          format: string
          properties: {}
          type: string
      - description: Search InvoiceName|Email|ProductName
        in: query
        name: searchKey
        schema:
          description: Search InvoiceName|Email|ProductName
          format: string
          properties: {}
          type: string
      - description: The currency of invoice
        in: query
        name: currency
        schema:
          description: The currency of invoice
          format: string
          properties: {}
          type: string
      - description: The status of invoice, 1-pending｜2-processing｜3-paid | 4-failed
          | 5-cancelled
        in: query
        name: status
        schema:
          description: The status of invoice, 1-pending｜2-processing｜3-paid | 4-failed
            | 5-cancelled
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: The filter start amount of invoice
        in: query
        name: amountStart
        schema:
          description: The filter start amount of invoice
          format: '*int64'
          properties: {}
          type: integer
      - description: The filter end amount of invoice
        in: query
        name: amountEnd
        schema:
          description: The filter end amount of invoice
          format: '*int64'
          properties: {}
          type: integer
      - description: The filter userid of invoice
        in: query
        name: userId
        schema:
          description: The filter userid of invoice
          format: int64
          properties: {}
          type: integer
      - description: GatewayIds, Search Filter GatewayIds
        in: query
        name: gatewayIds
        schema:
          description: GatewayIds, Search Filter GatewayIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter invoices that include any of these plan IDs (OR)
        in: query
        name: planIds
        schema:
          description: Filter invoices that include any of these plan IDs (OR)
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by plan tags. Omit or empty tagIds = no tag filter. When
          planIds is also set, results use union OR.
        in: query
        name: planTagFilter
        schema:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
      - description: Filter by whether discount_code is set
        in: query
        name: hasDiscountCode
        schema:
          description: Filter by whether discount_code is set
          format: '*bool'
          properties: {}
          type: boolean
      - description: Filter by exact discount code (case-insensitive)
        in: query
        name: discountCode
        schema:
          description: Filter by exact discount code (case-insensitive)
          format: string
          properties: {}
          type: string
      - description: The filter email of invoice
        in: query
        name: sendEmail
        schema:
          description: The filter email of invoice
          format: string
          properties: {}
          type: string
      - description: Filter，em. invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
          gmt_modify
        in: query
        name: sortField
        schema:
          description: Filter，em. invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Deleted Involved，Need Admin Permission
        in: query
        name: deleteInclude
        schema:
          description: Deleted Involved，Need Admin Permission
          format: bool
          properties: {}
          type: boolean
      - description: invoice Type, 0-payment, 1-refund
        in: query
        name: type
        schema:
          description: invoice Type, 0-payment, 1-refund
          format: '*int'
          properties: {}
          type: integer
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count By Page
        in: query
        name: count
        schema:
          description: Count By Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: ReportTimeStart，UTC timestamp，seconds
        in: query
        name: reportTimeStart
        schema:
          description: ReportTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: ReportTimeEnd，UTC timestamp，seconds
        in: query
        name: reportTimeEnd
        schema:
          description: ReportTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoices:
                        description: Invoice Detail Object List
                        format: '[]*detail.InvoiceDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Invoice List
      tags:
      - Invoice
    post:
      description: Get invoice list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoices:
                        description: Invoice Detail Object List
                        format: '[]*detail.InvoiceDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Invoice List
      tags:
      - Invoice
  /merchant/invoice/mark_refund_success:
    post:
      description: Mark existing manual refund of an invoice as success, only supports
        Changelly (crypto) and Wire Transfer refunds.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.MarkRefundInvoiceSuccessReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Mark Manual Invoice Refund As Success
      tags:
      - Invoice
  /merchant/invoice/mark_wire_transfer_success:
    post:
      description: Manually mark a pending wire transfer invoice as paid and trigger
        invoice paid flow. Only supports wire transfer invoices that have been paid
        offline.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.MarkWireTransferSuccessReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Mark Wire Transfer Invoice As Paid (Manual)
      tags:
      - Invoice
  /merchant/invoice/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: New Invoice
      tags:
      - Invoice
  /merchant/invoice/pdf_generate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.PdfGenerateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Generate Invoice PDF
      tags:
      - Invoice
  /merchant/invoice/pdf_update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.PdfUpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Invoice PDF
      tags:
      - Invoice
  /merchant/invoice/reconvert_crypto_and_send_email:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.ReconvertCryptoAndSendReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Reconvert Crypto Data and Send Invoice Email
      tags:
      - Invoice
  /merchant/invoice/refund:
    post:
      description: Create payment refund for paid invoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.RefundReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      refund:
                        $ref: '#/components/schemas/unibee.api.bean.Refund'
                    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: ""
      summary: Create InvoiceRefund
      tags:
      - Invoice
  /merchant/invoice/send_email:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.SendEmailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Send Invoice Email
      tags:
      - Invoice
  /merchant/invoice/split_payments:
    get:
      description: Get all split payments for an invoice with payment statistics
      parameters:
      - description: The invoice id
        in: query
        name: invoiceId
        required: true
        schema:
          description: The invoice id
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paidAmount:
                        description: Total paid amount from successful split payments
                          in cents
                        format: int64
                        properties: {}
                        type: integer
                      payments:
                        description: List of split payments
                        format: '[]*bean.SplitPaymentInfo'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.SplitPaymentInfo'
                        properties: {}
                        type: array
                      remainingAmount:
                        description: Remaining amount to be paid in cents
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        description: Total invoice amount in cents
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Split Payments
      tags:
      - Invoice
    post:
      description: Get all split payments for an invoice with payment statistics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.GetSplitPaymentsReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paidAmount:
                        description: Total paid amount from successful split payments
                          in cents
                        format: int64
                        properties: {}
                        type: integer
                      payments:
                        description: List of split payments
                        format: '[]*bean.SplitPaymentInfo'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.SplitPaymentInfo'
                        properties: {}
                        type: array
                      remainingAmount:
                        description: Remaining amount to be paid in cents
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        description: Total invoice amount in cents
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Split Payments
      tags:
      - Invoice
  /merchant/invoice/sync_paid_invoice_billing_details:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.SyncPaidInvoiceBillingDetailsReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Sync Paid Invoice Billing Details From Latest User Profile (Exception)
      tags:
      - Invoice
  /merchant/invoice/sync_user_snapshot:
    post:
      description: Sync user snapshot in invoice with latest user profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.invoice.SyncUserSnapshotReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                    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: ""
      summary: Sync Invoice User Snapshot With Latest User Info
      tags:
      - Invoice
  /merchant/member/clear_member_totp:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ClearTotpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Owner Clear Member 2FA Key
      tags:
      - Admin Member
  /merchant/member/clear_oauth:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ClearOAuthReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Clear Member OAuth Account
      tags:
      - Admin Member
  /merchant/member/confirm_totp_key:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ConfirmTotpKeyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Admin Member Confirm 2FA Key
      tags:
      - Admin Member
  /merchant/member/delete_totp_device:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.DeleteDeviceReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      deviceList:
                        description: The devices list'
                        format: '[]*bean.MerchantMemberDevice'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantMemberDevice'
                        properties: {}
                        type: array
                    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: ""
      summary: Admin Owner Or Admin Delete Own's' 2FA Device
      tags:
      - Admin Member
  /merchant/member/get_totp_key:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.GetTotpKeyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      totpKey:
                        description: TotpKey, used on next confirm step
                        format: string
                        properties: {}
                        type: string
                      totpResumeCode:
                        description: TotpResumeCode
                        format: string
                        properties: {}
                        type: string
                      totpType:
                        description: 1-General, Google Authenticator | 2-Microsoft
                          Authenticator | 3-Authy | 4-1Password | 5-LastPass | 6-FreeOTP
                          | 7-Other TOTP
                        format: int
                        properties: {}
                        type: integer
                      totpUrl:
                        description: TotpUrl， Used to generate QR Image
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Admin Member Get 2FA Key
      tags:
      - Admin Member
  /merchant/member/list:
    get:
      parameters:
      - description: Search Key, FirstName,LastName or Email
        in: query
        name: searchKey
        schema:
          description: Search Key, FirstName,LastName or Email
          format: string
          properties: {}
          type: string
      - description: Search Filter Email
        in: query
        name: email
        schema:
          description: Search Filter Email
          format: string
          properties: {}
          type: string
      - description: The member roleId if specified'
        in: query
        name: roleIds
        schema:
          description: The member roleId if specified'
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMembers:
                        description: Merchant Member Object List
                        format: '[]*detail.MerchantMemberDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Member List
      tags:
      - Admin Member
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMembers:
                        description: Merchant Member Object List
                        format: '[]*detail.MerchantMemberDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Member List
      tags:
      - Admin Member
  /merchant/member/logout:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.LogoutReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Logout
      tags:
      - Admin Member
  /merchant/member/new_member:
    post:
      description: Will send email to member email provided, member can enter admin
        portal by email otp login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.NewMemberReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Invite member
      tags:
      - Admin Member
  /merchant/member/operation_log_list:
    get:
      parameters:
      - description: Filter Member's FirstName Default All
        in: query
        name: memberFirstName
        schema:
          description: Filter Member's FirstName Default All
          format: string
          properties: {}
          type: string
      - description: Filter Member's LastName, Default All
        in: query
        name: memberLastName
        schema:
          description: Filter Member's LastName, Default All
          format: string
          properties: {}
          type: string
      - description: Filter Member's Email, Default All
        in: query
        name: memberEmail
        schema:
          description: Filter Member's Email, Default All
          format: string
          properties: {}
          type: string
      - description: FirstName
        in: query
        name: firstName
        schema:
          description: FirstName
          format: string
          properties: {}
          type: string
      - description: LastName
        in: query
        name: lastName
        schema:
          description: LastName
          format: string
          properties: {}
          type: string
      - description: Email
        in: query
        name: email
        schema:
          description: Email
          format: string
          properties: {}
          type: string
      - description: subscription_id
        in: query
        name: subscriptionId
        schema:
          description: subscription_id
          format: string
          properties: {}
          type: string
      - description: invoice id
        in: query
        name: invoiceId
        schema:
          description: invoice id
          format: string
          properties: {}
          type: string
      - description: plan id
        in: query
        name: planId
        schema:
          description: plan id
          format: int64
          properties: {}
          type: integer
      - description: discount_code
        in: query
        name: discountCode
        schema:
          description: discount_code
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantOperationLogs:
                        description: Merchant Member Operation Log List
                        format: '[]*detail.MerchantOperationLogDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantOperationLogDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Member Operation Log List
      tags:
      - Admin Member
  /merchant/member/passwordReset:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.PasswordResetReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Member Reset Password
      tags:
      - Admin Member
  /merchant/member/profile:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                    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: ""
      summary: Get Member Profile
      tags:
      - Admin Member
  /merchant/member/reset_totp:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ResetTotpReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                    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: ""
      summary: Admin Member Reset Member 2FA Key
      tags:
      - Admin Member
  /merchant/member/resume_member:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.ReleaseReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Resume Member
      tags:
      - Admin Member
  /merchant/member/suspend_member:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.FrozenReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Suspend Member
      tags:
      - Admin Member
  /merchant/member/update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.UpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMember:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMemberDetail'
                    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: ""
      summary: Update Member Profile
      tags:
      - Admin Member
  /merchant/member/update_member_role:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.UpdateMemberRoleReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Member Role
      tags:
      - Admin Member
  /merchant/member/update_oauth:
    post:
      description: 'Pass OAuth token in request header (Auth.js JWT). Headers: X-Auth-JS-Token
        | X-Auth-Token | X-OAuth-Token'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.member.UpdateOAuthReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Member OAuth Account
      tags:
      - Admin Member
  /merchant/metric/carryover/reprocess:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.MetricCarryoverReprocessReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      message:
                        format: string
                        properties: {}
                        type: string
                      success:
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Reprocess Metric Carry Over (Admin Tool)
      tags:
      - Metric Limit Quota
  /merchant/metric/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetric:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                    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: ""
      summary: Delete Merchant Metric
      tags:
      - Metric
  /merchant/metric/detail:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetric:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                    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: ""
      summary: Merchant Metric Detail
      tags:
      - Metric
  /merchant/metric/edit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetric:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                    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: ""
      summary: Edit Merchant Metric
      tags:
      - Metric
  /merchant/metric/event/current_value:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.EventCurrentValueReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      currentValue:
                        format: int64
                        properties: {}
                        type: integer
                      metricLimit:
                        $ref: '#/components/schemas/unibee.api.bean.detail.PlanMetricLimitDetail'
                      totalLimit:
                        description: Total limit for the metric. Returns -1 if metric
                          is not limit type.
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Merchant Metric Event Current Value
      tags:
      - Metric Event
  /merchant/metric/event/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.DeleteEventReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Del Merchant Metric Event
      tags:
      - Metric Event
  /merchant/metric/event/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.NewEventReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetricEvent:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantMetricEvent'
                    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: ""
      summary: New Merchant Metric Event
      tags:
      - Metric Event
  /merchant/metric/event_list:
    get:
      parameters:
      - description: Filter UserIds, Default All
        in: query
        name: userIds
        schema:
          description: Filter UserIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter MetricIds, Default All
        in: query
        name: metricIds
        schema:
          description: Filter MetricIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter SubscriptionIds, Default All
        in: query
        name: subscriptionIds
        schema:
          description: Filter SubscriptionIds, Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      - description: Sort，user_id|gmt_create，Default gmt_create
        in: query
        name: sortField
        schema:
          description: Sort，user_id|gmt_create，Default gmt_create
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page,Start 0
        in: query
        name: page
        schema:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
      - description: Count OF Page
        in: query
        name: count
        schema:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: When set, list events for this invoice period (match subscription_period_start/end
          with invoice PeriodStart/PeriodEnd); overrides CreateTimeStart/CreateTimeEnd
          for period scope
        in: query
        name: invoiceId
        schema:
          description: When set, list events for this invoice period (match subscription_period_start/end
            with invoice PeriodStart/PeriodEnd); overrides CreateTimeStart/CreateTimeEnd
            for period scope
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      events:
                        description: User Metric Event List
                        format: '[]*detail.MerchantMetricEventDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricEventDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Metric Event List
      tags:
      - Metric Event
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.EventListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      events:
                        description: User Metric Event List
                        format: '[]*detail.MerchantMetricEventDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricEventDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Metric Event List
      tags:
      - Metric Event
  /merchant/metric/limit_adjust:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.MetricLimitAdjustReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      success:
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Manual Adjust Metric Limit
      tags:
      - Metric Limit Quota
  /merchant/metric/limit_adjust_batch:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.MetricLimitAdjustBatchReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      duplicateCount:
                        format: int
                        properties: {}
                        type: integer
                      failedCount:
                        format: int
                        properties: {}
                        type: integer
                      processedCount:
                        format: int
                        properties: {}
                        type: integer
                      requestId:
                        format: string
                        properties: {}
                        type: string
                      results:
                        format: '[]*metric.MetricLimitAdjustBatchItemResult'
                        items:
                          $ref: '#/components/schemas/unibee.api.merchant.metric.MetricLimitAdjustBatchItemResult'
                        properties: {}
                        type: array
                      status:
                        format: string
                        properties: {}
                        type: string
                      success:
                        format: bool
                        properties: {}
                        type: boolean
                      successCount:
                        format: int
                        properties: {}
                        type: integer
                      total:
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Batch Manual Adjust Metric Limit
      tags:
      - Metric Limit Quota
  /merchant/metric/list:
    get:
      parameters:
      - description: Search Key, code or name
        in: query
        name: searchKey
        schema:
          description: Search Key, code or name
          format: string
          properties: {}
          type: string
      - description: Sort，user_id|gmt_create，Default gmt_create
        in: query
        name: sortField
        schema:
          description: Sort，user_id|gmt_create，Default gmt_create
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page,Start 0
        in: query
        name: page
        schema:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
      - description: Count OF Page
        in: query
        name: count
        schema:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetrics:
                        description: MerchantMetrics
                        format: '[]*bean.MerchantMetric'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Merchant Metric list
      tags:
      - Metric
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetrics:
                        description: MerchantMetrics
                        format: '[]*bean.MerchantMetric'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Merchant Metric list
      tags:
      - Metric
  /merchant/metric/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetric:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
                    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: ""
      summary: New Merchant Metric
      tags:
      - Metric
  /merchant/metric/plan/limit/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.DeletePlanLimitReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetricPlanLimit:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
                    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: ""
      summary: Delete Merchant Metric Plan TotalLimit
      tags:
      - Metric
  /merchant/metric/plan/limit/edit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.EditPlanLimitReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetricPlanLimit:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
                    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: ""
      summary: Edit Merchant Metric Plan TotalLimit
      tags:
      - Metric
  /merchant/metric/plan/limit/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.metric.NewPlanLimitReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantMetricPlanLimit:
                        $ref: '#/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail'
                    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: ""
      summary: New Merchant Metric Plan TotalLimit
      tags:
      - Metric
  /merchant/metric/user/history/invoices_metric_queryable:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        required: true
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: Optional subscription id to filter by subscription
        in: query
        name: subscriptionId
        schema:
          description: Optional subscription id to filter by subscription
          format: string
          properties: {}
          type: string
      - description: Page, start 0
        in: query
        name: page
        schema:
          description: Page, start 0
          format: int
          properties: {}
          type: integer
      - description: Count per page
        in: query
        name: count
        schema:
          description: Count per page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoices:
                        description: Invoice Detail Object List
                        format: '[]*detail.InvoiceDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.InvoiceDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: List invoices that can be used for metric_by_invoice (paid, subscription
        cycle only)
      tags:
      - User Metric
  /merchant/metric/user/history/metric_by_invoice:
    get:
      parameters:
      - description: The unique id of invoice
        in: query
        name: invoiceId
        required: true
        schema:
          description: The unique id of invoice
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      isLatestPaidInvoice:
                        description: True when current-metric path was used (queried
                          invoice is the subscription's latest paid invoice), false
                          when snapshot or history path was used
                        format: bool
                        properties: {}
                        type: boolean
                      userHistoryMetric:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserHistoryMetric'
                    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: ""
      summary: Query User History Limit Metric By Invoice (History Query Mode, limit_metered
        and limit_recurring only)
      tags:
      - User Metric
  /merchant/metric/user/history/metric_by_subscription:
    get:
      parameters:
      - description: The unique id of subscription (must be non-active subscription
          or non-incomplete subscription)
        in: query
        name: subscriptionId
        required: true
        schema:
          description: The unique id of subscription (must be non-active subscription
            or non-incomplete subscription)
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      userHistoryMetric:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserHistoryMetric'
                    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: ""
      summary: Query User History Limit Metric By Subscription (History Query Mode,
        limit_metered and limit_recurring only, non-active subscription only)
      tags:
      - User Metric
  /merchant/metric/user/metric:
    get:
      parameters:
      - description: UserId, One Of UserId|Email|ExternalUserId Needed
        in: query
        name: userId
        schema:
          description: UserId, One Of UserId|Email|ExternalUserId Needed
          format: int64
          properties: {}
          type: integer
      - description: Email, One Of UserId|Email|ExternalUserId Needed
        in: query
        name: email
        schema:
          description: Email, One Of UserId|Email|ExternalUserId Needed
          format: string
          properties: {}
          type: string
      - description: ExternalUserId, One Of UserId|Email|ExternalUserId Needed
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, One Of UserId|Email|ExternalUserId Needed
          format: string
          properties: {}
          type: string
      - description: Id of product, default product will use if productId not specified
          and subscriptionId is blank
        in: query
        name: productId
        schema:
          description: Id of product, default product will use if productId not specified
            and subscriptionId is blank
          format: int64
          properties: {}
          type: integer
      - in: query
        name: reloadCache
        schema:
          format: bool
          properties: {}
          type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      userMetric:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserMetric'
                    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: ""
      summary: Query User Metric
      tags:
      - User Metric
  /merchant/metric/user/sub/metric:
    get:
      parameters:
      - description: SubscriptionId
        in: query
        name: subscriptionId
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      - in: query
        name: reloadCache
        schema:
          format: bool
          properties: {}
          type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      userMetric:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserMetric'
                    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: ""
      summary: Query User Metric By Subscription
      tags:
      - User Metric
  /merchant/new_apikey:
    post:
      description: Generate new apikey, The old one expired in one hour
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.NewApiKeyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      apiKey:
                        description: ApiKey
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Generate New APIKey
      tags:
      - Merchant
  /merchant/overview_statistics:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      activePlansCount:
                        description: Number of active plans
                        format: int64
                        properties: {}
                        type: integer
                      paymentSuccessRate:
                        description: Payment success rate, range 0.0~1.0
                        format: float64
                        properties: {}
                        type: number
                      successfulPaymentsCount:
                        description: Successful payments count
                        format: int64
                        properties: {}
                        type: integer
                      totalCustomersCount:
                        description: Total customers count
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Merchant Overview Statistics
      tags:
      - Merchant
  /merchant/payment/cancel:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.CancelReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Cancel Payment
      tags:
      - Payment
  /merchant/payment/capture:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.CaptureReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Capture Payment
      tags:
      - Payment
  /merchant/payment/detail:
    get:
      parameters:
      - description: The unique id of payment
        in: query
        name: paymentId
        required: true
        schema:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentDetail:
                        $ref: '#/components/schemas/unibee.api.bean.detail.PaymentDetail'
                    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: ""
      summary: Payment Detail
      tags:
      - Payment
  /merchant/payment/external_gateway_payment/mark_failed:
    post:
      description: 'Mark payment as failed using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.ExternalGatewayPaymentMarkFailedReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: The related UniBee invoiceId
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: The UniBee paymentId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. failed
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Mark External Gateway Payment As Failed
      tags:
      - Payment
  /merchant/payment/external_gateway_payment/mark_paid:
    post:
      description: 'Mark payment as paid using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.ExternalGatewayPaymentMarkPaidReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: The related UniBee invoiceId
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: The UniBee paymentId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                      subscriptionId:
                        description: The related UniBee subscriptionId (if any)
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Mark External Gateway Payment As Paid
      tags:
      - Payment
  /merchant/payment/external_gateway_payment/update_link:
    post:
      description: 'Update external checkout link for a payment. Auth: OpenAPI + signature
        (HMAC-SHA256, hex).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.ExternalGatewayPaymentUpdateLinkReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: The related UniBee invoiceId
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: The UniBee paymentId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Update External Gateway Payment Link
      tags:
      - Payment
  /merchant/payment/external_gateway_refund/mark_failed:
    post:
      description: 'Mark refund as failed using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.ExternalGatewayRefundMarkFailedReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentId:
                        description: The related UniBee paymentId
                        format: string
                        properties: {}
                        type: string
                      refundId:
                        description: The UniBee refundId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. failed
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Mark External Gateway Refund As Failed
      tags:
      - Payment
  /merchant/payment/external_gateway_refund/mark_success:
    post:
      description: 'Mark refund as success using external gateway result. Auth: OpenAPI
        + signature (HMAC-SHA256, hex).'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.ExternalGatewayRefundMarkSuccessReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentId:
                        description: The related UniBee paymentId
                        format: string
                        properties: {}
                        type: string
                      refundId:
                        description: The UniBee refundId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Result status, e.g. success
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Mark External Gateway Refund As Success
      tags:
      - Payment
  /merchant/payment/item/list:
    get:
      parameters:
      - description: Filter UserId, Default All
        in: query
        name: userId
        schema:
          description: Filter UserId, Default All
          format: int64
          properties: {}
          type: integer
      - description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
          gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page,Start 0
        in: query
        name: page
        schema:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentItems:
                        description: Payment Item Object List
                        format: '[]*bean.PaymentItem'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PaymentItem'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get OneTime Payment Item List
      tags:
      - Payment
  /merchant/payment/list:
    get:
      parameters:
      - description: The filter unique id of gateway
        in: query
        name: gatewayId
        schema:
          description: The filter unique id of gateway
          format: int64
          properties: {}
          type: integer
      - description: The filter userid of payment
        in: query
        name: userId
        schema:
          description: The filter userid of payment
          format: int64
          properties: {}
          type: integer
      - description: The filter email of payment
        in: query
        name: email
        schema:
          description: The filter email of payment
          format: string
          properties: {}
          type: string
      - description: The filter status of payment, 10-Created|20-Success|30-Failed|40-Cancelled
        in: query
        name: status
        schema:
          description: The filter status of payment, 10-Created|20-Success|30-Failed|40-Cancelled
          format: int
          properties: {}
          type: integer
      - description: The filter currency of payment
        in: query
        name: currency
        schema:
          description: The filter currency of payment
          format: string
          properties: {}
          type: string
      - description: The filter country code of payment
        in: query
        name: countryCode
        schema:
          description: The filter country code of payment
          format: string
          properties: {}
          type: string
      - description: Sort Field，user_id|create_time|status
        in: query
        name: sortField
        schema:
          description: Sort Field，user_id|create_time|status
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentDetails:
                        description: Payment Detail Object List
                        format: '[]*detail.PaymentDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.PaymentDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Payment List
      tags:
      - Payment
  /merchant/payment/method_delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.MethodDeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Payment Method
      tags:
      - Payment
  /merchant/payment/method_get:
    get:
      description: The method of payment gateway
      parameters:
      - description: The unique id of gateway
        in: query
        name: gatewayId
        required: true
        schema:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
      - description: The customer's unique id
        in: query
        name: userId
        required: true
        schema:
          description: The customer's unique id
          format: int64
          properties: {}
          type: integer
      - description: The unique id of payment method
        in: query
        name: paymentMethodId
        required: true
        schema:
          description: The unique id of payment method
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      method:
                        $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
                    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: ""
      summary: Payment Method
      tags:
      - Payment
  /merchant/payment/method_list:
    get:
      description: The method list of payment gateway
      parameters:
      - description: The unique id of gateway
        in: query
        name: gatewayId
        required: true
        schema:
          description: The unique id of gateway
          format: int64
          properties: {}
          type: integer
      - description: The id of user
        in: query
        name: userId
        schema:
          description: The id of user
          format: int64
          properties: {}
          type: integer
      - description: The unique id of payment
        in: query
        name: paymentId
        schema:
          description: The unique id of payment
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      methodList:
                        description: Payment Method Object List
                        format: '[]*bean.PaymentMethod'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
                        properties: {}
                        type: array
                    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: ""
      summary: Payment Method List
      tags:
      - Payment
  /merchant/payment/method_new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.MethodNewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      method:
                        $ref: '#/components/schemas/unibee.api.bean.PaymentMethod'
                      url:
                        description: The gateway url to create a new method
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Create New Payment Method
      tags:
      - Payment
  /merchant/payment/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      action:
                        $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
                      externalPaymentId:
                        description: The external unique id of payment
                        format: string
                        properties: {}
                        type: string
                      invoiceId:
                        description: The unique id of invoice
                        format: string
                        properties: {}
                        type: string
                      link:
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: The unique id of payment
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Status, 10-Created|20-Success|30-Failed|40-Cancelled
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: New Payment
      tags:
      - Payment
  /merchant/payment/refund/cancel:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.RefundCancelReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Cancel Payment Refund
      tags:
      - Payment
  /merchant/payment/refund/detail:
    get:
      parameters:
      - description: RefundId
        in: query
        name: refundId
        schema:
          description: RefundId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      refundDetail:
                        $ref: '#/components/schemas/unibee.api.bean.detail.RefundDetail'
                    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: ""
      summary: Payment Refund Detail
      tags:
      - Payment
  /merchant/payment/refund/list:
    get:
      parameters:
      - description: PaymentId
        in: query
        name: paymentId
        required: true
        schema:
          description: PaymentId
          format: string
          properties: {}
          type: string
      - description: Status,10-create|20-success|30-Failed|40-Reverse
        in: query
        name: status
        schema:
          description: Status,10-create|20-success|30-Failed|40-Reverse
          format: int
          properties: {}
          type: integer
      - description: GatewayId
        in: query
        name: gatewayId
        schema:
          description: GatewayId
          format: int64
          properties: {}
          type: integer
      - description: UserId
        in: query
        name: userId
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: Email
        in: query
        name: email
        schema:
          description: Email
          format: string
          properties: {}
          type: string
      - description: Currency
        in: query
        name: currency
        schema:
          description: Currency
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      refundDetails:
                        description: Refund Detail Object List
                        format: '[]*detail.RefundDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.RefundDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Payment Refund List
      tags:
      - Payment
  /merchant/payment/refund/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.NewPaymentRefundReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      externalRefundId:
                        description: ExternalRefundId
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: PaymentId
                        format: string
                        properties: {}
                        type: string
                      refundId:
                        description: RefundId
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Status,10-create|20-success|30-Failed|40-Reverse
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: New Payment Refund
      tags:
      - Payment
  /merchant/payment/timeline/list:
    get:
      parameters:
      - description: Filter UserId, Default All
        in: query
        name: userId
        schema:
          description: Filter UserId, Default All
          format: int64
          properties: {}
          type: integer
      - description: The filter start amount of timeline
        in: query
        name: amountStart
        schema:
          description: The filter start amount of timeline
          format: '*int64'
          properties: {}
          type: integer
      - description: The filter end amount of timeline
        in: query
        name: amountEnd
        schema:
          description: The filter end amount of timeline
          format: '*int64'
          properties: {}
          type: integer
      - description: Search SubscriptionId|InvoiceId|PaymentId|UserId
        in: query
        name: searchKey
        schema:
          description: Search SubscriptionId|InvoiceId|PaymentId|UserId
          format: string
          properties: {}
          type: string
      - description: The filter status, 0-pending, 1-success, 2-failure，3-cancel
        in: query
        name: status
        schema:
          description: The filter status, 0-pending, 1-success, 2-failure，3-cancel
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: The filter timelineType, 0-pay, 1-refund
        in: query
        name: timelineTypes
        schema:
          description: The filter timelineType, 0-pay, 1-refund
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: The filter ids of gateway
        in: query
        name: gatewayIds
        schema:
          description: The filter ids of gateway
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Currency
        in: query
        name: currency
        schema:
          description: Currency
          format: string
          properties: {}
          type: string
      - description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
          gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort，invoice_id|gmt_create|gmt_modify|period_end|total_amount，Default
            gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page,Start 0
        in: query
        name: page
        schema:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: Filter timelines whose invoice includes any of these plan IDs
          (OR)
        in: query
        name: planIds
        schema:
          description: Filter timelines whose invoice includes any of these plan IDs
            (OR)
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by plan tags. Omit or empty tagIds = no tag filter. When
          planIds is also set, results use union OR.
        in: query
        name: planTagFilter
        schema:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
      - description: Filter by whether invoice discount_code is set
        in: query
        name: hasDiscountCode
        schema:
          description: Filter by whether invoice discount_code is set
          format: '*bool'
          properties: {}
          type: boolean
      - description: Filter by exact invoice discount code (case-insensitive)
        in: query
        name: discountCode
        schema:
          description: Filter by exact invoice discount code (case-insensitive)
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentTimeLines:
                        description: Payment TimeLine Object List
                        format: '[]*detail.PaymentTimelineDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.PaymentTimelineDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Payment TimeLine List
      tags:
      - Payment
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.payment.TimeLineListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      paymentTimeLines:
                        description: Payment TimeLine Object List
                        format: '[]*detail.PaymentTimelineDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.PaymentTimelineDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Payment TimeLine List
      tags:
      - Payment
  /merchant/plan/activate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.ActivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Activate Plan
      tags:
      - Plan
  /merchant/plan/active_price_change/confirm:
    post:
      description: Confirm and apply price change for an active plan.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.ActivePriceChangeConfirmReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      activeAffectedSubscriptions:
                        description: Active/processing subscriptions whose future
                          billing will be affected
                        format: int64
                        properties: {}
                        type: integer
                      newAmount:
                        description: New amount after change
                        format: int64
                        properties: {}
                        type: integer
                      oldAmount:
                        description: Old amount before change
                        format: int64
                        properties: {}
                        type: integer
                      planId:
                        description: Target planId
                        format: int64
                        properties: {}
                        type: integer
                      totalAffectedSubscriptions:
                        description: Total subscriptions that have used or are using
                          this plan (by status set)
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Confirm Active Plan Price Change
      tags:
      - Plan
  /merchant/plan/active_price_change/preview:
    post:
      description: Preview how many subscriptions will be affected if we change price
        of an active plan.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.ActivePriceChangePreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      activeAffectedSubscriptions:
                        description: Active/processing subscriptions whose future
                          billing will be affected
                        format: int64
                        properties: {}
                        type: integer
                      newAmount:
                        description: New amount of plan
                        format: int64
                        properties: {}
                        type: integer
                      oldAmount:
                        description: Current amount of plan
                        format: int64
                        properties: {}
                        type: integer
                      planId:
                        description: Target planId
                        format: int64
                        properties: {}
                        type: integer
                      totalAffectedSubscriptions:
                        description: Total subscriptions that have used or are using
                          this plan (by status set)
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Preview Active Plan Price Change
      tags:
      - Plan
  /merchant/plan/addons_binding:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.AddonsBindingReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                    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: ""
      summary: Addon Binding
      tags:
      - Plan
  /merchant/plan/archive:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.ArchiveReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Archive Plan
      tags:
      - Plan
  /merchant/plan/batch_tag_bind:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.BatchTagBindReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Batch Bind Tags To Plans
      tags:
      - Plan
  /merchant/plan/copy:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.CopyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                    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: ""
      summary: Copy Plan
      tags:
      - Plan
  /merchant/plan/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Plan
      tags:
      - Plan
  /merchant/plan/detail:
    get:
      parameters:
      - description: The Id of plan, either planId or externalPlanId should be set
        in: query
        name: planId
        schema:
          description: The Id of plan, either planId or externalPlanId should be set
          format: int64
          properties: {}
          type: integer
      - description: The ExternalId of plan, either externalPlanId or planId should
          be set
        in: query
        name: externalPlanId
        schema:
          description: The ExternalId of plan, either externalPlanId or planId should
            be set
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
                    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: ""
      summary: Plan Detail
      tags:
      - Plan
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
                    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: ""
      summary: Plan Detail
      tags:
      - Plan
  /merchant/plan/edit:
    post:
      description: 'Edit exist plan, amount|currency|intervalUnit|intervalCount is
        not editable when plan is active '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      tags:
                        description: Current tags bound to the plan
                        format: '[]*bean.Tag'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Tag'
                        properties: {}
                        type: array
                    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: ""
      summary: Edit Plan
      tags:
      - Plan
  /merchant/plan/list:
    get:
      parameters:
      - description: filter id list of plan, default all
        in: query
        name: planIds
        schema:
          description: filter id list of plan, default all
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: filter id list of product, default all product(0) used if not
          specified
        in: query
        name: productIds
        schema:
          description: filter id list of product, default all product(0) used if not
            specified
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: 1-main plan，2-addon plan,3-onetime
        in: query
        name: type
        schema:
          description: 1-main plan，2-addon plan,3-onetime
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter, Default All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive,
          5-HardArchive
        in: query
        name: status
        schema:
          description: Filter, Default All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive,
            5-HardArchive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter, Default All，PublishStatus，1-UnPublished，2-Published
        in: query
        name: publishStatus
        schema:
          description: Filter, Default All，PublishStatus，1-UnPublished，2-Published
          format: int
          properties: {}
          type: integer
      - description: Filter Currency
        in: query
        name: currency
        schema:
          description: Filter Currency
          format: string
          properties: {}
          type: string
      - description: Filter by interval unit (day|week|month|year); ignored when billingIntervalMin
          is provided
        in: query
        name: intervalUnits
        schema:
          description: Filter by interval unit (day|week|month|year); ignored when
            billingIntervalMin is provided
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      - description: Filter by interval count; ignored when billingIntervalMin is
          provided
        in: query
        name: intervalCounts
        schema:
          description: Filter by interval count; ignored when billingIntervalMin is
            provided
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Minimum billing interval in ISO 8601 duration (date part only,
          Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D
        in: query
        name: billingIntervalMin
        schema:
          description: Minimum billing interval in ISO 8601 duration (date part only,
            Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D
          format: string
          properties: {}
          type: string
      - description: Search Key, plan name or description
        in: query
        name: searchKey
        schema:
          description: Search Key, plan name or description
          format: string
          properties: {}
          type: string
      - description: Sort Field，plan_name|gmt_create|gmt_modify，Default gmt_create
        in: query
        name: sortField
        schema:
          description: Sort Field，plan_name|gmt_create|gmt_modify，Default gmt_create
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page, Default 100
        in: query
        name: count
        schema:
          description: Count Of Per Page, Default 100
          format: int
          properties: {}
          type: integer
      - description: Filter plans by plan tags. Omit or empty tagIds = no tag filter.
          When planIds is also set, results use union OR.
        in: query
        name: planTagFilter
        schema:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plans:
                        description: Plans
                        format: '[]*detail.PlanDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Plan List
      tags:
      - Plan
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plans:
                        description: Plans
                        format: '[]*detail.PlanDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.PlanDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Plan List
      tags:
      - Plan
  /merchant/plan/metric_limit_override:
    post:
      description: Insert or override metric limit items of a plan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.MetricLimitOverrideReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      metadataOverrideSuccess:
                        description: Whether metadata override processed successfully
                        format: bool
                        properties: {}
                        type: boolean
                      metricLimitOverrideSuccess:
                        description: Whether metric limits override processed successfully
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Override Metric Limits Of Plan
      tags:
      - Plan
  /merchant/plan/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      tags:
                        description: Current tags bound to the plan
                        format: '[]*bean.Tag'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Tag'
                        properties: {}
                        type: array
                    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: ""
      summary: Create Plan
      tags:
      - Plan
  /merchant/plan/publish:
    post:
      description: Publish plan，a plan will display at user portal when its published
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.PublishReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Publish Plan
      tags:
      - Plan
  /merchant/plan/unpublished:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.plan.UnPublishReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: UnPublish Plan
      tags:
      - Plan
  /merchant/product/activate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.ActivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Activate Product
      tags:
      - Product
  /merchant/product/copy:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.CopyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      product:
                        $ref: '#/components/schemas/unibee.api.bean.Product'
                    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: ""
      summary: Copy Product
      tags:
      - Product
  /merchant/product/delete:
    post:
      description: Product can being deleted when has no plan linked
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Product
      tags:
      - Product
  /merchant/product/detail:
    get:
      parameters:
      - description: ProductId
        in: query
        name: productId
        required: true
        schema:
          description: ProductId
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      product:
                        $ref: '#/components/schemas/unibee.api.bean.Product'
                    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: ""
      summary: Product Detail
      tags:
      - Product
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      product:
                        $ref: '#/components/schemas/unibee.api.bean.Product'
                    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: ""
      summary: Product Detail
      tags:
      - Product
  /merchant/product/edit:
    post:
      description: 'Edit exist product, product is editable for both active and inactive
        status '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      product:
                        $ref: '#/components/schemas/unibee.api.bean.Product'
                    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: ""
      summary: Edit Product
      tags:
      - Product
  /merchant/product/inactivate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.InactiveReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Inactivate Product
      tags:
      - Product
  /merchant/product/list:
    get:
      parameters:
      - description: Filter, Default All，,Status，1-active，2-inactive
        in: query
        name: status
        schema:
          description: Filter, Default All，,Status，1-active，2-inactive
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Sort Field，id|create_time|gmt_modify，Default id
        in: query
        name: sortField
        schema:
          description: Sort Field，id|create_time|gmt_modify，Default id
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start 0
        in: query
        name: page
        schema:
          description: Page, Start 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Per Page
        in: query
        name: count
        schema:
          description: Count Of Per Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      products:
                        description: Product Object List
                        format: '[]*bean.Product'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Product'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Product List
      tags:
      - Product
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      products:
                        description: Product Object List
                        format: '[]*bean.Product'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Product'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Product List
      tags:
      - Product
  /merchant/product/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.product.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      product:
                        $ref: '#/components/schemas/unibee.api.bean.Product'
                    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: ""
      summary: Create Product
      tags:
      - Product
  /merchant/role/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.role.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Role
      tags:
      - Admin Role
  /merchant/role/edit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.role.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Edit Role
      tags:
      - Admin Role
  /merchant/role/list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchantRoles:
                        description: Merchant Roles
                        format: '[]*bean.MerchantRole'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantRole'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Role List
      tags:
      - Admin Role
  /merchant/role/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.role.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: New Role
      tags:
      - Admin Role
  /merchant/search/key_search:
    get:
      parameters:
      - description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
        in: query
        name: searchKey
        schema:
          description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      matchInvoice:
                        description: MatchInvoice
                        format: '[]*bean.Invoice'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Invoice'
                        properties: {}
                        type: array
                      matchUserAccounts:
                        description: MatchUserAccounts
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                      precisionMatchObject:
                        $ref: '#/components/schemas/unibee.api.merchant.search.PrecisionMatchObject'
                    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: ""
      summary: Search
      tags:
      - Search
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.search.SearchReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      matchInvoice:
                        description: MatchInvoice
                        format: '[]*bean.Invoice'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Invoice'
                        properties: {}
                        type: array
                      matchUserAccounts:
                        description: MatchUserAccounts
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                      precisionMatchObject:
                        $ref: '#/components/schemas/unibee.api.merchant.search.PrecisionMatchObject'
                    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: ""
      summary: Search
      tags:
      - Search
  /merchant/session/customer_portal_url:
    get:
      parameters:
      - description: Email, unique, either ExternalUserId&Email or UserId needed
        in: query
        name: email
        schema:
          description: Email, unique, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
      - description: UserId, unique, either ExternalUserId&Email or UserId needed
        in: query
        name: userId
        schema:
          description: UserId, unique, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId, unique, either ExternalUserId&Email or UserId
          needed
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
      - description: Id of product, default product will use if productId not specified
        in: query
        name: productId
        schema:
          description: Id of product, default product will use if productId not specified
          format: int64
          properties: {}
          type: integer
      - description: Id of plan to update
        in: query
        name: planId
        schema:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
      - description: Vat Country Code
        in: query
        name: vatCountryCode
        schema:
          description: Vat Country Code
          format: string
          properties: {}
          type: string
      - description: ReturnUrl
        in: query
        name: returnUrl
        schema:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      - description: CancelUrl
        in: query
        name: cancelUrl
        schema:
          description: CancelUrl
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Customer Portal Url
      tags:
      - Session
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.session.CustomerPortalUrlReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Customer Portal Url
      tags:
      - Session
  /merchant/session/new_session:
    post:
      description: New session for hosted checkout or client portal. You can create
        user and get ClientSession from here, then append it to the checkout link
        (copied from Admin Portal Plan) as a query parameter, e.g. https://cs.unibee.dev/hosted/checkout?planId=253&env=prod&session=${clientSession}
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.session.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      clientSession:
                        description: ClientSession
                        format: string
                        properties: {}
                        type: string
                      clientToken:
                        description: ClientToken
                        format: string
                        properties: {}
                        type: string
                      email:
                        description: Email
                        format: string
                        properties: {}
                        type: string
                      externalUserId:
                        description: ExternalUserId
                        format: string
                        properties: {}
                        type: string
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                      userId:
                        description: UserId
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: New Checkout Session
      tags:
      - Session
  /merchant/session/user_sub_update_url:
    get:
      parameters:
      - description: Email, unique, either ExternalUserId&Email or UserId needed
        in: query
        name: email
        schema:
          description: Email, unique, either ExternalUserId&Email or UserId needed
          format: string
          properties: {}
          type: string
      - description: UserId, unique, either ExternalUserId&Email or UserId needed
        in: query
        name: userId
        schema:
          description: UserId, unique, either ExternalUserId&Email or UserId needed
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId, unique, either ExternalUserId&Email or UserId
          needed
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
      - description: Id of product,default product will use if productId not specified
        in: query
        name: productId
        schema:
          description: Id of product,default product will use if productId not specified
          format: int64
          properties: {}
          type: integer
      - description: Id of plan to update
        in: query
        name: planId
        schema:
          description: Id of plan to update
          format: int64
          properties: {}
          type: integer
      - description: Vat Country Code
        in: query
        name: vatCountryCode
        schema:
          description: Vat Country Code
          format: string
          properties: {}
          type: string
      - description: ReturnUrl
        in: query
        name: returnUrl
        schema:
          description: ReturnUrl
          format: string
          properties: {}
          type: string
      - description: CancelUrl
        in: query
        name: cancelUrl
        schema:
          description: CancelUrl
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get User Subscription Update Page Url
      tags:
      - Session
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.session.NewSubUpdatePageReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      url:
                        description: Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get User Subscription Update Page Url
      tags:
      - Session
  /merchant/setup_multi_currencies:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.SetupMultiCurrenciesReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      multiCurrencyConfigs:
                        description: Merchant's MultiCurrencies
                        format: '[]*bean.MerchantMultiCurrencyConfig'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantMultiCurrencyConfig'
                        properties: {}
                        type: array
                    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: ""
      summary: Multi Currencies Setup
      tags:
      - Merchant
  /merchant/subscription/active_subscription_import:
    post:
      description: Each repetition import overrides existing subscriptions with matching
        ExternalSubscriptionId.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ActiveSubscriptionImportReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                    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: ""
      summary: Active Subscription Import(allows repetition imports)
      tags:
      - Subscription Import
  /merchant/subscription/active_temporarily:
    post:
      description: Subscription active temporarily, status will transmit from pending
        to incomplete
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ActiveTemporarilyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Subscription Active Temporarily
      tags:
      - Subscription Update
  /merchant/subscription/add_new_trial_start:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.AddNewTrialStartReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Append Subscription TrialEnd
      tags:
      - Subscription
  /merchant/subscription/admin_note_list:
    get:
      parameters:
      - description: SubscriptionId
        in: query
        name: subscriptionId
        required: true
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      noteLists:
                        format: '[]*subscription.AdminNoteRo'
                        items:
                          $ref: '#/components/schemas/unibee.api.merchant.subscription.AdminNoteRo'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Subscription Note List
      tags:
      - Subscription Note
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.AdminNoteListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      noteLists:
                        format: '[]*subscription.AdminNoteRo'
                        items:
                          $ref: '#/components/schemas/unibee.api.merchant.subscription.AdminNoteRo'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Subscription Note List
      tags:
      - Subscription Note
  /merchant/subscription/apply_subscription_next_invoice:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ApplySubscriptionNextInvoiceReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      subscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                    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: ""
      summary: Apply Discount Or Premo Credit To Next Invoice
      tags:
      - Subscription
  /merchant/subscription/cancel:
    post:
      description: Cancel subscription immediately, no proration invoice will generate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.CancelReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Cancel Subscription Immediately
      tags:
      - Subscription
  /merchant/subscription/cancel_at_period_end:
    post:
      description: Cancel subscription at period end, the subscription will not turn
        to 'cancelled' at once but will cancelled at period end time, no invoice will
        generate, the flag 'cancelAtPeriodEnd' of subscription will be enabled
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.CancelAtPeriodEndReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Cancel Subscription At Period End
      tags:
      - Subscription
  /merchant/subscription/cancel_last_cancel_at_period_end:
    post:
      description: This action should be request before subscription's period end,
        If subscription's flag 'cancelAtPeriodEnd' is enabled, this action will resume
        it to disable, and subscription will continue cycle recurring seems no cancelAtPeriod
        action be setting
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.CancelLastCancelAtPeriodEndReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Cancel Last Cancel Subscription At Period End
      tags:
      - Subscription
  /merchant/subscription/change_currency:
    post:
      description: Change subscription currency, only available for merchants with
        multi-currency enabled
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ChangeCurrencyReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Change Subscription Currency
      tags:
      - Subscription
  /merchant/subscription/change_due_day:
    post:
      description: Change subscription due day
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ChangeDueDayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Change Subscription Due Day
      tags:
      - Subscription
  /merchant/subscription/change_gateway:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ChangeGatewayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Change Subscription Gateway
      tags:
      - Subscription
  /merchant/subscription/config:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      config:
                        $ref: '#/components/schemas/unibee.api.bean.SubscriptionConfig'
                    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: ""
      summary: Subscription Config
      tags:
      - Subscription Config
  /merchant/subscription/config/update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ConfigUpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      config:
                        $ref: '#/components/schemas/unibee.api.bean.SubscriptionConfig'
                    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: ""
      summary: Update Merchant Subscription Config
      tags:
      - Subscription Config
  /merchant/subscription/create_preview:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.CreatePreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addonParams:
                        description: Addon parameters used to compute the preview.
                        format: '[]*bean.PlanAddonParam'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
                        properties: {}
                        type: array
                      addons:
                        description: Resolved addon plan details included in this
                          preview.
                        format: '[]*bean.PlanAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
                        properties: {}
                        type: array
                      applyPromoCredit:
                        description: Whether promo credit is effectively applied in
                          this preview.
                        format: bool
                        properties: {}
                        type: boolean
                      currency:
                        description: Currency used for this preview.
                        format: string
                        properties: {}
                        type: string
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                      discountAmount:
                        description: Total discount amount applied in this preview,
                          including promo credit if applicable.
                        format: int64
                        properties: {}
                        type: integer
                      discountMessage:
                        description: Human-readable message describing discount application
                          result.
                        format: string
                        properties: {}
                        type: string
                      email:
                        description: Resolved user email used in this preview.
                        format: string
                        properties: {}
                        type: string
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      originAmount:
                        description: Original invoice amount before discounts and
                          promo credit, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      otherActiveSubscriptionId:
                        description: 'other active or incomplete subscription id '
                        format: string
                        properties: {}
                        type: string
                      otherPendingCryptoSubscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      quantity:
                        description: Quantity of the plan used in preview.
                        format: int64
                        properties: {}
                        type: integer
                      recurringDiscountCode:
                        description: Discount code persisted for later billing cycles
                          (e.g. after trial), when applicable.
                        format: string
                        properties: {}
                        type: string
                      subscriptionAmountExcludingTax:
                        description: Total subscription amount excluding tax for the
                          previewed invoice, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      taxAmount:
                        description: Total tax amount for the previewed invoice, in
                          minor units.
                        format: int64
                        properties: {}
                        type: integer
                      taxPercentage:
                        description: Effective tax percentage applied in this preview,
                          in basis points (e.g. 1000 = 10%%).
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        description: Final payable amount for the previewed invoice,
                          including tax and after discounts, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      trialEnd:
                        description: trial_end, utc time
                        format: int64
                        properties: {}
                        type: integer
                      userId:
                        description: Resolved user ID used in this preview.
                        format: int64
                        properties: {}
                        type: integer
                      vatCountryCode:
                        description: Country code used for VAT calculation.
                        format: string
                        properties: {}
                        type: string
                      vatCountryName:
                        description: Country name used for VAT calculation, when available.
                        format: string
                        properties: {}
                        type: string
                      vatNumber:
                        description: VAT number used in this preview, if any.
                        format: string
                        properties: {}
                        type: string
                      vatNumberValidate:
                        $ref: '#/components/schemas/unibee.api.bean.ValidResult'
                      vatNumberValidateMessage:
                        description: Human-readable message for VAT number validation
                          result.
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Create Subscription Preview
      tags:
      - Subscription
  /merchant/subscription/create_submit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.CreateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      action:
                        $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
                      invoiceId:
                        description: ID of the first invoice generated for this subscription.
                        format: string
                        properties: {}
                        type: string
                      link:
                        description: Hosted payment or invoice link. When paid=false,
                          redirect the customer to this link to complete payment.
                        format: string
                        properties: {}
                        type: string
                      otherPendingCryptoSubscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                      paid:
                        description: Whether the first invoice has been successfully
                          paid at the time of response.
                        format: bool
                        properties: {}
                        type: boolean
                      paymentId:
                        description: ID of the payment created for the first invoice,
                          if any.
                        format: string
                        properties: {}
                        type: string
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      token:
                        description: Portal authentication token for the user, used
                          by admin portal flows.
                        format: string
                        properties: {}
                        type: string
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: Create Subscription
      tags:
      - Subscription
  /merchant/subscription/detail:
    get:
      parameters:
      - description: SubscriptionId
        in: query
        name: subscriptionId
        required: true
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addonParams:
                        description: AddonParams
                        format: '[]*bean.PlanAddonParam'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
                        properties: {}
                        type: array
                      addons:
                        description: Plan Addon
                        format: '[]*bean.PlanAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
                        properties: {}
                        type: array
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      latestInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      unfinishedSubscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: Subscription Detail
      tags:
      - Subscription
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addonParams:
                        description: AddonParams
                        format: '[]*bean.PlanAddonParam'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonParam'
                        properties: {}
                        type: array
                      addons:
                        description: Plan Addon
                        format: '[]*bean.PlanAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
                        properties: {}
                        type: array
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      latestInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      unfinishedSubscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: Subscription Detail
      tags:
      - Subscription
  /merchant/subscription/history_subscription_import:
    post:
      description: Each repetition import overrides existing subscriptions with matching
        ExternalSubscriptionId.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.HistorySubscriptionImportReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                    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: ""
      summary: History Subscription Import(Allows repetition imports)
      tags:
      - Subscription Import
  /merchant/subscription/import_proration_base_setup:
    post:
      description: Backfill the historical paid amount (and optional start time) used
        as the upgrade proration credit base. Only allowed when the subscription's
        latest invoice is a paid, zero-amount invoice without any discount (e.g. migrated/imported
        subscriptions). Overwrites any previously injected proration base.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ImportProrationBaseSetupReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoiceId:
                        description: The latest invoice id the proration base was
                          written to
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Setup historical proration base on a zero-amount subscription invoice
      tags:
      - Subscription Import
  /merchant/subscription/list:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
      - description: Search SubscriptionId|Email
        in: query
        name: searchKey
        schema:
          description: Search SubscriptionId|Email
          format: string
          properties: {}
          type: string
      - description: The filter email of subscription user
        in: query
        name: Email
        schema:
          description: The filter email of subscription user
          format: string
          properties: {}
          type: string
      - description: Filter, Default All，Status，1-Pending｜2-Active｜3-Suspend | 4-Cancel
          | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
        in: query
        name: status
        schema:
          description: Filter, Default All，Status，1-Pending｜2-Active｜3-Suspend | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: The currency of subscription
        in: query
        name: currency
        schema:
          description: The currency of subscription
          format: string
          properties: {}
          type: string
      - description: The filter ids of plan
        in: query
        name: planIds
        schema:
          description: The filter ids of plan
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter by plan tags. Omit or empty tagIds = no tag filter. When
          planIds is also set, results use union OR.
        in: query
        name: planTagFilter
        schema:
          $ref: '#/components/schemas/unibee.api.bean.PlanTagFilter'
      - description: The filter ids of product, invalid if planIds is provided
        in: query
        name: productIds
        schema:
          description: The filter ids of product, invalid if planIds is provided
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: The filter start amount of subscription
        in: query
        name: amountStart
        schema:
          description: The filter start amount of subscription
          format: '*int64'
          properties: {}
          type: integer
      - description: The filter end amount of subscription
        in: query
        name: amountEnd
        schema:
          description: The filter end amount of subscription
          format: '*int64'
          properties: {}
          type: integer
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptions:
                        description: Subscriptions
                        format: '[]*detail.SubscriptionDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription List
      tags:
      - Subscription
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptions:
                        description: Subscriptions
                        format: '[]*detail.SubscriptionDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription List
      tags:
      - Subscription
  /merchant/subscription/metadata_update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.UpdateMetadataReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Subscription Metadata
      tags:
      - Subscription Update
  /merchant/subscription/new_admin_note:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.NewAdminNoteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: New Subscription Note
      tags:
      - Subscription Note
  /merchant/subscription/new_onetime_addon_payment:
    post:
      description: Create payment for subscription onetime addon purchase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.OnetimeAddonNewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      link:
                        description: if automatic payment is false, Gateway Link will
                          provided that manual payment needed
                        format: string
                        properties: {}
                        type: string
                      paid:
                        description: true if payment is already successful, false
                          if user still needs to complete gateway payment
                        format: bool
                        properties: {}
                        type: boolean
                      subscriptionOnetimeAddon:
                        $ref: '#/components/schemas/unibee.api.bean.SubscriptionOnetimeAddon'
                    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: ""
      summary: New Subscription Onetime Addon Payment
      tags:
      - Subscription Payment
  /merchant/subscription/new_onetime_addon_preview:
    post:
      description: Preview for subscription onetime addon purchase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.OnetimeAddonPreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addon:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      applyPromoCredit:
                        description: apply promo credit or not
                        format: bool
                        properties: {}
                        type: boolean
                      currency:
                        format: string
                        properties: {}
                        type: string
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                      discountAmount:
                        format: int64
                        properties: {}
                        type: integer
                      discountMessage:
                        format: string
                        properties: {}
                        type: string
                      email:
                        format: string
                        properties: {}
                        type: string
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      originAmount:
                        format: int64
                        properties: {}
                        type: integer
                      quantity:
                        format: int64
                        properties: {}
                        type: integer
                      taxAmount:
                        format: int64
                        properties: {}
                        type: integer
                      taxPercentage:
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        format: int64
                        properties: {}
                        type: integer
                      userId:
                        format: int64
                        properties: {}
                        type: integer
                      vatNumber:
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: New Subscription Onetime Addon Preview
      tags:
      - Subscription Payment
  /merchant/subscription/onetime_addon_purchase_list:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        required: true
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: Filter SubscriptionIds, Default All
        in: query
        name: subscriptionIds
        schema:
          description: Filter SubscriptionIds, Default All
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      - description: Filter AddonIds, Default All
        in: query
        name: addonIds
        schema:
          description: Filter AddonIds, Default All
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Filter Status, Default All，1-Create｜2-Paid｜3-Cancel｜4-Expired
        in: query
        name: status
        schema:
          description: Filter Status, Default All，1-Create｜2-Paid｜3-Cancel｜4-Expired
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: PeriodStart，addon effective period start，UTC timestamp，seconds
        in: query
        name: periodStart
        schema:
          description: PeriodStart，addon effective period start，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: PeriodEnd，addon effective period end，UTC timestamp，seconds
        in: query
        name: periodEnd
        schema:
          description: PeriodEnd，addon effective period end，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptionOnetimeAddons:
                        description: SubscriptionOnetimeAddons
                        format: '[]*detail.SubscriptionOnetimeAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionOnetimeAddonDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Subscription Onetime Addon Purchase History List
      tags:
      - Subscription Payment
  /merchant/subscription/payment/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.NewPaymentReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      action:
                        $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
                      externalPaymentId:
                        description: The external unique id of payment
                        format: string
                        properties: {}
                        type: string
                      link:
                        format: string
                        properties: {}
                        type: string
                      paymentId:
                        description: The unique id of payment
                        format: string
                        properties: {}
                        type: string
                      status:
                        description: Status, 10-Created|20-Success|30-Failed|40-Cancelled
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: New Subscription Payment
      tags:
      - Subscription Payment
  /merchant/subscription/pending_update_detail:
    get:
      parameters:
      - description: SubscriptionPendingUpdateId
        in: query
        name: subscriptionPendingUpdateId
        required: true
        schema:
          description: SubscriptionPendingUpdateId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      SubscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                    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: ""
      summary: Subscription Pending Update Detail
      tags:
      - Subscription Update
  /merchant/subscription/pending_update_list:
    get:
      parameters:
      - description: SubscriptionId
        in: query
        name: subscriptionId
        required: true
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptionPendingUpdateDetails:
                        description: Subscription Pending Update Details
                        format: '[]*detail.SubscriptionPendingUpdateDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription Pending Update List
      tags:
      - Subscription Update
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.PendingUpdateListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptionPendingUpdateDetails:
                        description: Subscription Pending Update Details
                        format: '[]*detail.SubscriptionPendingUpdateDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription Pending Update List
      tags:
      - Subscription Update
  /merchant/subscription/preview_subscription_next_invoice:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId, unique, either ExternalUserId&Email or UserId
          needed if subscriptionId not specified
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed if subscriptionId not specified
          format: string
          properties: {}
          type: string
      - description: default product will use if productId not specified and subscriptionId
          is blank
        in: query
        name: productId
        schema:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
      - description: SubscriptionId
        in: query
        name: subscriptionId
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      subscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                    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: ""
      summary: Subscription Next Invoice Preview
      tags:
      - Subscription
  /merchant/subscription/regenerate_billing_cycle_invoice:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      diff:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff'
                      eligibility:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible'
                      newInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      oldInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                    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: ""
      summary: Regenerate Billing Cycle Invoice
      tags:
      - Subscription
  /merchant/subscription/regenerate_billing_cycle_invoice_preview:
    get:
      parameters:
      - description: SubscriptionId
        in: query
        name: subscriptionId
        required: true
        schema:
          description: SubscriptionId
          format: string
          properties: {}
          type: string
      - description: InvoiceId to regenerate, defaults to subscription latest invoice
        in: query
        name: invoiceId
        schema:
          description: InvoiceId to regenerate, defaults to subscription latest invoice
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      diff:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff'
                      eligibility:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible'
                      newInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      oldInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                    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: ""
      summary: Preview Regenerate Billing Cycle Invoice
      tags:
      - Subscription
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoicePreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      diff:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceDiff'
                      eligibility:
                        $ref: '#/components/schemas/unibee.api.merchant.subscription.RegenerateBillingCycleInvoiceEligible'
                      newInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      oldInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                    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: ""
      summary: Preview Regenerate Billing Cycle Invoice
      tags:
      - Subscription
  /merchant/subscription/renew:
    post:
      description: Manually renew an existing subscription by generating a new recurring
        invoice and payment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.RenewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      action:
                        $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
                      invoiceId:
                        description: ID of the renewal invoice generated by this request.
                        format: string
                        properties: {}
                        type: string
                      link:
                        description: Hosted payment or invoice link. When paid=false,
                          redirect the customer to this link to complete the renewal
                          payment.
                        format: string
                        properties: {}
                        type: string
                      paid:
                        description: Whether the renewal invoice has been successfully
                          paid at the time of response.
                        format: bool
                        properties: {}
                        type: boolean
                      paymentId:
                        description: ID of the payment created for the renewal invoice,
                          if any.
                        format: string
                        properties: {}
                        type: string
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                    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: ""
      summary: Renew Subscription
      tags:
      - Subscription Update
  /merchant/subscription/renew_preview:
    post:
      description: Preview renew invoice of an existing subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.RenewPreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      applyPromoCredit:
                        description: Whether promo credit is effectively applied in
                          this renew preview.
                        format: bool
                        properties: {}
                        type: boolean
                      currency:
                        description: Currency used for the renew preview.
                        format: string
                        properties: {}
                        type: string
                      discountAmount:
                        description: Total discount amount applied to the renew invoice,
                          including promo credit if applicable.
                        format: int64
                        properties: {}
                        type: integer
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      originAmount:
                        description: Original invoice amount before discounts and
                          promo credits for the renew, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      taxAmount:
                        description: Total tax amount applied to the renew invoice,
                          in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        description: Final payable amount for the renew invoice, including
                          tax and after discounts, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Renew Subscription Preview
      tags:
      - Subscription Update
  /merchant/subscription/timeline_list:
    get:
      parameters:
      - description: 'Filter UserId, Default All '
        in: query
        name: userId
        schema:
          description: 'Filter UserId, Default All '
          format: int64
          properties: {}
          type: integer
      - description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
        in: query
        name: sortField
        schema:
          description: Sort Field，gmt_create|gmt_modify，Default gmt_modify
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptionTimeLines:
                        description: SubscriptionTimeLines
                        format: '[]*detail.SubscriptionTimeLineDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionTimeLineDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription TimeLine List
      tags:
      - Subscription Timeline
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.TimeLineListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscriptionTimeLines:
                        description: SubscriptionTimeLines
                        format: '[]*detail.SubscriptionTimeLineDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionTimeLineDetail'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Subscription TimeLine List
      tags:
      - Subscription Timeline
  /merchant/subscription/update_preview:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.UpdatePreviewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      applyPromoCredit:
                        description: Whether promo credit is effectively applied in
                          this update preview.
                        format: bool
                        properties: {}
                        type: boolean
                      currency:
                        description: Currency used for the update preview.
                        format: string
                        properties: {}
                        type: string
                      discount:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantDiscountCode'
                      discountAmount:
                        description: Total discount amount applied to the update invoice,
                          including promo credit if applicable.
                        format: int64
                        properties: {}
                        type: integer
                      discountMessage:
                        description: Human-readable message describing discount application
                          result for the update.
                        format: string
                        properties: {}
                        type: string
                      invoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      nextPeriodInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      originAmount:
                        description: Original invoice amount before discounts and
                          promo credit for the update, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                      prorationDate:
                        description: Effective proration start time used in this preview,
                          as UTC timestamp (seconds).
                        format: int64
                        properties: {}
                        type: integer
                      totalAmount:
                        description: Final payable amount for the update invoice,
                          including tax and after discounts, in minor units.
                        format: int64
                        properties: {}
                        type: integer
                    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: ""
      summary: Update Subscription Preview
      tags:
      - Subscription Update
  /merchant/subscription/update_submit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.UpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      action:
                        $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
                      invoiceId:
                        description: ID of the invoice generated by this update (proration
                          or next-period invoice, depending on effectImmediate).
                        format: string
                        properties: {}
                        type: string
                      link:
                        description: Hosted payment or invoice link. When paid=false
                          and an invoice exists, redirect the customer to this link
                          to complete payment.
                        format: string
                        properties: {}
                        type: string
                      note:
                        description: Additional message describing the update result,
                          used for internal or merchant-facing explanations.
                        format: string
                        properties: {}
                        type: string
                      paid:
                        description: Whether the update invoice has been successfully
                          paid at the time of response.
                        format: bool
                        properties: {}
                        type: boolean
                      paymentId:
                        description: ID of the payment created for the update invoice,
                          if any.
                        format: string
                        properties: {}
                        type: string
                      subscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                    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: ""
      summary: Update Subscription
      tags:
      - Subscription Update
  /merchant/subscription/user_pending_crypto_subscription_detail:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId, unique, either ExternalUserId&Email or UserId
          needed
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
      - description: default product will use if productId not specified and subscriptionId
          is blank
        in: query
        name: productId
        schema:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                    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: ""
      summary: User Pending Crypto Subscription Detail
      tags:
      - Subscription
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.UserPendingCryptoSubscriptionDetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionDetail'
                    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: ""
      summary: User Pending Crypto Subscription Detail
      tags:
      - Subscription
  /merchant/subscription/user_subscription_detail:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        schema:
          description: UserId
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId, unique, either ExternalUserId&Email or UserId
          needed
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId, unique, either ExternalUserId&Email or UserId
            needed
          format: string
          properties: {}
          type: string
      - description: default product will use if productId not specified and subscriptionId
          is blank
        in: query
        name: productId
        schema:
          description: default product will use if productId not specified and subscriptionId
            is blank
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addons:
                        description: Plan Addon
                        format: '[]*bean.PlanAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
                        properties: {}
                        type: array
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      latestInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      unfinishedSubscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: User Subscription Detail
      tags:
      - Subscription
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.subscription.UserSubscriptionDetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addons:
                        description: Plan Addon
                        format: '[]*bean.PlanAddonDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.PlanAddonDetail'
                        properties: {}
                        type: array
                      gateway:
                        $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
                      latestInvoice:
                        $ref: '#/components/schemas/unibee.api.bean.Invoice'
                      plan:
                        $ref: '#/components/schemas/unibee.api.bean.Plan'
                      subscription:
                        $ref: '#/components/schemas/unibee.api.bean.Subscription'
                      unfinishedSubscriptionPendingUpdate:
                        $ref: '#/components/schemas/unibee.api.bean.detail.SubscriptionPendingUpdateDetail'
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: User Subscription Detail
      tags:
      - Subscription
  /merchant/tag/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.tag.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Tag
      tags:
      - Tag
  /merchant/tag/detail:
    get:
      parameters:
      - in: query
        name: tagId
        required: true
        schema:
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      planIds:
                        description: Current plan ids bound to this tag
                        format: '[]int64'
                        items:
                          format: int64
                          properties: {}
                          type: integer
                        properties: {}
                        type: array
                      tag:
                        $ref: '#/components/schemas/unibee.api.bean.Tag'
                    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: ""
      summary: Tag Detail
      tags:
      - Tag
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.tag.DetailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      planIds:
                        description: Current plan ids bound to this tag
                        format: '[]int64'
                        items:
                          format: int64
                          properties: {}
                          type: integer
                        properties: {}
                        type: array
                      tag:
                        $ref: '#/components/schemas/unibee.api.bean.Tag'
                    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: ""
      summary: Tag Detail
      tags:
      - Tag
  /merchant/tag/edit:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.tag.EditReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      tag:
                        $ref: '#/components/schemas/unibee.api.bean.Tag'
                    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: ""
      summary: Edit Tag
      tags:
      - Tag
  /merchant/tag/list:
    get:
      parameters:
      - description: 0-plan
        in: query
        name: scope
        required: true
        schema:
          description: 0-plan
          format: int
          properties: {}
          type: integer
      - in: query
        name: searchKey
        schema:
          format: string
          properties: {}
          type: string
      - description: Page, start 0
        in: query
        name: page
        schema:
          description: Page, start 0
          format: int
          properties: {}
          type: integer
      - description: Count per page, default 100
        in: query
        name: count
        schema:
          description: Count per page, default 100
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      tags:
                        format: '[]*bean.Tag'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Tag'
                        properties: {}
                        type: array
                      total:
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Tag List
      tags:
      - Tag
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.tag.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      tags:
                        format: '[]*bean.Tag'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.Tag'
                        properties: {}
                        type: array
                      total:
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Tag List
      tags:
      - Tag
  /merchant/tag/new:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.tag.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      tag:
                        $ref: '#/components/schemas/unibee.api.bean.Tag'
                    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: ""
      summary: Create Tag
      tags:
      - Tag
  /merchant/track/setup_segment:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.track.SetupSegmentReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Segment Setup
      tags:
      - Gateway
  /merchant/update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.UpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      merchant:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantProfile'
                    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: ""
      summary: Update Profile
      tags:
      - Merchant
  /merchant/update_cname_domain:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.UpdateCnameDomainReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Merchant CNAME Domain
      tags:
      - Merchant
  /merchant/update_portal_host_domain:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.profile.UpdatePortalHostReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Profile Portal Host Domain
      tags:
      - Merchant
  /merchant/user/admin_note_list:
    get:
      parameters:
      - description: The id of user, either ExternalUserId or UserId needed
        in: query
        name: userId
        required: true
        schema:
          description: The id of user, either ExternalUserId or UserId needed
          format: int64
          properties: {}
          type: integer
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      noteLists:
                        format: '[]*detail.UserAdminNoteDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAdminNoteDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: Get User Admin Note List
      tags:
      - User
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.AdminNoteListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      noteLists:
                        format: '[]*detail.UserAdminNoteDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAdminNoteDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: Get User Admin Note List
      tags:
      - User
  /merchant/user/change_email:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.ChangeEmailReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Change User Email
      tags:
      - User
  /merchant/user/change_gateway:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.ChangeGatewayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Change User Default Gateway
      tags:
      - User
  /merchant/user/clear_auto_charge_method:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.ClearAutoChargeMethodReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Clear AutoCharge Method
      tags:
      - User
  /merchant/user/count:
    get:
      parameters:
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: User Count
      tags:
      - User
  /merchant/user/delete:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.DeleteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete User
      tags:
      - User
  /merchant/user/get:
    get:
      parameters:
      - description: UserId
        in: query
        name: userId
        required: true
        schema:
          description: UserId
          format: int64
          properties: {}
          required:
          - "true"
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                    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: ""
      summary: Get User Profile
      tags:
      - User
  /merchant/user/list:
    get:
      parameters:
      - description: Filter UserId
        in: query
        name: userId
        schema:
          description: Filter UserId
          format: int64
          properties: {}
          type: integer
      - description: ExternalUserId
        in: query
        name: externalUserId
        schema:
          description: ExternalUserId
          format: string
          properties: {}
          type: string
      - description: Search FirstName
        in: query
        name: firstName
        schema:
          description: Search FirstName
          format: string
          properties: {}
          type: string
      - description: Search LastName
        in: query
        name: lastName
        schema:
          description: Search LastName
          format: string
          properties: {}
          type: string
      - description: Search Filter Email
        in: query
        name: email
        schema:
          description: Search Filter Email
          format: string
          properties: {}
          type: string
      - description: Search FirstName|LastName|Email|Phone|Address|ExternalUserId
        in: query
        name: searchKey
        schema:
          description: Search FirstName|LastName|Email|Phone|Address|ExternalUserId
          format: string
          properties: {}
          type: string
      - description: PlanIds, Search Filter PlanIds
        in: query
        name: planIds
        schema:
          description: PlanIds, Search Filter PlanIds
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: GatewayIds, Search Filter GatewayIds
        in: query
        name: gatewayIds
        schema:
          description: GatewayIds, Search Filter GatewayIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Search Filter SubscriptionId
        in: query
        name: subscriptionId
        schema:
          description: Search Filter SubscriptionId
          format: string
          properties: {}
          type: string
      - description: Filter, Default All，1-Pending｜2-Active｜3-Suspend | 4-Cancel |
          5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
        in: query
        name: subStatus
        schema:
          description: Filter, Default All，1-Pending｜2-Active｜3-Suspend | 4-Cancel
            | 5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Status, 0-Active｜2-Frozen
        in: query
        name: status
        schema:
          description: Status, 0-Active｜2-Frozen
          format: '[]int'
          items:
            format: int
            properties: {}
            type: integer
          properties: {}
          type: array
      - description: Deleted Involved，Need Admin
        in: query
        name: deleteInclude
        schema:
          description: Deleted Involved，Need Admin
          format: bool
          properties: {}
          type: boolean
      - description: Sort，user_id|gmt_create|email|user_name|subscription_name|subscription_status|payment_method|recurring_amount|billing_type，Default
          gmt_create
        in: query
        name: sortField
        schema:
          description: Sort，user_id|gmt_create|email|user_name|subscription_name|subscription_status|payment_method|recurring_amount|billing_type，Default
            gmt_create
          format: string
          properties: {}
          type: string
      - description: Sort Type，asc|desc，Default desc
        in: query
        name: sortType
        schema:
          description: Sort Type，asc|desc，Default desc
          format: string
          properties: {}
          type: string
      - description: Page,Start 0
        in: query
        name: page
        schema:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
      - description: Count OF Page
        in: query
        name: count
        schema:
          description: Count OF Page
          format: int
          properties: {}
          type: integer
      - description: CreateTimeStart，UTC timestamp，seconds
        in: query
        name: createTimeStart
        schema:
          description: CreateTimeStart，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      - description: CreateTimeEnd，UTC timestamp，seconds
        in: query
        name: createTimeEnd
        schema:
          description: CreateTimeEnd，UTC timestamp，seconds
          format: int64
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                      userAccounts:
                        description: User Account Object List
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: User List
      tags:
      - User
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.ListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                      userAccounts:
                        description: User Account Object List
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: User List
      tags:
      - User
  /merchant/user/new:
    post:
      description: 'User Creation If Not Exist '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.NewReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.UserAccount'
                    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: ""
      summary: New User
      tags:
      - User
  /merchant/user/new_admin_note:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.NewAdminNoteReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: New Admin Note
      tags:
      - User
  /merchant/user/resume_user:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.ReleaseReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Resume User
      tags:
      - User
  /merchant/user/search:
    get:
      parameters:
      - description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
        in: query
        name: searchKey
        schema:
          description: SearchKey, Will Search UserId|Email|UserName|CompanyName|SubscriptionId|VatNumber|InvoiceId||PaymentId
          format: string
          properties: {}
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      userAccounts:
                        description: UserAccounts
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: User Search
      tags:
      - User
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.SearchReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      userAccounts:
                        description: UserAccounts
                        format: '[]*detail.UserAccountDetail'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                        properties: {}
                        type: array
                    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: ""
      summary: User Search
      tags:
      - User
  /merchant/user/suspend_user:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.FrozenReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Suspend User
      tags:
      - User
  /merchant/user/update:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.UpdateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                    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: ""
      summary: Update User Profile
      tags:
      - User
  /merchant/user/update_external_user_id:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.UpdateExternalUserIdReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      user:
                        $ref: '#/components/schemas/unibee.api.bean.detail.UserAccountDetail'
                    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: ""
      summary: Update User ExternalUserId
      tags:
      - User
  /merchant/vat/country_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      vatCountryList:
                        description: VatCountryList
                        format: '[]*bean.VatCountryRate'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.VatCountryRate'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Vat Country List
      tags:
      - Vat Gateway
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.CountryListReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      vatCountryList:
                        description: VatCountryList
                        format: '[]*bean.VatCountryRate'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.VatCountryRate'
                        properties: {}
                        type: array
                    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: ""
      summary: Get Vat Country List
      tags:
      - Vat Gateway
  /merchant/vat/init_default_gateway:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.InitDefaultGatewayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Init Default Vat Gateway
      tags:
      - Vat Gateway
  /merchant/vat/setup_gateway:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.SetupGatewayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      data:
                        description: The hide star data
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Vat Gateway Setup
      tags:
      - Vat Gateway
  /merchant/vat/setup_global_us_vat_config:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.SetupGlobalUSVATConfigReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: US Vat Config Setup
      tags:
      - Vat Gateway
  /merchant/vat/setup_us_vat_gateway:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.SetupUSVATGatewayReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: US Vat Gateway Setup
      tags:
      - Vat Gateway
  /merchant/vat/us_vat_category_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      categoryList:
                        description: CategoryList
                        format: '[]*bean.USVATGatewayProductTaxCode'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.USVATGatewayProductTaxCode'
                        properties: {}
                        type: array
                    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: ""
      summary: Get US Vat Category List
      tags:
      - Vat Gateway
  /merchant/vat/us_vat_upload_history_list:
    get:
      parameters:
      - description: Invoice Id
        in: query
        name: invoiceId
        schema:
          description: Invoice Id
          format: string
          properties: {}
          type: string
      - description: GatewayName, em. TaxJar
        in: query
        name: gatewayName
        schema:
          description: GatewayName, em. TaxJar
          format: string
          properties: {}
          type: string
      - description: UploadType, PaymentUpload or RefundUpload, default both
        in: query
        name: uploadType
        schema:
          description: UploadType, PaymentUpload or RefundUpload, default both
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      historyList:
                        description: HistoryList
                        format: '[]*bean.MerchantUsVatGatewayCalculateHistory'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantUsVatGatewayCalculateHistory'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get US VAT Upload History List
      tags:
      - Webhook
  /merchant/vat/us_vat_validate_address:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.USVATValidateAddressReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      addresses:
                        format: '[]*bean.USAddress'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.USAddress'
                        properties: {}
                        type: array
                    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: ""
      summary: Validate US Vat Address
      tags:
      - Vat Gateway
  /merchant/vat/vat_number_validate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.NumberValidateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      vatNumberValidate:
                        $ref: '#/components/schemas/unibee.api.bean.ValidResult'
                    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: ""
      summary: Vat Number Validation
      tags:
      - Vat Gateway
  /merchant/vat/vat_number_validate_history:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.NumberValidateHistoryReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      numberValidateHistoryList:
                        description: NumberValidateHistoryList
                        format: '[]*bean.MerchantVatNumberVerifyHistory'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantVatNumberVerifyHistory'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Vat Number Validation History
      tags:
      - Vat Gateway
  /merchant/vat/vat_number_validate_history_activate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.NumberValidateHistoryActivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Vat Number Validation History Activate
      tags:
      - Vat Gateway
  /merchant/vat/vat_number_validate_history_deactivate:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.vat.NumberValidateHistoryDeactivateReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Vat Number Validation History Deactivate
      tags:
      - Vat Gateway
  /merchant/webhook/delete_endpoint:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.DeleteEndpointReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Delete Webhook Endpoint
      tags:
      - Webhook
  /merchant/webhook/endpoint_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      endpointList:
                        description: EndpointList
                        format: '[]*bean.MerchantWebhookEndpoint'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantWebhookEndpoint'
                        properties: {}
                        type: array
                      zapierCredential:
                        $ref: '#/components/schemas/unibee.api.bean.MerchantZapierCredential'
                    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: ""
      summary: Get Webhook Endpoint list
      tags:
      - Webhook
  /merchant/webhook/endpoint_log_list:
    get:
      parameters:
      - description: EndpointId
        in: query
        name: endpointId
        required: true
        schema:
          description: EndpointId
          format: int64
          properties: {}
          type: integer
      - description: Page, Start With 0
        in: query
        name: page
        schema:
          description: Page, Start With 0
          format: int
          properties: {}
          type: integer
      - description: Count Of Page
        in: query
        name: count
        schema:
          description: Count Of Page
          format: int
          properties: {}
          type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      endpointLogList:
                        description: EndpointLogList
                        format: '[]*bean.MerchantWebhookLog'
                        items:
                          $ref: '#/components/schemas/unibee.api.bean.MerchantWebhookLog'
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    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: ""
      summary: Get Webhook Endpoint Log List
      tags:
      - Webhook
  /merchant/webhook/event_list:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      eventList:
                        description: EventList
                        format: '[]string'
                        items:
                          format: string
                          properties: {}
                          type: string
                        properties: {}
                        type: array
                    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: ""
      summary: Webhook Event List
      tags:
      - Webhook
  /merchant/webhook/get_webhook_secret:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      secret:
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Webhook Secret
      tags:
      - Webhook
  /merchant/webhook/new_endpoint:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.NewEndpointReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: New Webhook Endpoint
      tags:
      - Webhook
  /merchant/webhook/remove_webhook_zapier_connect:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.RemoveWebhookZapierConnectReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Remove Webhook Zapier Connnect
      tags:
      - Webhook
  /merchant/webhook/resend:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.ResendWebhookReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      sendResult:
                        description: SendResult
                        format: bool
                        properties: {}
                        type: boolean
                    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: ""
      summary: Resent Webhook
      tags:
      - Webhook
  /merchant/webhook/update_endpoint:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.UpdateEndpointReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties: {}
                    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: ""
      summary: Update Webhook Endpoint
      tags:
      - Webhook
  /merchant/webhook/webhook_zapier_connect_url:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.webhook.GetWebhookZapierConnectURLReq'
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      zapierConnectUrl:
                        description: Zapier Connect Url
                        format: string
                        properties: {}
                        type: string
                    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: ""
      summary: Get Webhook Zapier Connect Url
      tags:
      - Webhook
security:
- Authorization: []
servers:
  - url: https://api.unibee.dev
  - url: https://api-sandbox.unibee.top
