Request Virtual Card Approval

requestVirtualCard

Submit a manager approval request to create a virtual card. When approved, Fluz creates the card using the submitted parameters.

Scopes

ActionScope
Create requestREQUEST_VIRTUAL_CARD
List requestsLIST_APPROVALS
Approve or declineMANAGE_APPROVALS

Webhook Identifiers

FieldValue
approvalTypeVIRTUAL_CARD_CREATION
approvalCode600003

Webhook events: APPROVAL_CREATE, APPROVAL_APPROVE, APPROVAL_DECLINE, and APPROVAL_HANDLER_ERROR on execution failure.

Create a Request

RequestVirtualCardInput

FieldTypeRequiredDescription
seatIdUUIDYesSeat associated with the requester
offerIdUUIDYesVirtual card offer ID. Use getVirtualCardOffers to list active offers
purchaseAmountFloatYesPurchase amount for the card
channelSourcePlatformChannelYesRequest origin channel (for example, API)
fluzpayAmountFloatYesAmount to fund from Fluz balance
spendLimitDurationVirtualCardSpendLimitDurationYesLimit duration: DAILY, WEEKLY, MONTHLY, ANNUAL, or LIFETIME
virtualCardPINStringNoOptional card PIN
brandLockedBooleanNoLock card to a specific merchant brand
mccIdStringNoMerchant category restriction
shareWith[String]NoUser IDs to share the card with
pinAuthTokenStringNoPIN authorization token when required

Sample Mutation

mutation {
  requestVirtualCard(
    input: {
      seatId: "db11ec6c-c371-4184-ab6a-3dfb2c92c4d3"
      offerId: "b23630f6-8d91-43df-84aa-a541e7691197"
      purchaseAmount: 100.00
      channel: API
      fluzpayAmount: 100.00
      spendLimitDuration: MONTHLY
    }
  ) {
    success
    messageId
    error {
      code
      message
    }
  }
}

Sample Response

{
  "data": {
    "requestVirtualCard": {
      "success": true,
      "messageId": "1234567890"
    }
  }
}

Approve a Request

Call approveApprovalRequest with the approvalId from approvalRequests or the APPROVAL_CREATE webhook. Requires MANAGE_APPROVALS.

mutation {
  approveApprovalRequest(approvalId: "07df5653-43a8-4532-9881-3ab5857bbe12") {
    success
    approvalId
    action
  }
}

On approval, Fluz creates the virtual card with the parameters from the original request.

Decline a Request

Call declineApprovalRequest with the approvalId. Requires MANAGE_APPROVALS.

mutation {
  declineApprovalRequest(approvalId: "07df5653-43a8-4532-9881-3ab5857bbe12") {
    success
    approvalId
    action
  }
}

No virtual card is created when a request is declined.