> ## 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` scope。
