> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-auth-module.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get PCI EIP-712 Challenge

> Issues a one-time EIP-712 challenge. The response is a complete typed-data
object that can be passed directly to signTypedData (convert message.nonce
to BigInt first). After signing, forward the hex signature as
x-eip712-signature and the nonce as x-eip712-nonce on the subsequent PCI
data request. The challenge expires after 5 minutes and can only be used
once.



## OpenAPI

````yaml https://core.prod.gnosispay.com/user-api/openapi.json get /pci/cards/{cardId}/challenge
openapi: 3.1.0
info:
  title: User Service
  version: 0.0.0
servers: []
security: []
tags:
  - name: Health
  - name: Auth
  - name: User
  - name: Cards
  - name: Phone
  - name: PCI
  - name: Terms
  - name: Source of Funds
paths:
  /pci/cards/{cardId}/challenge:
    get:
      tags:
        - PCI
      summary: Get PCI EIP-712 Challenge
      description: >-
        Issues a one-time EIP-712 challenge. The response is a complete
        typed-data

        object that can be passed directly to signTypedData (convert
        message.nonce

        to BigInt first). After signing, forward the hex signature as

        x-eip712-signature and the nonce as x-eip712-nonce on the subsequent PCI

        data request. The challenge expires after 5 minutes and can only be used

        once.
      operationId: PCI_getCardChallenge
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: action
          in: query
          required: true
          description: |-
            The operation being authorized: 'view-details' (card PAN/CVV),
            'view-pin' (read PIN), 'change-pin' (set new PIN).
          schema:
            $ref: '#/components/schemas/PciAction'
          explode: false
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PciChallengeResponse'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    uuid:
      type: string
      format: uuid
    PciAction:
      type: string
      enum:
        - view-details
        - view-pin
        - change-pin
      description: >-
        The operation being authorized: 'view-details' (card PAN/CVV),
        'view-pin'

        (read PIN), 'change-pin' (set new PIN).
    PciChallengeResponse:
      type: object
      required:
        - domain
        - primaryType
        - types
        - message
      properties:
        domain:
          allOf:
            - $ref: '#/components/schemas/PciChallengeDomain'
          description: EIP-712 domain separator.
        primaryType:
          type: string
          enum:
            - Message
          description: EIP-712 primary type.
        types:
          allOf:
            - $ref: '#/components/schemas/PciChallengeTypes'
          description: EIP-712 type definitions.
        message:
          allOf:
            - $ref: '#/components/schemas/PciChallengeMessage'
          description: EIP-712 message payload.
      description: >-
        Complete EIP-712 typed data. Pass this object directly to signTypedData
        —

        convert message.nonce to BigInt before signing.
    Unauthorized:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    NotFound:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    PciChallengeDomain:
      type: object
      required:
        - name
        - version
        - chainId
      properties:
        name:
          type: string
        version:
          type: string
        chainId:
          type: integer
          format: int64
    PciChallengeTypes:
      type: object
      required:
        - Message
      properties:
        Message:
          type: array
          items:
            $ref: '#/components/schemas/PciEip712Field'
    PciChallengeMessage:
      type: object
      required:
        - authorization
        - nonce
      properties:
        authorization:
          type: string
          description: >-
            Human-readable action string, e.g. "Display VISA Card Details". This
            is

            what the user will see in their wallet.
        nonce:
          type: string
          description: |-
            Random uint256 as a decimal string. Must be passed back as the
            x-eip712-nonce header alongside the signature.
    PciEip712Field:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
        type:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````