createVirtualCard mutation to create a virtual card with configurable funding sources, limits, and lifecycle controls.
Prerequisites: a user access token with the
CREATE_VIRTUALCARD scope, and a CreateVirtualCardInput object. To find an offerId, see Get Virtual Card Offers.Billing address must be verifiable. The billing address — whether passed inline as
billingAddress or referenced by userAddressId — must be a real, deliverable US address (US, USA, or United States) with a correct city, state, and ZIP; PO boxes are not accepted. It is validated against USPS data (via Smarty) as the cardholder is set up. If it can’t be verified, the card is not created and the request fails with VC-0025 (UnableToCreateAuthUser), returned on extensions.code. See Address Formatting Requirements.Sandbox test offers
Important considerations
- Funding Source: You can fund your virtual cards using either your Fluz balance or a linked bank account as the primary funding source.
- If you select a bank account as the
primaryFundingSource, you must provide thebankAccountId.
- If you select a bank account as the
- Spend Limits: The
spendLimityou set must adhere to the program’s defined spend limits for the chosenspendLimitDuration. An error will occur if the limit is exceeded. - Balance Composition: By default, virtual cards may be funded by a combination of your specified spend account, prepaid (gift card) balance, and rewards balance when available. You can restrict the card to draw only from the spend account by setting
usePrepaymentBalance: falseanduseRewardsBalance: falsein the input. - Transaction Annotations: You may optionally attach a
memoand/ortransactionCategoryat card creation time. These will be associated with the resulting transaction for tracking and organization purposes.- If
transactionCategoryis provided, a matching category will be found or created for the account. attachmentIdis not supported
- If
Arguments
input(CreateVirtualCardInput!): The input object containing details for the new virtual card.
CreateVirtualCardInput fields
VirtualCardBillingAddressInput fields
Addresses that fail verification return
VC-0025 (UnableToCreateAuthUser). See Address Formatting Requirements and Virtual Card Error Codes.
cURL Example
Sample Mutation
Sample Mutation — Cash-Only Balance
Restrict a virtual card to draw only from the specifieduserCashBalanceId, excluding prepaid and rewards funds.
Sample Response
Response fields
Next steps
Reveal the card
Retrieve the PAN, CVV, and expiry so the card can actually be used.
Get virtual card offers
Enumerate every program available to your account to pick the right
offerId.