Get Virtual Card Balance
The getVirtualCardBalance query is a tool that lets you retrieve the balance information for a list of virtual cards. This query requires both the PCI_COMPLIANCE and REVEAL_VIRTUALCARD scopes.
Arguments
input
(GetVirtualCardBalanceInput
): This is a required input that contains the IDs of the virtual cards you want to get balances for.- virtualCardIds (
[UUID!]!
): A required list of unique identifiers for the virtual cards.
- virtualCardIds (
Sample Query
query GetVirtualCardBalance {
getVirtualCardBalance(
input: { virtualCardIds: ["bd3be748-a0fb-4193-80a7-88419bc72dab", "9e42fdab-3c23-4eae-bd69-1fa746886505", "091f230a-3c65-48d6-a89c-f2c6350f72a1"] }
) {
virtualCardId
spentAmount
remainingBalance
spendLimit
spendLimitDuration
}
}
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 { getVirtualCardBalance(input: { virtualCardIds: [\"bd3be748-a0fb-4193-80a7-88419bc72dab\", \"9e42fdab-3c23-4eae-bd69-1fa746886505\", \"091f230a-3c65-48d6-a89c-f2c6350f72a1\"] }) { virtualCardId spentAmount remainingBalance spendLimit spendLimitDuration } }" }'
Sample Response
{
"data": {
"getVirtualCardBalance": [
{
"virtualCardId": "091f230a-3c65-48d6-a89c-f2c6350f72a1",
"spentAmount": 6,
"remainingBalance": 4,
"spendLimit": 10,
"spendLimitDuration": "LIFETIME"
},
{
"virtualCardId": "9e42fdab-3c23-4eae-bd69-1fa746886505",
"spentAmount": 90,
"remainingBalance": 10,
"spendLimit": 100,
"spendLimitDuration": "LIFETIME"
},
{
"virtualCardId": "bd3be748-a0fb-4193-80a7-88419bc72dab",
"spentAmount": 0,
"remainingBalance": 5,
"spendLimit": 5,
"spendLimitDuration": "DAILY"
}
]
}
}
Response Field Explanations
virtualCardId
(UUID!
): The unique identifier for the virtual card.spentAmount
(Float!
): The total amount that has been spent on the card during spend limit duration.remainingBalance
(Float!
): The amount of funds still available on the card.spendLimit
(Float!
): The total amount that can be spent on the card.spendLimitDuration
(VirtualCardSpendLimitDuration
): The duration type for the spend limit (e.g.,LIFETIME
,DAILY
).
Code Example:
Get Virtual Card Balance
Open Recipe
Want to learn more? Contact us at [email protected]
Speak with our experts for more info or to request a demo.
Updated 1 day ago