> ## 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.

# Create a Physical Card

> The last step in the physical card creation process.

**Note:** To apply a coupon code, use the `/api/v1/order/{orderId}/attach-coupon` endpoint before creating the card.

**Validation Requirements:**
- User must have completed KYC successfully
- User must have a verified phone number
- User must have name and address set
- User's country must be supported
- User must not have reached maximum active cards limit
- Safe account should be setup
- User must not have existing pending card orders
- For paid cards, a valid transaction hash is required




## OpenAPI

````yaml https://api.gnosispay.com/api-docs/spec.json post /api/v1/order/{orderId}/create-card
openapi: 3.0.0
info:
  title: GnosisPay API
  version: 1.0.0
  description: OpenAPI documentation for GnosisPay
servers:
  - url: https://api.gnosispay.com
security: []
tags:
  - name: Account Management
    description: Information about your Account
  - name: Authentication
    description: Authenticate to our API using SIWE
  - name: Card Management
    description: Manage all your Cards
  - name: IBAN
    description: Integrate with Monerium to issue IBANs
  - name: KYC
    description: KYC using Sumsub SDK
  - name: Physical Card Order
    description: Order a Physical Card and manage the process
  - name: Rewards
    description: Cashback Rewards
  - name: Safe Management
    description: Manage your Safe
  - name: Transactions
    description: Manage Card Transactions
  - name: User
    description: Manage User Information
  - name: Webhooks
    description: Manage Webhooks
paths:
  /api/v1/order/{orderId}/create-card:
    post:
      tags:
        - Physical Card Order
      summary: Create a Physical Card
      description: >
        The last step in the physical card creation process.


        **Note:** To apply a coupon code, use the
        `/api/v1/order/{orderId}/attach-coupon` endpoint before creating the
        card.


        **Validation Requirements:**

        - User must have completed KYC successfully

        - User must have a verified phone number

        - User must have name and address set

        - User's country must be supported

        - User must not have reached maximum active cards limit

        - Safe account should be setup

        - User must not have existing pending card orders

        - For paid cards, a valid transaction hash is required
      parameters:
        - in: path
          name: orderId
          required: true
          description: The unique identifier of the card order.
          schema:
            type: string
            example: '1234'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pinData:
                  type: object
                  description: Optional PIN data for the card
                  properties:
                    encryptedKey:
                      type: string
                      description: Encrypted key for PIN
                      example: encryptedPinKey
                    encryptedPin:
                      type: string
                      description: Encrypted PIN value
                      example: encryptedPinData
                    iv:
                      type: string
                      description: Initialization vector for encryption
                      example: iv
                transactionHash:
                  type: string
                  description: |
                    Transaction hash for card payment. Required for paid cards.
                    Must be in hexadecimal format (0x...).
                  pattern: ^0x[a-fA-F0-9]+$
                  example: >-
                    0x1234567890123456789012345678901234567890123456789012345678901234
              example:
                pinData:
                  encryptedKey: encryptedKey
                  encryptedPin: encryptedPin
                  iv: iv
                transactionHash: >-
                  0x1234567890123456789012345678901234567890123456789012345678901234
      responses:
        '200':
          description: The card was created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  cardToken:
                    type: string
                    description: The token of the created card
                    example: '1234567890'
              example:
                success: true
        '400':
          description: Bad request - validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              examples:
                missingTransactionHash:
                  summary: Transaction hash not provided for paid card
                  value:
                    error: >-
                      A transaction hash for the cost of the card was not
                      provided
        '401':
          description: Unauthorized - user not found or not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '404':
          description: Card order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Order not found
        '409':
          description: Conflict - business rule violations
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              examples:
                pendingOrder:
                  summary: User has existing pending card order
                  value:
                    error: User already has a card order in progress.
                duplicateTransactionHash:
                  summary: Transaction hash already used
                  value:
                    error: >-
                      The provided transaction hash has already been used for
                      another card order.
        '422':
          description: Unprocessable entity - validation criteria not met
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Validation error message
              examples:
                kycNotComplete:
                  summary: KYC not completed
                  value:
                    error: User needs to complete KYC successfully.
                invalidRiskScore:
                  summary: User has incompatible risk score
                  value:
                    error: User has incompatible risk score.
                phoneNotVerified:
                  summary: Phone number not verified
                  value:
                    error: User does not have a verified phone number.
                nameNotSet:
                  summary: User name not set
                  value:
                    error: User's name is not set
                addressNotSet:
                  summary: User address not set
                  value:
                    error: User's address is not set
                countryNotSupported:
                  summary: User's country not supported
                  value:
                    error: User's country is not supported
                maxCardsReached:
                  summary: Maximum active cards reached
                  value:
                    error: User has reached the maximum number of active cards (3).
                safeNotReady:
                  summary: Safe account not ready
                  value:
                    error: Could not create card due to safe misconfiguration
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              example:
                error: Something went wrong
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````