Get Virtual Card Transactions

The getVirtualCardTransactions query allows you to retrieve a list of transactions for a number of virtual cards. This query requires both the PCI_COMPLIANCE and REVEAL_VIRTUALCARD scopes. You can use filters and pagination to refine the results.

Arguments

  • input (GetVirtualCardTransactionsInput): This is a required input object that contains the necessary parameters to fetch virtual card transactions.
    • virtualCardIds ([UUID!]!): A required list of unique identifiers for the virtual cards you wish to get transactions for.
    • filters (VirtualCardTransactionFiltersInput): An optional object to filter transactions.
      • transactionTypes ([VirtualCardTransactionListType!]): A list of transaction types to filter by, such as PURCHASE, REFUND, or DECLINE.
    • paginate (OffsetInput): An optional object for pagination, allowing you to control the offset and limit of the results.

Sample Query

query GetVirtualCardTransactions {
    getVirtualCardTransactions(
        input: {
            virtualCardIds: [
                "2ed71ba0-d457-47ed-8ceb-d3fe6ce5c900"
                "bd3be748-a0fb-4193-80a7-88419bc72dab"
                "9e42fdab-3c23-4eae-bd69-1fa746886505"
                "091f230a-3c65-48d6-a89c-f2c6350f72a1"
            ]
            filters: { transactionTypes: [REFUND, DECLINE] }
            paginate: { limit: 20, offset: 0 }
        }
    ) {
        virtualCardId
        transactions {
            transactionDate
            transactionType
            transactionStatus
            paymentMethod
            transactionResponseCode
            transactionApproval
            merchantName
            transactionAmount
        }
    }
}

cURL Example

curl -X POST \
  https://transactional-graph.staging.fluzapp.com/api/v1/graphql \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_USER_ACCESS_TOKEN' \
  -d '{ "query": "query { getVirtualCardTransactions(input: { virtualCardIds: [\"bd3be748-a0fb-4193-80a7-88419bc72dab\", \"9e42fdab-3c23-4eae-bd69-1fa746886505\"], filters: { transactionTypes: [PURCHASE] } }) { virtualCardId transactions { transactionDate transactionType transactionAmount merchantName } } }" }'

Sample Response

{
    "data": {
        "getVirtualCardTransactions": [
            {
                "virtualCardId": "2ed71ba0-d457-47ed-8ceb-d3fe6ce5c900",
                "transactions": [
                    {
                        "transactionDate": "2025-09-19T18:56:58.627Z",
                        "transactionType": "PURCHASE",
                        "transactionStatus": "CLEARED",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": null,
                        "transactionAmount": 5
                    },
                    {
                        "transactionDate": "2025-09-19T18:53:49.224Z",
                        "transactionType": "PURCHASE",
                        "transactionStatus": "PROCESSING",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": "Nike",
                        "transactionAmount": 2
                    }
                ]
            },
            {
                "virtualCardId": "bd3be748-a0fb-4193-80a7-88419bc72dab",
                "transactions": [
                    {
                        "transactionDate": "2025-09-24T14:00:22.080Z",
                        "transactionType": "REFUND",
                        "transactionStatus": "SUCCESS",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": null,
                        "transactionAmount": 3
                    },
                    {
                        "transactionDate": "2025-09-17T13:59:16.561Z",
                        "transactionType": "PURCHASE",
                        "transactionStatus": "CLEARED",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": null,
                        "transactionAmount": 3
                    }
                ]
            },
            {
                "virtualCardId": "9e42fdab-3c23-4eae-bd69-1fa746886505",
                "transactions": [
                    {
                        "transactionDate": "2025-09-19T19:15:26.998Z",
                        "transactionType": "PURCHASE",
                        "transactionStatus": "CLEARED",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": null,
                        "transactionAmount": 8
                    },
                    {
                        "transactionDate": "2025-09-19T19:14:15.765Z",
                        "transactionType": "PURCHASE",
                        "transactionStatus": "CLEARED",
                        "paymentMethod": "[\"FLUZPAY\"]",
                        "transactionResponseCode": "APPROVED",
                        "transactionApproval": "APPROVED",
                        "merchantName": null,
                        "transactionAmount": 4
                    }
                ]
            },
            {
                "virtualCardId": "091f230a-3c65-48d6-a89c-f2c6350f72a1",
                "transactions": []
            }
        ]
    }
}

Response Field Explanations

  • virtualCardId (UUID!): The unique identifier for the virtual card.
  • transactions ([VirtualCardTransaction!]!): An array of transaction objects for the specified virtual card.
    • transactionDate (String!): The date and time the transaction occurred in ISO 8601 format.
    • transactionType (VirtualCardTransactionListType!): The type of transaction, e.g., PURCHASE, REFUND, or DECLINE.
    • transactionAmount (Float!): The value of the transaction.
    • transactionApproval (String): The approval code for the transaction.
    • transactionResponseCode (String): The response code from the card network indicating the result of the transaction.
    • transactionStatus (String): The status of the transaction, e.g. APPROVED.
    • merchantName (String): The name of the merchant.
    • paymentMethod (String): The payment method used for the transaction.

Code Example:


Want to learn more? Contact us at [email protected]

Speak with our experts for more info or to request a demo.