> ## 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.

# 設定虛擬卡 PIN

> 將 PIN 更新加入佇列，套用至所有符合條件的虛擬卡。

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

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

const SET_VIRTUAL_CARD_PIN = gql`
  mutation SetVirtualCardPIN {
    setVirtualCardPIN(input: { pin: "1234" }) {
      success
      pinError
    }
  }
`;

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

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

需要 `CREATE_VIRTUALCARD` 權限範圍。
