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

# Get Payment TimeLine List

## Endpoint Overview

**POST** `https://api.unibee.dev/merchant/payment/timeline/list`

Get Payment TimeLine List

***

## Authorization

All UniBee Merchant API requests require authentication via API key.

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

***

## Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

### Request body

| Name              | Type    | Required | Description                                                                                |
| ----------------- | ------- | -------- | ------------------------------------------------------------------------------------------ |
| `amountEnd`       | integer | No       | The filter end amount of timeline                                                          |
| `amountStart`     | integer | No       | The filter start amount of timeline                                                        |
| `count`           | integer | No       | Count Of Page                                                                              |
| `createTimeEnd`   | integer | No       | CreateTimeEnd，UTC timestamp，seconds                                                        |
| `createTimeStart` | integer | No       | CreateTimeStart，UTC timestamp，seconds                                                      |
| `currency`        | string  | No       | Currency                                                                                   |
| `gatewayIds`      | array   | No       | The filter ids of gateway                                                                  |
| `page`            | integer | No       | Page,Start 0                                                                               |
| `searchKey`       | string  | No       | Search SubscriptionId\|InvoiceId\|PaymentId\|UserId                                        |
| `sortField`       | string  | No       | Sort，invoice\_id\|gmt\_create\|gmt\_modify\|period\_end\|total\_amount，Default gmt\_modify |
| `sortType`        | string  | No       | Sort Type，asc\|desc，Default desc                                                           |
| `status`          | array   | No       | The filter status, 0-pending, 1-success, 2-failure，3-cancel                                |
| `timelineTypes`   | array   | No       | The filter timelineType, 0-pay, 1-refund                                                   |
| `userId`          | integer | No       | Filter UserId, Default All                                                                 |

***

## Request examples

### cURL

```bash theme={null}
curl -X POST "https://api.unibee.dev/merchant/payment/timeline/list" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amountEnd": 0,
  "amountStart": 0,
  "count": 0,
  "createTimeEnd": 0,
  "createTimeStart": 0,
  "currency": "",
  "gatewayIds": [],
  "page": 0,
  "searchKey": "",
  "sortField": "",
  "sortType": "",
  "status": [],
  "timelineTypes": 0,
  "userId": 0
}'
```

### Sandbox

```bash theme={null}
curl -X POST "https://api-sandbox.unibee.top/merchant/payment/timeline/list" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amountEnd": 0,
  "amountStart": 0,
  "count": 0,
  "createTimeEnd": 0,
  "createTimeStart": 0,
  "currency": "",
  "gatewayIds": [],
  "page": 0,
  "searchKey": "",
  "sortField": "",
  "sortType": "",
  "status": [],
  "timelineTypes": 0,
  "userId": 0
}'
```

***

## Response

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

| Field                   | Type    | Description                  |
| ----------------------- | ------- | ---------------------------- |
| `code`                  | integer | Response code. `0` = success |
| `data`                  | object  | Response payload             |
| `data.paymentTimeLines` | array   | Payment TimeLine Object List |
| `data.total`            | integer | Total                        |
| `message`               | string  | Human-readable message       |
| `requestId`             | string  | Request ID for support       |

***

## Error handling

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

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


## OpenAPI

````yaml post /merchant/payment/timeline/list
openapi: 3.0.0
info:
  description: UniBee Api Server
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: OpenAPI UniBee
  version: daily,buildtime:202607240926
servers:
  - url: https://api.unibee.dev
  - url: https://api-sandbox.unibee.top
security:
  - Authorization: []
paths:
  /merchant/payment/timeline/list:
    post:
      tags:
        - Payment
      summary: Get Payment TimeLine List
      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: ''
components:
  schemas:
    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.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.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.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.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.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
    github.com.gogf.gf.v2.encoding.gjson.Json:
      properties: {}
      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
    interface:
      properties: {}
      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.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.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.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.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.PlanMetricLimitParam:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMetricMeteredChargeParam:
      properties:
        chargeType:
          description: ChargeType,0-standard pricing 1-graduated pricing
          format: int
          properties: {}
          type: integer
        graduatedAmounts:
          description: GraduatedAmounts, used for graduated pricing
          format: '[]*bean.MetricPlanChargeGraduatedStep'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
          properties: {}
          type: array
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        standardAmount:
          description: StandardAmount, cent, used for standard pricing,cent
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: StandardStartValue, used for standard pricing
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMultiCurrency:
      properties:
        amount:
          description: >-
            exchanged amount preview for this plan & currency; plan-level
            override not available in billing logic
          format: int64
          properties: {}
          type: integer
        autoExchange:
          description: >-
            using https://app.exchangerate-api.com/ to update exchange rate if
            true, the exchange APIKey need setup first; plan-level override not
            available
          format: bool
          properties: {}
          type: boolean
        currency:
          description: target currency
          format: string
          properties: {}
          type: string
        disable:
          description: disable currency exchange for this plan & currency
          format: bool
          properties: {}
          type: boolean
        exchangeRate:
          description: >-
            exchange rate; plan-level override not available, real billing FX
            always comes from merchant's multi-currency config
          format: float64
          properties: {}
          type: number
        fixedAmount:
          description: >-
            locked billing amount for this plan & currency; when > 0, locks the
            main plan price only
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMultiTrial:
      properties:
        intervalCount:
          description: >-
            for stage 2+: must be > 0 when intervalUnit is set; for stage 1
            (index 0) used with intervalUnit to set TrialDurationTime at save
          format: int64
          properties: {}
          type: integer
        intervalUnit:
          description: >-
            for stage 2+: billing; for stage 1 (index 0) converted to plan
            TrialDurationTime at save (day/week/month≈30d/year≈365d)
          format: string
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: >-
            optional metadata for this trial stage; persisted to subscription
            multi-trial snapshot and exposed in webhook payloads
          format: map[string]interface {}
          properties: {}
          type: object
        name:
          description: >-
            optional display name for this trial stage; when set, used instead
            of plan name in multi-trial invoices
          format: string
          properties: {}
          type: string
        trialCompareAtPrice:
          description: >-
            optional compare-at / strikethrough display price in minor units
            (plan currency); UI only, not used in billing
          format: int64
          properties: {}
          type: integer
        trialDuration:
          description: >-
            trial duration in seconds; first stage: at least 86400 unless valid
            intervalUnit+intervalCount is set
          format: int64
          properties: {}
          type: integer
        trialPrice:
          description: >-
            trial price; only the first trial is allowed to be 0, subsequent
            trials must be > 0
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.USVATConfig:
      properties:
        active:
          format: bool
          properties: {}
          type: boolean
        fromAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        nexusAddresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
        sellOnUSOnly:
          format: bool
          properties: {}
          type: boolean
        taxCode:
          format: string
          properties: {}
          type: string
        toAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
      type: object
    unibee.api.bean.MetricPlanChargeGraduatedStep:
      properties:
        endValue:
          description: EndValue, -1 = infinity value(∞)
          format: int64
          properties: {}
          type: integer
        flatAmount:
          description: FlatAmount,cent
          format: int64
          properties: {}
          type: integer
        perAmount:
          description: PerAmount,cent
          format: int64
          properties: {}
          type: integer
        startValue:
          description: StartValue
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.USAddress:
      properties:
        address:
          format: string
          properties: {}
          type: string
        city:
          format: string
          properties: {}
          type: string
        countryCode:
          format: string
          properties: {}
          type: string
        state:
          format: string
          properties: {}
          type: string
        verified:
          format: bool
          properties: {}
          type: boolean
        zipCode:
          format: string
          properties: {}
          type: string
      type: object
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````