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
| Action | Scope |
|---|---|
| Create request | REQUEST_VIRTUAL_CARD |
| List requests | LIST_APPROVALS |
| Approve or decline | MANAGE_APPROVALS |
Webhook Identifiers
| Field | Value |
|---|---|
approvalType | VIRTUAL_CARD_CREATION |
approvalCode | 600003 |
Webhook events: APPROVAL_CREATE, APPROVAL_APPROVE, APPROVAL_DECLINE, and APPROVAL_HANDLER_ERROR on execution failure.
Create a Request
RequestVirtualCardInput
| Field | Type | Required | Description |
|---|---|---|---|
seatId | UUID | Yes | Seat associated with the requester |
offerId | UUID | Yes | Virtual card offer ID. Use getVirtualCardOffers to list active offers |
purchaseAmount | Float | Yes | Purchase amount for the card |
channel | SourcePlatformChannel | Yes | Request origin channel (for example, API) |
fluzpayAmount | Float | Yes | Amount to fund from Fluz balance |
spendLimitDuration | VirtualCardSpendLimitDuration | Yes | Limit duration: DAILY, WEEKLY, MONTHLY, ANNUAL, or LIFETIME |
virtualCardPIN | String | No | Optional card PIN |
brandLocked | Boolean | No | Lock card to a specific merchant brand |
mccId | String | No | Merchant category restriction |
shareWith | [String] | No | User IDs to share the card with |
pinAuthToken | String | No | PIN 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.
