> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.americanexpress.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.americanexpress.ferndocs.com/_mcp/server.

# Retrieve Card Transactions / Retrieve Account Transactions

GET https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions

Returns the transactions of a Virtual Card. This service returns an array of up to 500 transactions for a Virtual Card ordered by date from the most-recent to the oldest.

Returns the transactions of a Card Account. This service returns an array of up to 500 transactions by date from the most-recent to the oldest.

Reference: https://developer.americanexpress.ferndocs.com/payment-services/card-on-demand/api-reference/retrieve-card-transactions

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Exchange your API key and secret for a bearer token, then send it as `Authorization: Bearer <token>`.

## Servers

- `https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand` (Sandbox, default)
- `https://api.americanexpress.com/commercial/v1/card_on_demand` (Production)

## Request

### Query parameters

- `cardId` (string, optional) — A unique ID assigned to the Card.
- `pageSize` (double, optional) — The number of transactions you would like to be shown per page of the UI. The default value is 500. The maximum page size limit is 500.
- `pageNumber` (double, optional) — The current page number. The default value is 1.
- `startDate` (string, optional) — The earliest date of the period for which transactions are requested (formatted as YYYY-MM-DD). The response will be inclusive of transactions on the startDate. When using this field, the endDate field is required. The value of startDate must be less than 18 months ago and no more than 31 days before the endDate. If no date parameters are sent, the most-recent 31 days of data will be returned.
- `endDate` (string, optional) — The latest date of the period for which transactions are requested (formatted as YYYY-MM-DD). The response will be inclusive of transactions on the endDate. When using this field, the startDate field is required. The value of endDate must be less than 18 months ago and no more than 31 days after the startDate. If no date parameters are sent, the most-recent 31 days of data will be returned.
- `accountId` (string, optional) — A unique ID that is created for the Account.

## Response

### 200

Successful operation

- `paginationDetails` (TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetails, required) — The information about the pages and their navigation.
- `transactions` (list of TransactionDetailsCardIdItems, required) — The list of transactions details.

### 206

Partial successful operation

- `paginationDetails` (TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetails, required) — The information about the pages and their navigation.
- `transactions` (list of TransactionDetailsCardIdItems, required) — The list of transactions details.

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of TransactionsGetResponsesContentApplicationJsonSchemaErrorsItems, required)

### 401 Unauthorized Error

Unauthorized

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 403 Forbidden Error

Unauthenticated

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 404 Not Found Error

Resource not found

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 500 Internal Server Error

Service error

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 503 Service Unavailable Error

Service unavailable

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

## Types

### TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetails

The information about the pages and their navigation.

- `page` (TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetailsPage, required) — The information on the paginated response, such as the number of pages, number of records, records-per-page, etc.
- `links` (TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetailsLinks, required) — The paths to navigate through the pages.

### TransactionDetailsCardIdItems

- `referenceNumber` (string, optional) — A unique value that can be used to match the statement and reporting data.
- `cardId` (string, optional) — A unique ID that is created for the Card.
- `lastFive` (string, optional) — The last five digits of the Card number on which the transaction occurred.
- `authorizationId` (string, optional) — A unique ID assigned for every Authorization which may be used to link the Authorizations to the transactions.
- `transactionAmount` (TransactionDetailsCardIdItemsTransactionAmount, optional)
- `localAmount` (TransactionDetailsCardIdItemsLocalAmount, optional)
- `authorizationDate` (string, optional) — The date when the Card was initially authorized by the Merchant for a payment. The format is: YYYY-MM-DD.
- `transactionDate` (string, optional) — The date when American Express transfers the funds to the Merchant’s account, also known as the settlement date. The format is: YYYY-MM-DD.
- `transactionType` (string, optional) — This is the type of transaction, whether it is CHARGE or CREDIT.
- `digitalWallet` (string, optional) — This field indicates if the transaction was made via a digital wallet. The possible values can be Samsung Pay, Google Pay, Apple Pay or Not applicable (if digital wallet was not used).
- `transactionDescription` (TransactionDetailsCardIdItemsTransactionDescription, optional)
- `billingCycleDate` (string, optional) — The end date of the billing cycle of the account statement in which the transaction will be posted. The format is YYYY-MM-DD.
- `merchant` (TransactionDetailsCardIdItemsMerchant, optional)

### TransactionsGetResponsesContentApplicationJsonSchemaErrorsItems

- `code` (string, optional) — A machine-readable field indicating the type of error.
- `message` (string, optional) — Provides a short description of the error.
- `detail` (string, optional) — Provides a detailed description of the error.
- `link` (string, optional) — The link to the documentation that explains the error.

### TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetailsPage

The information on the paginated response, such as the number of pages, number of records, records-per-page, etc.

- `pageSize` (double, required) — The number of transactions you would like to be shown per page of the UI. The default value is 500. The maximum page size limit is 500.
- `pageNumber` (double, required) — The current page number. The default value is 1.
- `pageCount` (double, required) — The number of pages returned in the search result. The maximum value returned will be 500.
- `totalCount` (double, required) — The total number of records.

### TransactionsGetResponsesContentApplicationJsonSchemaPaginationDetailsLinks

The paths to navigate through the pages.

- `first` (string, required) — The first page.
- `last` (string, required) — The last page.
- `next` (string, optional) — The next page.
- `previous` (string, optional) — The previous page.

### TransactionDetailsCardIdItemsTransactionAmount

