> ## 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://gp-auth-module.prod.gnosispay.com/openapi.json get /pci/cards/{cardId}/challenge
openapi: 3.0.0
info:
  version: 1.0.0
  title: SIWE Authentication API
  description: Sign In With Ethereum authentication service
servers:
  - url: https://gp-auth-module.prod.gnosispay.com
    description: API server
security: []
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.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: cardId
          in: path
        - schema:
            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).
          required: true
          description: >-
            The operation being authorized: 'view-details' (card PAN/CVV),
            'view-pin' (read PIN), 'change-pin' (set new PIN).
          name: action
          in: query
      responses:
        '200':
          description: Challenge created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PciChallengeSuccess'
        '400':
          description: Bad Request - User has no cardholder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationOrError'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found - User or card not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error while creating challenge
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
components:
  schemas:
    PciChallengeSuccess:
      type: object
      properties:
        domain:
          type: object
          properties:
            name:
              type: string
            version:
              type: string
            chainId:
              type: number
          required:
            - name
            - version
            - chainId
          description: EIP-712 domain separator.
        primaryType:
          type: string
          enum:
            - Message
          description: EIP-712 primary type.
        types:
          type: object
          properties:
            Message:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  type:
                    type: string
                required:
                  - name
                  - type
          required:
            - Message
          description: EIP-712 type definitions.
        message:
          type: object
          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.
          required:
            - authorization
            - nonce
          description: EIP-712 message payload.
      required:
        - domain
        - primaryType
        - types
        - message
      description: >-
        Complete EIP-712 typed data. Pass this object directly to signTypedData
        — convert message.nonce to BigInt before signing.
    ValidationOrError:
      anyOf:
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/Error'
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      required:
        - success
        - error
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            name:
              type: string
              enum:
                - ValidationError
            message:
              type: string
          required:
            - name
            - message
      required:
        - success
        - error

````