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

# Ottenere i dettagli di una carta

Questo endpoint recupera i dettagli di una carta tokenizzata in precedenza. Puoi usarlo per confermare che una carta è stata tokenizzata correttamente e per accedere ai dettagli della carta tokenizzata, come il circuito, le ultime quattro cifre e la data di scadenza.


## OpenAPI

````yaml openapi/it/localpayment.json GET /api/card
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/card:
    get:
      summary: Ottenere i dettagli di una carta
      operationId: get-card
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token di accesso Bearer per l'autenticazione. Questo token si
            ottiene dagli endpoint [Ottenere il token di
            accesso](/it/reference/get-token) o [Rinnovare il token di
            accesso](/it/reference/refresh-token).
          required: true
          schema:
            type: string
        - name: token
          in: query
          description: Token della carta.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  card:
                    type: object
                    description: Informazioni sulla carta.
                    properties:
                      token:
                        type: string
                        description: Token che contiene le informazioni della carta.
                      bin:
                        type: string
                        description: Numero di identificazione bancaria.
                      brand:
                        type: string
                        description: Circuito di pagamento della carta.
                      Country:
                        type: string
                        enum:
                          - AR
                          - BO
                          - BR
                          - CL
                          - CO
                          - CR
                          - DO
                          - EC
                          - SV
                          - GT
                          - HN
                          - MX
                          - PA
                          - PY
                          - PE
                          - UY
                        title: Paese
                        description: >-
                          [Paese](/it/reference/country-codes). ISO 3166-1
                          alpha-2.
                      name:
                        type: string
                        description: Nome del titolare della carta.
                      last4:
                        type: string
                        description: Ultime quattro cifre della carta.
                      expirationYear:
                        type: integer
                        description: Anno di scadenza nel formato `yyyy`.
                      expirationMonth:
                        type: integer
                        description: Mese di scadenza nel formato `mm`.
                      Installments:
                        type: integer
                        description: Rate.
                    x-examples:
                      Example 1:
                        card:
                          token: Txf+Hf/YlDNiJOkIifR7nXDnvH0IsuZN+dwyzen5Ks0=
                          bin: '424242'
                          brand: VISA
                          country: GB
                          name: MANUEL CEDRO
                          last4: '4242'
                          expirationYear: 2025
                          expirationMonth: 11
                          installments: 0
                  errors:
                    type: array
                    description: Elenco degli errori verificatisi durante la transazione.
                    items:
                      type: object
                x-examples:
                  Example 1:
                    card:
                      token: Quwoyb%2BSaW2t6vNvnPK0%2Ff3hu4UZQqSwY4yXKdkON9c%3D
                      bin: '400000'
                      brand: VISA
                      country: US
                      name: John Doe
                      last4: '0002'
                      expirationYear: 2028
                      expirationMonth: 11
                    errors: []
              examples:
                200 - Get card.:
                  value:
                    card:
                      token: Quwoyb%2BcaW1t6vNvxPK0%2Ff3hu4UZQqSwY4yXKdkON9c%3D
                      bin: '400000'
                      brand: VISA
                      country: US
                      name: John Doe
                      last4: '0002'
                      expirationYear: 2028
                      expirationMonth: 11
                    errors: []
        '400':
          description: Richiesta non valida.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    description: Elenco degli errori verificatisi durante la transazione.
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          description: Codice di errore.
                        detail:
                          type: string
                          description: Dettagli dell'errore.
                        description:
                          type: string
                          description: Descrizione dell'errore.
                x-examples:
                  Example 1:
                    errors:
                      - code: '801'
                        description: REJECTED
                        detail: Params error Invalid token
              examples:
                801 - Params error Invalid token.:
                  value:
                    errors:
                      - code: '801'
                        description: REJECTED
                        detail: Params error Invalid token
        '401':
          description: Non autorizzato.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Informazioni aggiuntive della risposta.
                  code:
                    type: string
                    description: Codice di stato.
                  messages:
                    type: array
                    description: Elenco dei messaggi.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Classe del token.
                        token_type:
                          type: string
                          description: Tipo di token.
                        message:
                          type: string
                          description: Messaggio con informazioni aggiuntive.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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