- `value` (string, optional) — The numeric value of the transaction. In cases of credits, the amount will be represented as a negative value.
- `currency` (string, optional) — The funding account's currency.

### TransactionDetailsCardIdItemsLocalAmount

- `value` (string, optional) — The local currency value of the transaction.
- `currency` (string, optional) — The currency in which the transaction is paid to the Merchant.

### TransactionDetailsCardIdItemsTransactionDescription

- `line1` (string, optional) — The first line of the transaction description.
- `line2` (string, optional) — The second line of the transaction description.
- `line3` (string, optional) — The third line of the transaction description.
- `line4` (string, optional) — The fourth line of the transaction description.
- `line5` (string, optional) — The fifth line of the transaction description.

### TransactionDetailsCardIdItemsMerchant

- `name` (string, optional) — The Merchant's name linked to the Merchant Number within American Express.
- `city` (string, optional) — The city associated with the Merchant Number within American Express.
- `state` (string, optional) — The state associated with the Merchant Number within American Express.
- `country` (string, optional) — The country associated with the Merchant Number within American Express. This field will be in an [ISO](iso-country-codes.pdf) two-digit country code standard.
- `postalCode` (string, optional) — The Postal Code associated with the Merchant Number within American Express.
- `SeNumber` (string, optional) — The Service Establishment Number that uniquely identifies a Merchant.
- `taxNumber` (string, optional) — This is the Merchant's Federal Tax ID.
- `categoryCode` (string, optional) — The Merchant Category identifier.

## Examples

### retrieveCardTransactions_example

**Response**

```json
{
  "paginationDetails": {
    "page": {
      "pageSize": 500,
      "pageNumber": 3,
      "pageCount": 10,
      "totalCount": 10000
    },
    "links": {
      "first": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=1&startDate=2023-06-01&endDate=2023-06-20",
      "last": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=4&startDate=2023-06-01&endDate=2023-06-20",
      "next": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=4&startDate=2023-06-01&endDate=2023-06-20",
      "previous": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=2&startDate=2023-06-01&endDate=2023-06-20"
    }
  },
  "transactions": [
    {
      "referenceNumber": "200500312349098761236437948040040000021234567",
      "cardId": "CAEQd4zBEYrPi56",
      "lastFive": "56789",
      "authorizationId": "85345",
      "transactionAmount": {
        "value": "200.37",
        "currency": "USD"
      },
      "localAmount": {
        "value": "225.12",
        "currency": "USD"
      },
      "authorizationDate": "2022-01-14",
      "transactionDate": "2022-01-17",
      "transactionType": "CHARGE or CREDIT",
      "digitalWallet": "Apple Pay",
      "transactionDescription": {
        "line1": "GENERIC_COMPANY.COM/US, PHOENIX, AZ",
        "line2": "REF# W701947716A",
        "line3": "ELECTRONICS STORE 08/15/21",
        "line4": "08/15/21"
      },
      "billingCycleDate": "2022-02-01",
      "merchant": {
        "name": "ABCD",
        "city": "Phoenix",
        "state": "AZ",
        "country": "US",
        "postalCode": "85345",
        "SeNumber": "8906067845",
        "taxNumber": "4235656",
        "categoryCode": "4411"
      }
    }
  ]
}
```

**SDK Code**

```python retrieveCardTransactions_example
import requests

url = "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript retrieveCardTransactions_example
const url = 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go retrieveCardTransactions_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby retrieveCardTransactions_example
require 'uri'
require 'net/http'

url = URI("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java retrieveCardTransactions_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php retrieveCardTransactions_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp retrieveCardTransactions_example
using RestSharp;

var client = new RestClient("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift retrieveCardTransactions_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Response**

```json
{
  "paginationDetails": {
    "page": {
      "pageSize": 500,
      "pageNumber": 3,
      "pageCount": 10,
      "totalCount": 10000
    },
    "links": {
      "first": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=1&startDate=2023-06-01&endDate=2023-06-20",
      "last": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=4&startDate=2023-06-01&endDate=2023-06-20",
      "next": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=4&startDate=2023-06-01&endDate=2023-06-20",
      "previous": "/transactions?cardId=CRfbiFS2Kt1HhHL&pageSize=500&pageNumber=2&startDate=2023-06-01&endDate=2023-06-20"
    }
  },
  "transactions": [
    {
      "referenceNumber": "200500312349098761236437948040040000021234567",
      "cardId": "CAEQd4zBEYrPi56",
      "lastFive": "56789",
      "authorizationId": "85345",
      "transactionAmount": {
        "value": "20.25",
        "currency": "USD"
      },
      "localAmount": {
        "value": "185.12",
        "currency": "EUR"
      },
      "authorizationDate": "2022-01-14",
      "transactionDate": "2022-01-17",
      "transactionType": "CHARGE",
      "digitalWallet": "Apple Pay",
      "transactionDescription": {
        "line1": "GENERIC_COMPANY.COM/US, PHOENIX, AZ",
        "line2": "REF# W701947716A",
        "line3": "ELECTRONICS STORE",
        "line4": "08/15/21",
        "line5": "NA"
      },
      "billingCycleDate": "2022-02-01",
      "merchant": {
        "name": "ABCD",
        "city": "Phoenix",
        "state": "AZ",
        "country": "US",
        "postalCode": "12345",
        "SeNumber": "8906067845",
        "taxNumber": "4235656",
        "categoryCode": "4411"
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```