> ## 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:202603161017
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
        gatewayIds:
          description: The filter ids of gateway
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        page:
          description: Page,Start 0
          format: int
          properties: {}
          type: integer
        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:
          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
        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
        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.Payment:
      properties:
        action:
          $ref: '#/components/schemas/github.com.gogf.gf.v2.encoding.gjson.Json'
        authorizeComment:
          format: string
          properties: {}
          type: string
        authorizeReason:
          format: string
          properties: {}
          type: string
        authorizeStatus:
          description: >-
            authorize status，0-waiting
            authorize，1-authorized，2-authorized_request
          format: int
          properties: {}
          type: integer
        autoCharge:
          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:
          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: last 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.Refund:
      properties:
        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
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````