Transactions

Get customer transactions

Returns the transaction history for a specific customer. Only includes DEPOSIT and WITHDRAWAL transactions.

GET
/api/v2/customers/{customerId}/transactions

Returns the transaction history for a specific customer. Only includes DEPOSIT and WITHDRAWAL transactions.

Authorization

bearerAuth
AuthorizationBearer <token>

Organization API key obtained on Settings > API Keys page in Compose UI.

In: header

Path Parameters

customerId*string

Unique identifier of the customer

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET 'https://compose.finance/api/v2/customers/{customerId}/transactions' \  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": "txn_dep_eur_001",
    "type": "DEPOSIT",
    "status": "COMPLETED",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "completedAt": "2024-01-15T10:35:00.000Z",
    "reference": "FLGVNY3H9F",
    "sourceCurrency": "EUR",
    "targetCurrency": "USDC",
    "sourceAmount": "1000",
    "targetAmount": "1157.43",
    "exchangeRate": "1.1691279887",
    "fee": "1",
    "depositInstructions": {
      "accountType": "sharedAccount",
      "reference": "FLGVNY3H9F"
    },
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "developerFee": {
      "developerSpreadFeeBps": 100,
      "amount": "2.50"
    },
    "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  },
  {
    "id": "txn_dep_usd_002",
    "type": "DEPOSIT",
    "status": "COMPLETED",
    "createdAt": "2024-01-16T11:00:00.000Z",
    "completedAt": "2024-01-16T11:03:00.000Z",
    "reference": "USDREF12345",
    "sourceCurrency": "USD",
    "targetCurrency": "USDC",
    "sourceAmount": "750",
    "targetAmount": "750",
    "exchangeRate": "1.0000",
    "fee": "1.5",
    "depositInstructions": {
      "accountType": "sharedAccount",
      "reference": "USDREF12345"
    },
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "developerFee": null,
    "txHash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"
  },
  {
    "id": "txn_wdr_eur_003",
    "type": "WITHDRAWAL",
    "status": "COMPLETED",
    "requiresUiAction": false,
    "createdAt": "2024-01-20T14:00:00.000Z",
    "completedAt": "2024-01-20T14:12:00.000Z",
    "reference": "txn_wdr_eur_003",
    "sourceCurrency": "USDC",
    "targetCurrency": "EUR",
    "sourceAmount": "500",
    "targetAmount": "432.5",
    "exchangeRate": "0.865",
    "fee": "2.5",
    "withdrawalBank": {
      "id": "bank_123abc",
      "beneficiaryName": "JOHN DOE",
      "currency": "EUR",
      "iban": "DE89370400440532013000",
      "bic": "COBADEFFXXX"
    },
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "developerFee": null,
    "txHash": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
  },
  {
    "id": "txn_wdr_usd_004",
    "type": "WITHDRAWAL",
    "status": "PROPOSED",
    "requiresUiAction": true,
    "createdAt": "2024-01-22T09:15:00.000Z",
    "completedAt": null,
    "reference": "txn_wdr_usd_004",
    "sourceCurrency": "USDC",
    "targetCurrency": "USD",
    "sourceAmount": "800",
    "targetAmount": "800",
    "exchangeRate": "1.0000",
    "fee": "2.5",
    "withdrawalBank": {
      "id": "bank_789ghi",
      "beneficiaryName": "JOHN DOE",
      "currency": "USD",
      "accountNumber": "214033031443",
      "routingNumber": "101019644"
    },
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "developerFee": null,
    "txHash": null
  }
]
{
  "error": "Unauthorized - Invalid or missing API key or session"
}
{
  "error": "Customers feature is not enabled for your organization"
}
{
  "error": "Customer not found"
}
{
  "error": "Internal server error"
}