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

# Get card details

> The card number, CVC and expiry, **only ever returned encrypted** to a key that you alone hold. It is a POST, so it is never cached.

You need a registered RSA public key first — without one, this returns an error. See [Card details encryption](/api-reference/cards/encryption) for the setup and how to decrypt.



## OpenAPI

````yaml api-reference/endl-cards-api.json POST /api/v0/cards/{customerId}/{cardId}/details
openapi: 3.1.0
info:
  title: Endl Cards API
  version: '0'
  description: >-
    Issue virtual cards to your customers: enrol the customer, fund the card
    balance, issue cards, show card details securely, and follow every
    transaction by webhook.


    Paths are under `/api/v0`. The key must carry the **`cards`** permission.
    **This API is not final yet** — see [what may still
    change](/api-reference/cards/introduction#not-final-yet).
servers:
  - url: https://api-sandbox.endl.io
    description: Sandbox
security:
  - apiKey: []
tags:
  - name: Enrolment
  - name: Cardholders
  - name: Cards
  - name: Card details
  - name: Transactions and balance
  - name: Deposits
  - name: Withdrawals
paths:
  /api/v0/cards/{customerId}/{cardId}/details:
    post:
      tags:
        - Card details
      summary: Get card details
      description: >-
        The card number, CVC and expiry, **only ever returned encrypted** to a
        key that you alone hold. It is a POST, so it is never cached.


        You need a registered RSA public key first — without one, this returns
        an error. See [Card details encryption](/api-reference/cards/encryption)
        for the setup and how to decrypt.
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/CustomerId'
        - $ref: '#/components/parameters/CardId'
      responses:
        '200':
          description: The card's encrypted details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardDetails'
              example:
                cardId: crd_4fT9...
                encryptedCard:
                  alg: RSA-OAEP-256+A256GCM
                  keyId: key_2026_01
                  encryptedKey: ...
                  iv: ...
                  ciphertext: ...
                  tag: ...
                  aad: crd_4fT9...
        '400':
          description: No card-details key is registered for your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key lacks the `cards` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Customer or card not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ApiVersion:
      name: Api-Version
      in: header
      required: true
      description: >-
        The API version this request targets. `2026-09.1`. See
        [Versioning](/api-reference/versioning).
      schema:
        type: string
        pattern: ^\d{4}-\d{2}\.\d+$
        default: 2026-09.1
      example: 2026-09.1
    CustomerId:
      name: customerId
      in: path
      required: true
      description: An individual, a business or an employee (`cus_`).
      schema:
        type: string
        example: cus_1Xb7...
    CardId:
      name: cardId
      in: path
      required: true
      description: The card (`crd_`).
      schema:
        type: string
        example: crd_4fT9...
  schemas:
    CardDetails:
      type: object
      properties:
        cardId:
          type: string
        encryptedCard:
          $ref: '#/components/schemas/EncryptedCard'
    Error:
      type: object
      description: >-
        The standard Endl error body. `errors[].code` is an `ERRCRD_` code —
        **the code numbers are not final yet** — and `field` names the request
        field when one is at fault.
      properties:
        code:
          type: integer
        message:
          type: string
        status:
          type: string
          enum:
            - ERROR
        data:
          type: 'null'
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              field:
                type:
                  - string
                  - 'null'
    EncryptedCard:
      type: object
      description: >-
        The card number, CVC and expiry, encrypted to your registered RSA public
        key. The **encoding of these fields (Base64 or Base64url) and the exact
        `aad` value are not final yet.** See [Card details
        encryption](/api-reference/cards/encryption).
      properties:
        alg:
          type: string
          example: RSA-OAEP-256+A256GCM
        keyId:
          type: string
          description: Names the key used, so you can rotate keys safely.
          example: key_2026_01
        encryptedKey:
          type: string
        iv:
          type: string
        ciphertext:
          type: string
        tag:
          type: string
        aad:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Api-Key
      description: Partner API key. Must carry the `cards` permission.

````

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