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

# Update Card

> Returns a short-lived secure link to initiate the Update Card process for a user.

This endpoint:
- Generates a secure link based on the provided `card_purpose` (PAYMENT or WITHDRAWAL)
- The link is valid for a limited time and intended for card updation only

**Usage Notes:**
- The link expires after 30 minutes
- Open the `secure_link` in a new browser window or iframe immediately after generation
- Do not reuse the link or repurpose it for card editing



## OpenAPI

````yaml POST /api/platform/card/update/secure-link/{user_id}
openapi: 3.1.0
info:
  title: paywint
  version: 0.1.0
servers:
  - url: http://localhost:8001
  - url: https://api.pw.wintpay.com
  - url: https://test.pw.wintpay.com
  - url: https://api.sandbox.paywint.com
security: []
paths:
  /api/platform/card/update/secure-link/{user_id}:
    post:
      tags:
        - Platform Card
      summary: Generate signed update-card link
      description: >-
        Returns a short-lived secure link to initiate the Update Card process
        for a user.


        This endpoint:

        - Generates a secure link based on the provided `card_purpose` (PAYMENT
        or WITHDRAWAL)

        - The link is valid for a limited time and intended for card updation
        only


        **Usage Notes:**

        - The link expires after 30 minutes

        - Open the `secure_link` in a new browser window or iframe immediately
        after generation

        - Do not reuse the link or repurpose it for card editing
      operationId: >-
        get_update_card_authorized_link_api_platform_card_update_secure_link__user_id__post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Unique identifier (UUID) of the user for whom the update-card link
              is being generated.
            title: User Id
          description: >-
            Unique identifier (UUID) of the user for whom the update-card link
            is being generated.
          example: f47ac10b-****-****-****-0e02b2c3d479
        - name: X-Platform-ID
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              Unique platform identifier (UUID). You receive this during
              onboarding. Must be sent with every API request.
            title: X-Platform-Id
          description: >-
            Unique platform identifier (UUID). You receive this during
            onboarding. Must be sent with every API request.
        - name: X-Signature
          in: header
          required: true
          schema:
            type: string
            description: >-
              HMAC-SHA256 request signature for authentication. Use your
              platform secret key to compute it as: `METHOD + PATH + QUERY +
              BODY_HASH`.
            title: X-Signature
          description: >-
            HMAC-SHA256 request signature for authentication. Use your platform
            secret key to compute it as: `METHOD + PATH + QUERY + BODY_HASH`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformCardUpdateLinkCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CommonResponse_PlatformCardSecureLinkRead_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PlatformCardUpdateLinkCreate:
      properties:
        card_id:
          type: string
          format: uuid
          title: Card Id
          description: Existing card UUID, if existing
          example: 07f0a4aa-b890-4135-84d6-ec9c19b82bb3
        card_purpose:
          $ref: '#/components/schemas/CardUsageType'
          description: Specifies the purpose of the card — either PAYMENT or WITHDRAWAL
          example: PAYMENT
      type: object
      required:
        - card_id
        - card_purpose
      title: PlatformCardUpdateLinkCreate
    CommonResponse_PlatformCardSecureLinkRead_:
      properties:
        success:
          type: boolean
          title: Success
          description: Indicates whether the request was processed successfully.
          default: true
          example: true
        message:
          type: string
          title: Message
          description: >-
            A short, human-readable message describing the result of the
            request.
          default: Success
          example: Operation completed.
        data:
          anyOf:
            - $ref: '#/components/schemas/PlatformCardSecureLinkRead'
            - type: 'null'
          description: The main response payload, if applicable
        queryGeneratedTime:
          anyOf:
            - type: number
            - type: 'null'
          title: Querygeneratedtime
          description: >-
            The Unix timestamp (in seconds) indicating when the response was
            generated.
          default: 1782303609.673092
          example: 1718006400
      type: object
      title: CommonResponse[PlatformCardSecureLinkRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CardUsageType:
      type: string
      enum:
        - PAYMENT
        - WITHDRAWAL
      title: CardUsageType
    PlatformCardSecureLinkRead:
      properties:
        secure_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Secure Link
          description: Client-side deep link to initiate the Add Card flow
          example: >-
            https://your-client-app.com/platform/add-card?prd=1&cardId=07f0a4aa-b890-4135-84d6-ec9c19b82bb3
      type: object
      title: PlatformCardSecureLinkRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````