> ## 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.

# Credit Account Detail

## Endpoint Overview

**GET** `https://api.unibee.dev/merchant/credit/detail`

Credit Account Detail

***

## 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.

### Query parameters

| Name | Type    | Required | Description           |
| ---- | ------- | -------- | --------------------- |
| `id` | integer | Yes      | The credit account Id |

***

## Request examples

### cURL

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

### Sandbox

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

***

## Response

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

| Field                     | Type    | Description                  |
| ------------------------- | ------- | ---------------------------- |
| `code`                    | integer | Response code. `0` = success |
| `data`                    | object  | Response payload             |
| `data.creditAccount`      | object  |                              |
| `data.creditTransactions` | array   | Credit Transaction List      |
| `message`                 | string  | Human-readable message       |
| `requestId`               | string  | Request ID for support       |

***

## Error handling

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

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


## OpenAPI

````yaml get /merchant/credit/detail
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/credit/detail:
    get:
      tags:
        - Credit
      summary: Credit Account Detail
      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: ''
components:
  schemas:
    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.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.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
    interface:
      properties: {}
      type: object
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````