All Products
Search
Document Center

Expenses and Costs:QueryAccountTransactions

Last Updated:Oct 10, 2026

Queries the transaction records of a user account.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeAcccountTran

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TransactionNumber

string

No

The transaction number.

133314076

RecordID

string

No

The order or bill number.

20200302

TransactionChannelSN

string

No

The payment reference No.

12342134

CreateTimeStart

string

No

The start time of the creation time range. If not specified, the default value is one month before the current time. Example: 2018-01-01T00:00:00Z.

2020-03-05T01:46:09Z

CreateTimeEnd

string

No

The end time of the creation time range. If not specified, the default value is the current time. Example: 2018-01-01T00:00:00Z.

2020-03-06T01:55:00Z

PageNum

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 20.

10

TransactionType

string

No

The transaction type. If you specify a transaction type, the query returns results of the corresponding type. If no results exist, an empty result is returned. If you do not specify this parameter, all types are returned by default. Valid values:

  • Payment: Top-up.

  • Withdraw: Withdrawal.

  • Refund: Refund.

  • Consumption: Consumption.

  • Transfer: Transfer.

  • Adjust: Adjustment.

Valid values:

  • Consumption :

    Consumption.

  • Adjust :

    Adjustment.

  • Payment :

    Top-up.

  • Refund :

    Refund.

  • Withdraw :

    Withdrawal.

  • Transfer :

    Transfer.

  • Pay_Fail_Refund :

    Refund for payment failure.

Payment

TransactionFlow

string

No

The income and expense type. If you specify an income and expense type, the query returns results of the corresponding type. If no results exist, an empty result is returned. If you do not specify this parameter, all types are returned by default. Valid values:

  • Income: Income.

  • Expense: Expense.

Valid values:

  • Expense :

    Expense.

  • Income :

    Income.

Income

TransactionChannel

string

No

The transaction channel. If you specify a transaction channel, the query returns results of the corresponding type. If no results exist, an empty result is returned. If you do not specify this parameter, all types are returned by default. Valid values:

  • AccountBalance: Account balance.

  • BankTransfer: Bank transfer.

  • Alipay: Alipay.

  • AntCreditPay: Ant Credit Pay.

  • OfflineRemittance: Offline remittance.

  • RegularBankCreditRefund: Credit-based payment refund.

  • CreditCard: Credit card.

  • MyBankCredit: MYbank Credit.

  • HuaxiaBankCInstallment: Huaxia Bank installment.

  • ApplePay: Apple Pay.

Valid values:

  • RegularBankCreditRefund :

    Credit-based payment refund.

  • HuaxiaBankCInstallment :

    Huaxia Bank installment.

  • Alipay :

    Alipay.

  • AntCreditPay :

    Ant Credit Pay.

  • AccountBalance :

    Account balance.

  • BankTransfer :

    Bank transfer.

  • ApplePay :

    Apple Pay.

  • MyBankCredit :

    MYbank Credit.

  • OfflineRemittance :

    Offline remittance.

  • CreditCard :

    Credit card.

AccountBalance

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Data

object

The returned data.

AccountName

string

The user account.

test@test.aliyunid.com

AccountTransactionsList

object

AccountTransactionsList

array<object>

The collection of transaction records.

object

Amount

string

The amount.

0

Balance

string

The balance.

0

BillingCycle

string

The billing cycle. Format: YYYY-MM.

2020-03

FundType

string

The fund type. Valid values:

  • Cash: Cash.

  • Deposit: Deposit.

  • RegularBankCreditRefund: Credit-based payment refund.

  • DirectPay: Direct payment.

Cash

RecordID

string

The order or bill number.

2020030242

Remarks

string

The transaction remarks.

NAT_GW

TransactionAccount

string

The corresponding transaction account, such as the Alipay top-up account or the peer account for a transfer.

213562146

TransactionChannel

string

The transaction channel. Valid values:

  • AccountBalance: Account balance.

  • BankTransfer: Bank transfer.

  • Alipay: Alipay.

  • AntCreditPay: Ant Credit Pay.

  • OfflineRemittance: Offline remittance.

  • RegularBankCreditRefund: Credit-based payment refund.

  • CreditCard: Credit card.

  • MyBankCredit: MYbank Credit.

  • HuaxiaBankCInstallment: Huaxia Bank installment.

  • ApplePay: Apple Pay.

AccountBalance

TransactionChannelSN

string

The payment reference No.

1234354325

TransactionFlow

string

The income and expense type. Valid values:

  • Income: Income.

  • Expense: Expense.

Expense

TransactionNumber

string

The transaction number.

43342334

TransactionTime

string

The transaction time in ISO 8601 UTC format (YYYY-MM-DDTHH:mm:ssZ).

2020-03-10T02:03:20Z

TransactionType

string

The transaction type. Valid values:

  • Payment: Top-up.

  • Withdraw: Withdrawal.

  • Refund: Refund.

  • Consumption: Consumption.

  • Transfer: Transfer.

  • Adjust: Adjustment.

Consumption

PageNum

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

TotalCount

integer

The total number of records.

10

Message

string

The error message.

Successful!

RequestId

string

The request ID.

8634E02D-0942-4B1D-8295-5352FE9A1F39

Success

boolean

Indicates whether the request is successful.

true

Examples

Success response

JSON format

{
  "Code": "Success",
  "Data": {
    "AccountName": "test@test.aliyunid.com",
    "AccountTransactionsList": {
      "AccountTransactionsList": [
        {
          "Amount": "0",
          "Balance": "0",
          "BillingCycle": "2020-03",
          "FundType": "Cash",
          "RecordID": "2020030242",
          "Remarks": "NAT_GW",
          "TransactionAccount": "213562146",
          "TransactionChannel": "AccountBalance",
          "TransactionChannelSN": "1234354325",
          "TransactionFlow": "Expense",
          "TransactionNumber": "43342334",
          "TransactionTime": "2020-03-10T02:03:20Z",
          "TransactionType": "Consumption"
        }
      ]
    },
    "PageNum": 1,
    "PageSize": 10,
    "TotalCount": 10
  },
  "Message": "Successful!",
  "RequestId": "8634E02D-0942-4B1D-8295-5352FE9A1F39",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.