# API For Querying Order History

### &#x20;Description

Query Order History

### Request URL

/open/api/card/trade/list

### Request Method

POST

### Request Parameter

| Parameter | Mandatory | Type    | Description       |
| --------- | --------- | ------- | ----------------- |
| cardId    | Y         | string  | Virtual Card ID   |
| current   | Y         | integer | Current page      |
| size      | Y         | integer | Number of queries |

### Request Example

```
{
    "cardId": "c_xxxxxxxxxxx",
     "current": 1,
     "size":10
}
```

### Response Parameter

| Parameter      | Type    | Description                               |
| -------------- | ------- | ----------------------------------------- |
| +records       | array   | List                                      |
| └transactionId | string  | Card transaction ID                       |
| └cardId        | string  | Card ID                                   |
| └cardSeqNo     | string  | Card Serial Number                        |
| └cardLast4     | string  | The last four digits of the card number   |
| └desp          | string  | Authorization Description                 |
| └reason        | string  | Fail reason                               |
| └amount        | integer | Consumption amount                        |
| └currency      | string  | Consumption amount currency               |
| └status        | string  | Transaction status, PENDING, COMPETE, etc |
| └tradeAt       | string  | Trade time                                |
| integer        | integer | Number of record elements                 |
| total          | integer | Total number                              |
| current        | integer | Current page                              |

### Response Example

```
 {
    "success": true,
    "error":false,
    "msg": "成功",
    "code": 0,
    "model": {
        "records": [
            {
                "transactionId": "t_xxxxx",
                "cardId": "c_xxxxxxxxxx",
                "cardSeqNo": "CXXXXXXXX",
                "cardLast4": "9352",
                "desp": "Fake Transaction in Sandbox Mode(-$200.00)",
                "reason": "balance not enough",
                "amount": -20000,
                "currency": "USD",
                "status": "DECLINED",
                "tradeAt": 1646306072727
            },
            {
                "transactionId": "t_xxxxx",
                "cardId": "c_xxxxxxxxxx",
                "cardSeqNo": "CXXXXXXXX",
                "cardLast4": "9352",
                "desp": "Fake Transaction in Sandbox Mode(-$1.00)",
                "reason": null,
                "amount": -100,
                "currency": "USD",
                "status": "PENDING",
                "tradeAt": 1646392472727
            },
            {
                "transactionId": "t_xxxxx",
                "cardId": "c_xxxxxxxxxx",
                "cardSeqNo": "CXXXXXXXX",
                "cardLast4": "9352",
                "desp": "Fake Transaction in Sandbox Mode(-$100.00)",
                "reason": null,
                "amount": -10000,
                "currency": "USD",
                "status": "COMPLETE",
                "tradeAt": 1646392472727
            },
            {
                "transactionId": "t_xxxxx",
                "cardId": "c_xxxxxxxxxx",
                "cardSeqNo": "CXXXXXXXX",
                "cardLast4": "9352",
                "desp": "Fake Transaction in Sandbox Mode($100.00)",
                "reason": null,
                "amount": 5000,
                "currency": "USD",
                "status": "REFUND",
                "tradeAt": 1646478872727
            }
        ],
        "size": 3,
        "total": 3,
        "current": 1
    },
    "traceId": 1646651672727
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prepaidify.gitbook.io/docs/virtual-card/api-integration/api-for-querying-order-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
