Edit Virtual Card
The editVirtualCard mutation allows you to update various details of an existing virtual card, such as spend limits, lock date, and nickname. This mutation requires the EDIT_VIRTUALCARD scope.
Arguments
input
(EditVirtualCardInput!
): The input object containing the virtual card ID and the fields to update.
EditVirtualCardInput Fields
Field | Type | Description | Required |
---|---|---|---|
virtualCardId | UUID! | The virtual card to update. | Yes |
spendLimit | Float | The maximum amount that you can charge to the card. | No |
spendLimitDuration | VirtualCardSpendLimitDuration | Card limit duration type. | No |
lockDate | String | The date when the card will be locked. Format: yyyy-mm-dd | No |
lockCardNextUse | Boolean | The setting to lock the card after next use. | No |
cardNickname | String | The card's nickname. | No |
primaryFundingSource | VirtualCardFundingSource | Primary Funding Source for Virtual Card. | No |
bankAccountId | UUID | The unique identifier for the bank account. | No |
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": "mutation { editVirtualCard( input: { virtualCardId: \"07df5653-43a8-4532-9881-3ab5857bbe11\", spendLimit: 200.00, spendLimitDuration: \"MONTHLY\", cardNickname: \"Edited Card Nickname\", lockCardNextUse: false } ) { virtualCardId cardholderName expiryMonth expiryYear virtualCardLast4 status cardType initialAmount usedAmount createdAt authorizationSetting { virtualCardAsaSettingsId lockDate dailySpendLimit monthlySpendLimit cardNickname lockCardNextUse } } }"
}'
Sample Response
{
"data": {
"editVirtualCard": {
"virtualCardId": "07df5653-43a8-4532-9881-3ab5857bbe11",
"userId": "00a2ec0a-255f-4fe7-85ad-2958dc8d3c72",
"cardholderName": "John Doe",
"expiryMonth": "12",
"expiryYear": "27",
"virtualCardLast4": "7890",
"status": "ACTIVE",
"cardType": "MULTI_USE",
"initialAmount": 200,
"usedAmount": 0,
"createdAt": "2023-10-26T10:00:00Z",
"authorizationSetting": {
"virtualCardAsaSettingsId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"lockDate": "1875743999999",
"dailySpendLimit": null,
"monthlySpendLimit": "200.00",
"cardNickname": "Edited Card Nickname",
"lockCardNextUse": false
}
}
}
}
Response Field Explanations
virtualCardId
(UUID
): The unique identifier of the virtual card that was edited.cardholderName
(String
): The name of the cardholder associated with the virtual card.expiryMonth
(String
): The expiration month of the virtual card.expiryYear
(String
): The expiration year of the virtual card.virtualCardLast4
(String
): The last four digits of the virtual card number.status
(VirtualCardStatus
): The current status of the virtual card.cardType
(VirtualCardType
): The type of the virtual card (e.g.,MULTI_USE
).initialAmount
(Float
): The initial amount (spend limit) set on the card when it was created.usedAmount
(Float
): The total amount spent on the virtual card.createdAt
(DateTime
): The timestamp when the virtual card was originally created.authorizationSetting
(VirtualCardAuthorizationSetting
): An object containing the authorization settings for the virtual card, reflecting any updates.virtualCardAsaSettingsId
(UUID
): The unique identifier for this specific authorization setting.lockDate
(String
): The date the card will be locked, if set.dailySpendLimit
(String
): The daily spending limit, if applicable.monthlySpendLimit
(String
): The monthly spending limit, if applicable.cardNickname
(String
): The updated nickname for the card.lockCardNextUse
(Boolean
): Indicates if the card will be locked after its next use.
Code Example:
Want to learn more? Contact us at [email protected]
Speak with our experts for more info or to request a demo.
Updated 5 days ago