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

# Get profile identity-document renewal

> Returns the current identity-document renewal state for a KYC profile.
This operation is read-only. It does not start document collection or
create verification credentials.



## OpenAPI

````yaml https://core.sandbox.gnosispay.in/partner-api/openapi.json get /v1/kyc/profiles/{kycProfileId}/document-renewal
openapi: 3.2.0
info:
  title: Gnosis Pay Partner API
  version: 1.0.0
  description: >-
    Server-to-server API for onboarding users, creating accounts and cards,
    moving

    funds, and managing the card lifecycle. Call this API only from a trusted

    backend. Every request requires a partner access token, and every resource
    is

    scoped to the authenticated partner. The exceptions are the routes that the

    cardholder's application calls directly to read and change card data

    (`GET /v1/challenge/keys` and the card routes of the encrypted data

    protocol): they take no token and allow any CORS origin.
servers:
  - url: https://core.prod.gnosispay.com/partner-api
    description: Production
    variables: {}
  - url: https://core.sandbox.gnosispay.in/core
    description: Sandbox
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: KYC
  - name: Accounts
  - name: Cards
  - name: Encrypted data
    description: >-
      Lets the cardholder's application read the card data (PAN, CVV, expiration

      date and PIN) and set a new PIN. The card data is encrypted between the

      application and GP. Your backend and your network never see it, even when

      a request passes through them.


      ## Goals


      - Only the application and GP can read the card data or the new PIN.

      - The account owner approves each action: the cardholder's wallet signs an
        EIP-712 message for it.
      - Your access token alone cannot read or change card data.

      - The application can verify that each challenge and each reply came from
        GP.

      ## Algorithms


      | Use | Algorithm |

      |---|---|

      | Keys | `EC` on the `P-256` curve |

      | Signature (JWS) | `ES256` |

      | Key agreement (JWE) | `ECDH-ES` |

      | Content encryption (JWE) | `A256GCM` |

      | Key thumbprint | RFC 7638 with SHA-256, base64url without padding |

      | Wallet signature | EIP-712 (`eth_signTypedData_v4`), checked with
      ERC-1271 for a smart account |


      Every token is a JWT. A standard JOSE library can create and verify all of

      them.


      ## Flow


      ```mermaid

      sequenceDiagram
          autonumber
          participant APP as Application
          participant WALLET as Wallet
          participant BACKEND as Your backend
          participant GP

          APP->>APP: create a signature key pair and an encryption key pair
          APP->>BACKEND: thumbprint of the signature public key
          BACKEND->>GP: POST /v1/challenge
          GP-->>BACKEND: challenge (JWS)
          BACKEND-->>APP: challenge
          APP->>GP: GET /v1/challenge/keys
          GP-->>APP: GP public keys (JWKS)
          APP->>APP: verify the challenge
          APP->>WALLET: sign the EIP-712 message of the challenge
          WALLET-->>APP: signature
          APP->>GP: POST /v1/cards/... with the signed and encrypted answer (JWE)
          alt read the card details or the PIN
              GP-->>APP: data (JWE that holds a JWS)
          else change the PIN
              GP-->>APP: proof (JWS)
          end
          APP->>APP: verify the reply and delete both key pairs
      ```
  - name: PCI
  - name: 3DS
  - name: Card transactions
  - name: Deposits
  - name: Withdrawals
  - name: Webhooks
paths:
  /v1/kyc/profiles/{kycProfileId}/document-renewal:
    get:
      tags:
        - KYC
      summary: Get profile identity-document renewal
      description: |-
        Returns the current identity-document renewal state for a KYC profile.
        This operation is read-only. It does not start document collection or
        create verification credentials.
      operationId: kyc_profiles.get_document_renewal.v1
      parameters:
        - name: kycProfileId
          in: path
          required: true
          description: The unique identifier of the KYC profile.
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentRenewal'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    uuid:
      type: string
      format: uuid
    DocumentRenewal:
      type: object
      required:
        - status
        - canCreateSession
      properties:
        status:
          $ref: '#/components/schemas/DocumentRenewalStatus'
          description: Current renewal state for this profile.
        documentExpiresAt:
          type: string
          format: date-time
          description: Expiry of the identity document that started the renewal.
        graceExpiresAt:
          type: string
          format: date-time
          description: Time when use becomes restricted until renewal completes.
        canCreateSession:
          type: boolean
          description: Whether this profile can create or resume a renewal session.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
        message:
          type: string
          description: Generic human-readable text for the status code. Do not parse it.
        reason:
          type: string
          description: >-
            Stable machine-readable code identifying the specific cause, present
            only

            for errors that expose one (e.g. `CREATE_CARD_LIMIT_EXCEEDED`).
            Branch on

            this rather than on `message`.
    DocumentRenewalStatus:
      type: string
      enum:
        - not_required
        - upcoming
        - action_required
        - in_progress
        - restricted
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.