Create Virtual Cards
createVirtualCard
Please note: The createVirtualCard
mutation is only available to BUSINESS accounts currently. If you would like to create virtual cards, please contact a Fluz sidekick for more information regarding set up.
Use the createVirtualCard
mutation to create your virtual card. This mutation requires an CreateVirtualCardInput input object. Requires CREATE_VIRTUALCARD scope.
Sample Mutation
mutation {
createVirtualCard(
idempotencyKey: "07df5653-43a8-4532-9881-3ab5857bbe11",
spendLimit: 123.45,
spendLimitDuration: "DAILY",
lockDate: "2007-12-03T10:15:30Z",
lockCardNextUse: true,
cardNickname: "xyz789",
balanceAmount: 123.45,
bin: "537876"
) {
purchaseId
virtualCard {
virtualCardId,
cardholderName,
expiryMonth,
expiryYear,
virtualCardLast4,
status,
cardType,
authorizationSetting
}
}
}
Fields
The following fields are used to run this mutation:
idempotencyKey
Required - A unique client generated UUID to ensure a request is processed only once.
spendLimit
Required - The maximum amount that you can charge to the card. You will only be charged for the amount you actually used.
spendLimitDuration
- Card limit duration type. Default Lifetime.
lockDate
- The date when the card will be locked. The default is 47 months.
lockCardNextUse
- The setting to lock the card after next use. The default is false.
cardNickname
- The card's nickname.
balanceAmount
- The amount of Fluz balance to be applied to the card.
bankAccountId
- The unique identifier for the bank account.
bin
- The Bank Identification Number of the issuing bank. Use getBins to fetch a list of active BINs.
CreateVirtualCardInput
{
"idempotencyKey": "5b9cd5e1-7bfe-4168-9070-c72146bfffa8",
"spendLimit": 987.65,
"spendLimitDuration": "DAILY",
"lockDate": "2007-12-03T10:15:30Z",
"lockCardNextUse": false,
"cardNickname": "xyz789",
"balanceAmount": 987.65,
"bankAccountId: "cef54919-e627-4127-979d-b708add1cb39",
"bin": "abc123"
}
Sample Response
Once your purchase is complete, you'll get a response that looks something like this:
{
"data": {
"createVirtualCard": {
"virtualCard": {
"virtualCardId": "07df5653-43a8-4532-9881-3ab5857bbe11",
"userId": "07df5653-43a8-4532-9881-3ab5857bbe11",
"cardholderName": "xyz789",
"expiryMonth": "abc123",
"expiryYear": "abc123",
"virtualCardLast4": "xyz789",
"status": "PENDING",
"cardType": "MULTI_USE",
"initialAmount": 123.45,
"usedAmount": 123.45,
"createdAt": "2007-12-03T10:15:30Z",
"authorizationSetting": VirtualCardAuthorizationSetting
}
}
}
}
Next Steps
Now it's time to reveal your virtual card details for use. Learn how to do so here:
Updated about 2 months ago