> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# 鎖定虛擬卡

> 暫時阻止虛擬卡進一步交易。

```javascript theme={null}
import { GraphQLClient, gql } from 'graphql-request';

const API_URL = 'https://transactional-graph.staging.fluzapp.com/api/v1/graphql';

const LOCK_VIRTUAL_CARD = gql`
  mutation LockVirtualCard {
    lockVirtualCard(
      input: { virtualCardId: "cc7eaf27-1560-425c-92c4-bdc88d45d261" }
    ) {
      virtualCardId
      locked
    }
  }
`;

const client = new GraphQLClient(API_URL, {
  headers: {
    Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
    'Content-Type': 'application/json',
  },
});

const response = await client.request(LOCK_VIRTUAL_CARD);
console.log(response);
```

需要 `EDIT_VIRTUALCARD` 權限範圍。
